diff --git a/dashboard/admin.py b/dashboard/admin.py new file mode 100644 index 0000000..578e269 --- /dev/null +++ b/dashboard/admin.py @@ -0,0 +1,4 @@ +from codereview.dashboard.models import * +from django.contrib import admin + +admin.site.register(Repository) diff --git a/dashboard/models.py b/dashboard/models.py index 55e1616..0826503 100755 --- a/dashboard/models.py +++ b/dashboard/models.py @@ -4,3 +4,6 @@ class Repository(models.Model): name = models.CharField(max_length=200, unique=True) path = models.CharField(max_length=255) type = models.IntegerField(default=0) + + def __unicode__(self): + return self.name diff --git a/settings.py b/settings.py index 4079568..b10e1be 100755 --- a/settings.py +++ b/settings.py @@ -55,7 +55,7 @@ MEDIA_URL = '' # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a # trailing slash. # 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. SECRET_KEY = 'w*cepy#)iiaion7n!^_zwyc3cy_s89!qz!ey5%avrgg($8o_*y' @@ -91,7 +91,7 @@ INSTALLED_APPS = ( 'django.contrib.sites', 'django.contrib.messages', # Uncomment the next line to enable the admin: - # 'django.contrib.admin', + 'django.contrib.admin', 'codereview.dashboard', 'codereview.browser', diff --git a/urls.py b/urls.py index febaf47..5411d6f 100755 --- a/urls.py +++ b/urls.py @@ -1,8 +1,8 @@ from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: -# from django.contrib import admin -# admin.autodiscover() +from django.contrib import admin +admin.autodiscover() urlpatterns = patterns('', # Example: @@ -15,5 +15,5 @@ urlpatterns = patterns('', # (r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: - # (r'^admin/', include(admin.site.urls)), + (r'^admin/', include(admin.site.urls)), )