Hello everybody,

I'm getting an error trying to get a QuerySet object. I've just
started to work on a small ToDo list but I can't move on since I keep
on getting "Truncated incorrect DOUBLE value: 'matic'" error.

My model for the entry looks like this:

class Entry(models.Model):
    submitted_by = models.ForeignKey(User,
related_name='submitted_by', verbose_name=_('submitted by'))
    submitted_to = models.ForeignKey(User,
related_name='submitted_to', verbose_name=_('submitted to'))
    title = models.CharField(max_length=200, verbose_name=_('title'))
    entry = models.TextField(verbose_name=_('entry'))
    pub_date = models.DateTimeField(verbose_name=_('publish date'))
    mod_date = models.DateTimeField(verbose_name=_('modification date'))
    status = models.SmallIntegerField(choices=STATUS_CHOICES,
verbose_name=_('status'))
    priority = models.SmallIntegerField(choices=PRIORITY_CHOICES,
verbose_name=_('priority'))
    slug = models.SlugField(unique_for_date='pub_date',
prepopulate_from=('title',), verbose_name=_('slug'))

    # Methods excluded to keep it short

My view for this is:
def show_entries_for_user(request, submitted_t):
    entries = Entry.objects.filter(submitted_to=submitted_t)

    for entry in entries:
        entry.entry = mark_safe(entry.entry)

    return render_to_response('todo.html', {'entries': entries})

And url pattern is:
urlpatterns = patterns('',
     (r'^(?P<submitted_t>[a-zA-Z0-9_]{1,30})/$',
'todo.views.show_entries_for_user'),
)

Could anybody help me out with this? The main idea is that I want to
render a page which shows all the (open) tasks for a certain user.

Thanks,
Matic

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to