-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: George J Padayatti <george.padayatti@igrant.io>
- Loading branch information
1 parent
b341108
commit 711a56c
Showing
12 changed files
with
51 additions
and
4 deletions.
There are no files selected for viewing
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,8 +1,14 @@ | ||
from django.contrib import admin | ||
from .models import DataSource,Verification, VerificationTemplate, ImageModel | ||
from customadminsite.admin import myadminsite | ||
|
||
# Register your models here. | ||
admin.site.register(DataSource) | ||
admin.site.register(Verification) | ||
admin.site.register(VerificationTemplate) | ||
admin.site.register(ImageModel) | ||
admin.site.register(ImageModel) | ||
|
||
myadminsite.register(DataSource) | ||
myadminsite.register(Verification) | ||
myadminsite.register(VerificationTemplate) | ||
myadminsite.register(ImageModel) |
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,5 +1,6 @@ | ||
from django.contrib import admin | ||
from .models import Connection | ||
from customadminsite.admin import myadminsite | ||
|
||
# Register your models here. | ||
admin.site.register(Connection) | ||
myadminsite.register(Connection) |
Empty file.
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,22 @@ | ||
from django.contrib.admin import AdminSite | ||
from django.contrib.auth.forms import AuthenticationForm | ||
|
||
|
||
# Register your models here. | ||
class MyAdminSite(AdminSite): | ||
""" | ||
App-specific admin site implementation | ||
""" | ||
|
||
login_form = AuthenticationForm | ||
|
||
site_header = 'Dataspace Administration' | ||
|
||
def has_permission(self, request): | ||
""" | ||
Checks if the current user has access. | ||
""" | ||
return request.user.is_active | ||
|
||
|
||
myadminsite = MyAdminSite(name='myadmin') |
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,5 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class CustomadminsiteConfig(AppConfig): | ||
name = 'customadminsite' |
Empty file.
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,3 @@ | ||
from django.db import models | ||
|
||
# Create your models here. |
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,3 @@ | ||
from django.test import TestCase | ||
|
||
# Create your tests here. |
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,3 @@ | ||
from django.shortcuts import render | ||
|
||
# Create your views here. |
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,5 +1,6 @@ | ||
from django.contrib import admin | ||
from .models import DataDisclosureAgreement | ||
from customadminsite.admin import myadminsite | ||
|
||
# Register your models here. | ||
admin.site.register(DataDisclosureAgreement) | ||
myadminsite.register(DataDisclosureAgreement) |
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