Re: Template filters problem introduced in rev 10118

2009-03-24 Thread eXt
e, that was a bug. Now it's fixed. > You'll have to edit your tag to coerce the string to an integer. Not > to hard to do, but a good idea even if it's not necessary. You're right. I've already improved this code to be bulletproof and safe. -- eXt --~--~-~--

Template filters problem introduced in rev 10118

2009-03-24 Thread eXt
Hi! As apollo13 has suggested to me on #django I'm reporting here a problem I've ecountered. Revision 10118 of Django has introduced some changes to the way template filters work. I've simple filter: @register.filter @stringfilter def truncatestring(src, ln): ret = src[:ln] if len(src

Re: contrib.auth and User model

2007-11-08 Thread eXt
On 8 Lis, 12:54, "Alexander Solovyov" <[EMAIL PROTECTED]> wrote: > On Nov 8, 2007 1:46 PM, Amit Upadhyay <[EMAIL PROTECTED]> wrote: > > > See if this is of any help: > >http://www.amitu.com/blog/2007/july/django-extending-user-model/ I have used a method called "lost theories solution" in the po

Re: Custom permissions and contenttypes

2007-09-28 Thread eXt
On 28 Wrz, 22:35, "Deryck Hodge" <[EMAIL PROTECTED]> wrote: > Hrr... I see your point about each, at least as a use case. I > think there are ways to get what you want without, though. I see that I can define a model called GlobalPermissions and set my custom permissions on it. > For case #1

Re: Custom permissions and contenttypes

2007-09-28 Thread eXt
Hi! Custom content types without a model give me a lot of flexibility. For example: 1. I've got a bunch of reports which are generated by Jasper Reports. In my Django app I have some groups of users and each of them should see a different subset of reports. Reports are not defined in my datab

Custom permissions and contenttypes

2007-09-27 Thread eXt
Hi all! I've a need to use some custom permissions in my applications. In order to do that I used this snippet: - http://www.djangosnippets.org/snippets/334/ It creates custom contenttype and sets custom permissions on it. So far so good. Yesterday I moved to the latest Django vers