Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add djangorestframework and register admin pages
git-svn-id: https://svn.apache.org/repos/asf/bloodhound/branches/bh_core_experimental@1843801 13f79535-47bb-0310-9956-ffa450edef68
- Loading branch information
Showing
7 changed files
with
85 additions
and
49 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
@@ -10,6 +10,7 @@ PyYAML = "*" | ||
|
||
[packages] | ||
django = ">=2.0.0" | ||
djangorestframework = "*" | ||
|
||
[requires] | ||
python_version = "3.6" |
Some generated files are not rendered by default. Learn more.
Oops, something went wrong.
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
@@ -36,5 +36,5 @@ | ||
|
||
urlpatterns = [ | ||
path('', include('trackers.urls')), | ||
# path('admin/', admin.site.urls), | ||
path('admin/', admin.site.urls), | ||
] |
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
@@ -19,3 +19,7 @@ | ||
from django.contrib import admin | ||
|
||
# Register your models here. | ||
from trackers.models import Ticket, ChangeEvent | ||
|
||
admin.site.register(Ticket) | ||
admin.site.register(ChangeEvent) |
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
@@ -0,0 +1,8 @@ | ||
from rest_framework import serializers | ||
from trackers.models import Ticket | ||
|
||
|
||
class TicketSerializer(serializers.ModelSerializer): | ||
class Meta: | ||
model = Ticket | ||
fields = '__all__' |
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