Re: Four Hop, Two Criteria Query
On May 27, 11:46 am, Lee Hinde wrote: > So, if I were to display a list of notes, how would I join those two > together? if i get you right, you could accomplish this by using a model method get_weather(self): weather = Weather.objects.filter(weather_date=self.created, ... cheers, chr -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Creating a custom view in Django admin,
On May 26, 7:02 pm, Dexter wrote: > Another thing: > > At the event model, it is unnecessary to display all the events in the > admin. How can I make sure only the events coming (ie > date__gte=datetime.now()) are displayed in the admin? i think a proxy model[1] might work where you set the default manager to only filter for all objects greater than now(). then, instead of (or in addition to) the actual event model you register the proxymodel with the admin. [1] http://docs.djangoproject.com/en/dev/topics/db/models/#proxy-model-managers -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: /i18n/setlang/ broken?
hi rolando, yep, that fixed it. stupid me. i'll spend the next few hours hitting my head against the desk. thank you so much. cheers, chr On Apr 8, 5:44 pm, Rolando Espinoza La Fuente wrote: > On Thu, Apr 8, 2010 at 6:21 AM, chr wrote: > > btw, here's the minimal-app:http://github.com/statesofpop/i18ntest > > Add LocaleMiddleware > > http://github.com/darkrho/i18ntest/commit/f12abc9a525da2ab9ae3fb3d9c1... > > ~Rolando -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: /i18n/setlang/ broken?
btw, here's the minimal-app: http://github.com/statesofpop/i18ntest -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: /i18n/setlang/ broken?
thanks for your quick reply. but no, i'm not using GET and for my minimal example app i've used the template snippet as provided in the django dev-docs. On Apr 8, 11:36 am, Baurzhan Ismagulov wrote: > On Thu, Apr 08, 2010 at 02:00:03AM -0700, chr wrote: > > a) switching languages using /i18n/setlang/ doesn't have any effect > > anymore > > Are you per chance using it with GET? It isn't supported any more. > > With kind regards, > -- > Baurzhan Ismagulovhttp://www.kz-easy.com/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
/i18n/setlang/ broken?
hi everyone, just spent a few hours trying to find out what's going wrong with i18n... i've just updated a two-year old project (using django- multilingual-ng) to trunk only to find that a) switching languages using /i18n/setlang/ doesn't have any effect anymore b) putting an extra translation.activate django.core.views.i18n set_language fixes the problem on my local install but ... c) language setting doesn't seem to be thread safe on an apache-wsgi install (my browser has english as default, the customer's is german - when we both use contrib.admin the interface constantly changes between german and english, depending on who did the most recent request) after hours of trying to troubleshoot, i've set up a minimal django install (using trunk), no extra apps (except contrib.admin), all default settings, mysql-database, only one view serving the minimal form to change the language (taken from [1]). i've used this approach before and it seems to me it broke sometime during 1.2 development. i'll do some more testing today trying to find the revision that broke it. if anyone can point me to a patch (couldn't find a ticket in django'd trac) or a solution or some oversight on my part, i'd be really glad. [1] http://docs.djangoproject.com/en/dev/topics/i18n/internationalization/#topics-i18n-internationalization -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: django web hosting
i can only recommend djangohosting.ch for small to medium django-based websites (with a european audience). deployed four websites with djangohosting now. support is helpful and fast. the config-panel is amazing. also, a lot of python packages are installed by default. my latest site was online within some 30 minutes. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: to_field in admin
thanks for your help. the patch works great. cheers. chr --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
to_field in admin
hi. i've got a model like this: class Inventory(models.Model): barcode = models.PositiveIntegerField(unique=True) parent = models.ForeignKey('self', to_field='barcode', blank=True, null=True) name = models.CharField(blank=False) and i get: >>> i = Inventory.objects.get(barcode=115716) >>> i >>> i.parent which is fine. whereas in the admin the select-widget will have the item selected whose id accidentally matches the barcode. i.e. the values in the select-widget aren't the values from barcode but the pk. Apple Mighty Mouse i couldn't find this behaviour in the admin documented anywhere. so, is the bug in my model, the lack of documentation or the admin? many thanks in advance. cheers. chr --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---