Enabling the admin system
This commit is contained in:
parent
c7a54fae89
commit
31223b0a1f
3 changed files with 14 additions and 5 deletions
9
analyzer/admin.py
Normal file
9
analyzer/admin.py
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
from mtgweb.analyzer.models import Deck, Card
|
||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
class CardAdmin(admin.ModelAdmin):
|
||||||
|
search_fields = ['name']
|
||||||
|
list_filter = ['type']
|
||||||
|
|
||||||
|
admin.site.register(Card, CardAdmin)
|
||||||
|
admin.site.register(Deck)
|
|
@ -55,7 +55,7 @@ MEDIA_URL = ''
|
||||||
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
||||||
# trailing slash.
|
# trailing slash.
|
||||||
# Examples: "http://foo.com/media/", "/media/".
|
# Examples: "http://foo.com/media/", "/media/".
|
||||||
ADMIN_MEDIA_PREFIX = '/media/'
|
ADMIN_MEDIA_PREFIX = 'http://phoenixinquis.is-a-geek.org/admin_media/'
|
||||||
|
|
||||||
# Make this unique, and don't share it with anybody.
|
# Make this unique, and don't share it with anybody.
|
||||||
SECRET_KEY = 'w((e#e75atr#mvb+4793wh81(rqqfw#9h7&5bk!_=z9&8o88_d'
|
SECRET_KEY = 'w((e#e75atr#mvb+4793wh81(rqqfw#9h7&5bk!_=z9&8o88_d'
|
||||||
|
@ -91,6 +91,6 @@ INSTALLED_APPS = (
|
||||||
'django.contrib.sites',
|
'django.contrib.sites',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
# Uncomment the next line to enable the admin:
|
# Uncomment the next line to enable the admin:
|
||||||
# 'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'mtgweb.analyzer'
|
'mtgweb.analyzer'
|
||||||
)
|
)
|
||||||
|
|
6
urls.py
6
urls.py
|
@ -1,8 +1,8 @@
|
||||||
from django.conf.urls.defaults import *
|
from django.conf.urls.defaults import *
|
||||||
|
|
||||||
# Uncomment the next two lines to enable the admin:
|
# Uncomment the next two lines to enable the admin:
|
||||||
# from django.contrib import admin
|
from django.contrib import admin
|
||||||
# admin.autodiscover()
|
admin.autodiscover()
|
||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
# Example:
|
# Example:
|
||||||
|
@ -15,5 +15,5 @@ urlpatterns = patterns('',
|
||||||
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
||||||
|
|
||||||
# Uncomment the next line to enable the admin:
|
# Uncomment the next line to enable the admin:
|
||||||
# (r'^admin/', include(admin.site.urls)),
|
(r'^admin/', include(admin.site.urls)),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue