Re: Passing in a value from a url

2008-09-22 Thread djandrow
Thanks Karen, it works fine now. regards, Andrew --~--~-~--~~~---~--~~ 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 grou

Re: Passing in a value from a url

2008-09-21 Thread Karen Tracey
On Sun, Sep 21, 2008 at 5:29 PM, djandrow <[EMAIL PROTECTED]> wrote: > > Here is my model for entry; > > class Entry(models.Model): > >entry_id = models.AutoField(primary_key=True) >entry_date = models.DateField(auto_now_add=True) >entry_title = models.CharField(max_length=

Re: Passing in a value from a url

2008-09-21 Thread djandrow
Here is my model for entry; class Entry(models.Model): entry_id = models.AutoField(primary_key=True) entry_date = models.DateField(auto_now_add=True) entry_title = models.CharField(max_length=70) entry_content = models.TextField(max_length=5000) entry_cat

Re: Passing in a value from a url

2008-09-21 Thread Karen Tracey
On Sun, Sep 21, 2008 at 4:36 PM, djandrow <[EMAIL PROTECTED]> wrote: > > Hi, I am currently trying to pass in a value from a url and the > perform a query based on that, i've tried this: > > def category_view(request, category): >current_entries = > Entry.objects.filter(entry_cat=category)

Passing in a value from a url

2008-09-21 Thread djandrow
Hi, I am currently trying to pass in a value from a url and the perform a query based on that, i've tried this: def category_view(request, category): current_entries = Entry.objects.filter(entry_cat=category).order_by("- entry_date") return render_to_response('blog/base.html', loc