Re: tiny patch to improve the url validating regex

2006-02-10 Thread EricHsu
Adrian Holovaty wrote: > Hey Eric, > > Thanks for the pointer on this. I've updated the code in trunk to > accept "https". > > Adrian > My pleasure! I've updated my django source to the latest trunk :) - Eric

displaying a foreign key in admin list and template exception

2006-02-10 Thread Andu
Hi all, I'm having some problems and I've isolated them in a small example. I have the following data model: class Currency(meta.Model): name = meta.CharField(maxlength=5) def __repr__(self): return self.name class META: admin = meta.Admin() class CustomData(meta.M

Re: auto-login upon registration

2006-02-10 Thread Jeremy Jones
On Fri, 10 Feb 2006 09:29:34 -0600 Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 2/10/06, Jeremy Jones <[EMAIL PROTECTED]> wrote: > > I have the following view which adds users to the User table (and > > SimpleUserManipulator is a class I've defined). Is there a way I > > can automatically

Re: locale settings

2006-02-10 Thread TT
Well, problem is probably wrong word to use, but I'll try to be more specific. I speak finnish as my mother tongue, so my english might be confusing. First I change my language settings to finnish so gettext translation works correctly. As example I have on model with some DateTimeField: class

Re: Bug in MultiValueDict?

2006-02-10 Thread Adrian Holovaty
On 2/10/06, Andrew Degtiariov <[EMAIL PROTECTED]> wrote: > def complete(self, request, data): > debug('complete: %s' %repr(data)) > debug('complete: %s' %repr(data['costs']) > . > > First debug() call produced: > complete: ['\xd0\xa2\xd0\xb5\xd1\x81\xd1\x82x'

Re: iterator lookup function crashs

2006-02-10 Thread Sebastien Fievet
Hi Adrian, You're right. Shame on me ! Thanks a lot. Seb --~--~-~--~~~---~--~~ 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 t

Bug in MultiValueDict?

2006-02-10 Thread Andrew Degtiariov
Hello! I'm using Django 0.91 and found some stranges related to MultiValueDict. Here is some code based on reciept from Django cookbook (manipulator related): class ServiceEdit(Manipulator): .     def complete(self, request, data):     debug('complete: %s' %repr(data))     debug('comp

Re: locale settings

2006-02-10 Thread Adrian Holovaty
On 2/8/06, TT <[EMAIL PROTECTED]> wrote: > I found an interesting way to handle locales in admin's date_hierarchy > feature. When day_lookup (GET-parameter 'variable'__day) is part of the > request, the response uses django.utils.dates.MONTH in month's name, > which uses gettext to translate month

Re: iterator lookup function crashs

2006-02-10 Thread Adrian Holovaty
On 2/10/06, Sebastien Fievet <[EMAIL PROTECTED]> wrote: > TypeError: got unexpected keyword argument 'event__exact' > > What's wrong with my code ? (I've got the last SVN version of Django, > v2299) Hey Sebastien, You need to use event__id__exact, not event__exact. Adrian -- Adrian Holovaty ho

Re: admin interface can't find table

2006-02-10 Thread James_Martin
Sorry for the spam all, I should've check the bug tracker (#930) first... James S. Martin, RHCE Contractor Administrative Office of the United States Courts Washington, DC (202) 502-2394 --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: iterator lookup function crashs

2006-02-10 Thread Sebastien Fievet
Oups, you should read : >>> from django.models.flood import members, events >>> e = events.get_values(pk=1) >>> for m in members.get_iterator(event__exact=e): ... print m --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

iterator lookup function crashs

2006-02-10 Thread Sebastien Fievet
Hi all, i'm trying to use the iterator lookup function on my model, but it failed. My model is the following : from django.core import meta STATUS_CHOICES = ( (0, 'Added'), (1, 'Requested'), (2, 'Registered'), ) # Create your models here. class User(meta.Model): msisdn = meta.Ch

Re: tiny patch to improve the url validating regex

2006-02-10 Thread Adrian Holovaty
On 2/9/06, EricHsu <[EMAIL PROTECTED]> wrote: > when I tried to save an "https://..."; url into the db, the django's > manipulator kept complaining that it was invalid. It is because the > django/core/validators.py's url_re is a little bit too simple, the > url_re pattern accepts only url begins w

Re: auto-login upon registration

2006-02-10 Thread Adrian Holovaty
On 2/10/06, Jeremy Jones <[EMAIL PROTECTED]> wrote: > I have the following view which adds users to the User table (and > SimpleUserManipulator is a class I've defined). Is there a way I can > automatically login the user once the record is saved? Hey Jeremy, Sure, just do this, after you've cr

Re: admin interface can't find table

2006-02-10 Thread James_Martin
django-users@googlegroups.com wrote on 02/09/2006 07:20:35 PM: > So this is a strange problem...I'm getting the Following error when try to > view the list mode of my court_detals object in the Admin interface. > snip. To be a little less verbose, I think the SQL handler in django is not ha

auto-login upon registration

2006-02-10 Thread Jeremy Jones
I have the following view which adds users to the User table (and SimpleUserManipulator is a class I've defined). Is there a way I can automatically login the user once the record is saved? Here is the register view function: def register(request): manipulator = SimpleUserManipulator()

Re: memcached + multiple virtual hosts

2006-02-10 Thread Jacob Kaplan-Moss
On Feb 10, 2006, at 1:57 AM, Roberto Aguilar wrote: > I'm planning on running multiple websites on one server using virtual > hosts. I also want to run memcached and wanted to know what the best > way to avoid "name collisions". The best way to do it is to make sure that your keys have identifie

Re: Template engine error?

2006-02-10 Thread limodou
On 2/10/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > On Friday 10 Feb 2006 2:38 pm, Tobias wrote: > > TemplateSyntaxError: Caught an exception while rendering. > > usualy templatesyntaxerror has nothing to do with templates - there > may be a syntax error in your model itself - a missing c

Re: Recursive self referring foreignkeys

2006-02-10 Thread Rudolph
Thanks! Thats just what I needed! --~--~-~--~~~---~--~~ 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 t

Re: Template engine error?

2006-02-10 Thread Kenneth Gonsalves
On Friday 10 Feb 2006 2:38 pm, Tobias wrote: > TemplateSyntaxError: Caught an exception while rendering. usualy templatesyntaxerror has nothing to do with templates - there may be a syntax error in your model itself - a missing comma or a borked __repr__. Did you run 'validate'? -- regards kg

Re: Recursive self referring foreignkeys

2006-02-10 Thread Max Battcher
Rudolph wrote: > With meta.ForeignKey("self") you can create an object that can refer to > objects from the same type. But how do I prevent loops? (like an object > that refers to itself, or object A refers to object B which refers back > to object A). With limit_choices_to I could prevent an obje

Recursive self referring foreignkeys

2006-02-10 Thread Rudolph
Hi, With meta.ForeignKey("self") you can create an object that can refer to objects from the same type. But how do I prevent loops? (like an object that refers to itself, or object A refers to object B which refers back to object A). With limit_choices_to I could prevent an object from selecting

Re: Django and PCMEF vs MVC

2006-02-10 Thread limodou
On 2/10/06, Max Battcher <[EMAIL PROTECTED]> wrote: > > A few thoughts on architecture: > http://blog.worldmaker.net/node/211 > > I had architecture thoughts in my head from class and felt I could apply > them somewhat to Django. I'm not sure if its useful or interesting, but > hopefully somebody

Django and PCMEF vs MVC

2006-02-10 Thread Max Battcher
A few thoughts on architecture: http://blog.worldmaker.net/node/211 I had architecture thoughts in my head from class and felt I could apply them somewhat to Django. I'm not sure if its useful or interesting, but hopefully somebody might find use of it or interest in it. -- --Max Battcher--

Template engine error?

2006-02-10 Thread Tobias
Hi, everyone, trying to get my first Drango project running, I got the following error for an "add" action: Traceback (most recent call last): File "...\django\core\servers\basehttp.py", line 272, in run self.result = application(self.environ, self.start_response) File "...\django\core

is_member_of method for user objects

2006-02-10 Thread Roberto Aguilar
Hello, I wasn't able to find an easy way to check if a user is a member of a group, so I added the method; here is a patch for: django/django/models/auth.py Index: auth.py === --- auth.py (revision 2296) +++ auth.py (workin