-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Near final SI module - Validation tests
- Loading branch information
Newton Mugaya
committed
Nov 16, 2023
1 parent
a419cdb
commit ef51843
Showing
152 changed files
with
47,036 additions
and
12,791 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from django.contrib import admin | ||
from .models import DeviceManagement | ||
|
||
|
||
class DeviceManagementAdmin(admin.ModelAdmin): | ||
list_display = ('device_id', 'user', 'is_blocked', 'is_void', | ||
'timestamp_created', 'timestamp_updated') | ||
search_fields = ('device_id', 'timestamp_created') | ||
|
||
list_filter = ['is_blocked', 'is_void'] | ||
|
||
|
||
admin.site.register(DeviceManagement, DeviceManagementAdmin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class CpovcApiConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'cpovc_api' | ||
|
||
verbose_name = 'API Management' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,31 @@ | ||
import uuid | ||
from django.db import models | ||
from django.utils import timezone | ||
|
||
# Create your models here. | ||
from cpovc_auth.models import AppUser | ||
|
||
|
||
class DeviceManagement(models.Model): | ||
"""Device Management Service for Mobile App""" | ||
|
||
dm_id = models.UUIDField( | ||
primary_key=True, default=uuid.uuid1, editable=False) | ||
device_id = models.CharField(db_index=True, max_length=25) | ||
user = models.ForeignKey(AppUser, on_delete=models.CASCADE) | ||
timestamp_created = models.DateTimeField(default=timezone.now) | ||
timestamp_updated = models.DateTimeField(auto_now=True) | ||
is_blocked = models.BooleanField(default=False) | ||
is_void = models.BooleanField(default=False) | ||
|
||
class Meta: | ||
"""Override Params.""" | ||
|
||
unique_together = ('device_id', 'user') | ||
|
||
db_table = 'api_device_management' | ||
verbose_name = 'API Device Management' | ||
verbose_name_plural = 'API Device Managements' | ||
|
||
def __str__(self): | ||
"""To be returned by admin actions.""" | ||
return str(self.dm_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"pk": 2000, | ||
"model": "cpovc_main.SetupList", | ||
"fields": { | ||
"item_category": "Government Type", | ||
"user_configurable": "False", | ||
"sms_keyword": "True", | ||
"item_sub_category": "", | ||
"is_void": "False", | ||
"item_id": "TNRG", | ||
"item_description_short": "Regional Children Office", | ||
"field_name": "government_unit_type_id", | ||
"item_description": "Regional Children Office", | ||
"the_order": 11 | ||
} | ||
} | ||
] |
Oops, something went wrong.