Skip to content

Commit

Permalink
Basic admin functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
chhabrakadabra committed Apr 3, 2013
1 parent 552da41 commit 1692e11
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Binary file modified djangotodo/djangotodo.db
Binary file not shown.
2 changes: 1 addition & 1 deletion djangotodo/djangotodo/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
'django.contrib.staticfiles',
'todolist',
# Uncomment the next line to enable the admin:
# 'django.contrib.admin',
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
)
Expand Down
6 changes: 3 additions & 3 deletions djangotodo/djangotodo/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.conf.urls import patterns, include, url

# 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('',
# Examples:
Expand All @@ -13,7 +13,7 @@
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
# url(r'^admin/', include(admin.site.urls)),
url(r'^admin/', include(admin.site.urls)),

url(r'^$', 'todolist.views.list'),
)
6 changes: 6 additions & 0 deletions djangotodo/todolist/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
from django.db import models
from django.contrib import admin

class Task(models.Model):
description = models.TextField(max_length=200)

def __unicode__(self):
return self.description

admin.site.register(Task)

0 comments on commit 1692e11

Please sign in to comment.