Re: Problem with URL naming, generic templates and custom filtering wrappers

2009-10-10 Thread Scott SA
Hi Karen, On Oct 10, 5:58 pm, Karen Tracey wrote: > On Sat, Oct 10, 2009 at 6:34 PM, Scott SA wrote: > > I am trying to use a series of generic views with custom filtering via > > callbacks as per: > I cannot figure out how this one differs from the next one, nor can I &g

Re: Problem with URL naming, generic templates and custom filtering wrappers

2009-10-10 Thread Karen Tracey
On Sat, Oct 10, 2009 at 6:34 PM, Scott SA wrote: > > Hi, > > I am trying to use a series of generic views with custom filtering via > callbacks as per: > > > http://docs.djangoproject.com/en/dev/topics/generic-views/#extending-generic-views > > Unfortunately,

Problem with URL naming, generic templates and custom filtering wrappers

2009-10-10 Thread Scott SA
Hi, I am trying to use a series of generic views with custom filtering via callbacks as per: http://docs.djangoproject.com/en/dev/topics/generic-views/#extending-generic-views Unfortunately, when I try to name the URL in urls.py, I get various errors depending upon how I try to write the

Re: custom filtering

2009-08-25 Thread Alsond
Almost resolved with this code: class EntryForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(EntryForm, self).__init__(*args, **kwargs) self.fields['authorcategory'].queryset = AuthorCategory.objects.filter( author=2) class EntryAdmin(admin.ModelAd

Re: custom filtering

2009-08-25 Thread Alsond
So, how to see AuthorCategory items filtered by currently loged in user in admin ? On Aug 25, 3:54 pm, Alsond wrote: > System needs to types of categories. First one is used by all. Second > one is created by author. > In admin on new Entry I would like tu see all items from Category > and in Au

custom filtering

2009-08-25 Thread Alsond
System needs to types of categories. First one is used by all. Second one is created by author. In admin on new Entry I would like tu see all items from Category and in AuthorCategory would like to see AuthorCategory items where User is current user. from django.contrib.auth.models import User