A concrete poll app allowing CRUD functionality in the admin and front-end.
Project description
django-poll
-----------
1. django-admin.py startproject project
2. Configure your database in your settings file:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'project.db',
}
}
3. Install the package to your python site-packages folder or just use it as a module in your project.
4. Add 'polls' to INSTALLED_APPS in your settings file.
5. Add 'django.contrib.admin' to INSTALLED_APPS in your settings file.
6. Configure yourt settings file further:
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.request',
'django.core.context_processors.static',
'django_mobile.context_processors.flavour',
'django.contrib.messages.context_processors.messages'
)
7. python manage.py syncdb --settings=project.settings
8. In your projects urls add the following code:
from django.contrib import admin
admin.autodiscover()
from polls import urls as poll_urls
urlpatterns = patterns('',
...
url(r'^poll/', include(poll_urls)),
url(r'^admin/', include(admin.site.urls)),
...
)
9. python manage.py runserver --settings=project.settings
10. http://127.0.0.1:8000/admin, login first
11. In the admin you'll see the polls app.
12. While logged in go to, http://127.0.0.1:8000/poll and add a poll.
13. Django 1.5.1 compatible
-----------
1. django-admin.py startproject project
2. Configure your database in your settings file:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'project.db',
}
}
3. Install the package to your python site-packages folder or just use it as a module in your project.
4. Add 'polls' to INSTALLED_APPS in your settings file.
5. Add 'django.contrib.admin' to INSTALLED_APPS in your settings file.
6. Configure yourt settings file further:
TEMPLATE_CONTEXT_PROCESSORS = (
'django.contrib.auth.context_processors.auth',
'django.core.context_processors.request',
'django.core.context_processors.static',
'django_mobile.context_processors.flavour',
'django.contrib.messages.context_processors.messages'
)
7. python manage.py syncdb --settings=project.settings
8. In your projects urls add the following code:
from django.contrib import admin
admin.autodiscover()
from polls import urls as poll_urls
urlpatterns = patterns('',
...
url(r'^poll/', include(poll_urls)),
url(r'^admin/', include(admin.site.urls)),
...
)
9. python manage.py runserver --settings=project.settings
10. http://127.0.0.1:8000/admin, login first
11. In the admin you'll see the polls app.
12. While logged in go to, http://127.0.0.1:8000/poll and add a poll.
13. Django 1.5.1 compatible
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
django-poll-0.0.2.tar.bz2
(37.2 kB
view hashes)