Yeah, I didn't display the entire view. Sorry about that! But, just
now I did figure out what I was doing wrong! I named the variable
coming from the url "poll". Which is the same as my class name
"Poll". When I changed the url name to "id" everything magically
worked! I feel like an idiot...
On Sat, 06 Mar 2010 09:52:06 -0800, uthaman wrote:
> url:
> url(r'top25/(?P\d{1})/$', views.top25_test, name='top25_test'),
>
> view:
> def top25_test(request, poll):
> entry = Poll.objects.filter(poll_id=poll)
>
> model:
> class Poll(models.Model):
> PUBLISHED_ST
url:
url(r'top25/(?P\d{1})/$', views.top25_test, name='top25_test'),
view:
def top25_test(request, poll):
entry = Poll.objects.filter(poll_id=poll)
model:
class Poll(models.Model):
PUBLISHED_STATUS = 1
DARK_STATUS = 2
STATUS_CHOICES = (
3 matches
Mail list logo