I'm learning Django (Ubuntu 13.04, Python 2.7, Django 1.5, Postgres 9.2, 
Bootstrap 3.0). As my first effort I got the Polls app going from the Django 
1.5 tutorial <https://docs.djangoproject.com/en/1.5/intro/tutorial01/>. I 
then installed django-registration 
1.0<https://django-registration.readthedocs.org/en/latest>and these 
templates <https://github.com/macdhuibh/django-registration-templates> to 
make it work. I chose that package for authentication as opposed to 
django-allauth <http://django-allauth.readthedocs.org/en/latest/> as a result 
of my question on 
StackOverflow<http://stackoverflow.com/questions/19026916/simplest-django-authentication-package-to-use-as-of-oct-2013>.
 


What I want to do now is to integrate these two apps so that the polls are 
not anonymous. After the poll results have been collected, a script is run 
to analyse the results and send an email to each user about how they did as 
compared to total or average. The script and the emailing could be done via 
Python, but even better should really be initialised via the Admin 
interface by site admin.

At first pass I was thinking roughly the following. The poll & choice could 
be simplified down to just a numeric answer to a question. At database 
level we would need a separate table. The primary key would be the userid. 
Each column would store one answer per. I'm guessing this would need a 
class PollsResults in model.py that would include defining the primary key 
as "User", which should exist via django-registration. Exactly how to do 
that and what follows gets a bit hazy to me at the moment.

At the moment my knowledge of Django is so light that I'm struggling to put 
two and two together in an elegant way. I have briefly looked at Light 
Bird's Questionnaire <http://lightbird.net/dbe2/questionnaire.html>, but 
decided it was too complicated using his own library of modular class based 
views. I'd like to keep it as simple as possible, using as much of 
out-of-the-box Django 1.5 functionality as possible.

I also looked at Pinax, but it seems to be stuck in dark ages with latest 
stuff supporting Django 1.4 and Bootstrap 2.x. Documentation looks poor 
too. It looks like a great concept - half-way house between a web framework 
and a CMS. But if only it had a larger following and be more up-to-date 
with a variety of starter projects (e.g. a Questionnaire/Polls type starter 
project where users enter data and then some processing happens etc).

I'm sure it's a simple exercise for any good Django dev to essentially 
combine django-registration with a result against each user, which can then 
be processed/emailed/etc.

Could anyone give any hints or maybe even point me to an example of 
something similar that could give me a starting point of modifying things 
rather than creating from scratch?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c431b06a-6bc2-4fca-80b2-73543af2540e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to