Commit 02251a2a authored by Okhin's avatar Okhin

Basic declarations for the ManagerSite

parent d2b47ffc
from django.contrib import admin from django.contrib import admin
from djago.contrib.admin import AdminSite
from bt import models from bt import models
class CommentInline(admin.TabularInline): class CommentInline(admin.TabularInline):
...@@ -34,3 +36,6 @@ class OperatorAdmin(admin.ModelAdmin): ...@@ -34,3 +36,6 @@ class OperatorAdmin(admin.ModelAdmin):
search_fields = ('name', ) search_fields = ('name', )
pass pass
admin.site.register(models.Operator, OperatorAdmin) admin.site.register(models.Operator, OperatorAdmin)
class ManagerSite(AdminSite):
site_header = 'Manager Site'
...@@ -2,10 +2,11 @@ from django.conf.urls import patterns, include, url ...@@ -2,10 +2,11 @@ from django.conf.urls import patterns, include, url
from django.views.generic import TemplateView, RedirectView from django.views.generic import TemplateView, RedirectView
from django.conf import settings from django.conf import settings
from django.contrib import admin from django.contrib import admin
from bt import views as bt from bt import views as bt
from bt.feeds import RssSiteNewsFeed, AtomSiteNewsFeed from bt.feeds import RssSiteNewsFeed, AtomSiteNewsFeed
from bt.api import APIResource, OperatorResource from bt.api import APIResource, OperatorResource
from bt.admin import ManagerSite
api_resource = APIResource() api_resource = APIResource()
operator_api_resource = OperatorResource() operator_api_resource = OperatorResource()
...@@ -84,6 +85,9 @@ urlpatterns = patterns('', ...@@ -84,6 +85,9 @@ urlpatterns = patterns('',
bt.ViolationSearchView.as_view(template_name='search/search.html')), bt.ViolationSearchView.as_view(template_name='search/search.html')),
# Language switch # Language switch
url(r'^i18n/', include('django.conf.urls.i18n')), url(r'^i18n/', include('django.conf.urls.i18n')),
# Manager admin site
url('r^manager/', ManagerSite.urls),
) )
if settings.DEV_SERVER == True: if settings.DEV_SERVER == True:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment