Skip to main content

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. In settings.py remember to configure LOGIN_URL
8. python manage.py syncdb --settings=project.settings
9. 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)),
...
)

10. python manage.py runserver --settings=project.settings
11. http://127.0.0.1:8000/admin, login first
12. In the admin you'll see the polls app.
13. While logged in go to, http://127.0.0.1:8000/poll and add a poll.
14. Django 1.5.1 compatible


Changelog
---------
0.0.3
Minor cleanup
Minor bug fix. Set proper message when no option is selected when voting on poll

0.0.4
Minor tags and methods included with showcase in templates

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-polls-0.0.4.tar.bz2 (37.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page