Re: dynamic filtering in a QuerySet

2007-08-30 Thread daev
Use strings instead of unicode. Key word arguments names must be strings. --~--~-~--~~~---~--~~ 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

Re: Django-based forum software?

2007-08-30 Thread daev
http://code.google.com/p/diamanda/ --~--~-~--~~~---~--~~ 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

Re: dynamic filtering in a QuerySet

2007-08-30 Thread daev
widgets = widgets.filter( **filters ) --~--~-~--~~~---~--~~ 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

Re: Stand-alone Django ORM question

2007-08-30 Thread daev
Define app_name in Meta nested-class: class Meta: app_name = "some_name" --~--~-~--~~~---~--~~ 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

Re: newforms __init__

2007-08-30 Thread daev
То remove fields from from you don't need to use __init__ form_for_model, form_for_instance function has _fields_ parameter where you can specify all the fields you need/ Example: Form = form_for_model( Article, fields = ( "title", "text", "tags" ) ) Creates form with this three fields of

Re: @url tag - getting rid of urlpatterns

2007-08-30 Thread daev
On 30 авг, 12:08, Ilya Semenov <[EMAIL PROTECTED]> wrote: > Second, I think the use of generic views is over-estimated. Generic > views do not even support access restrictions (@user_passes_test) and > thus are most of the time proxied via custom one-line views. Look at this:

Re: Apache + Django - syntax error

2007-08-29 Thread daev
Try simple: PythonPath "C:\Python" --~--~-~--~~~---~--~~ 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

Re: Thumbnails for ImageField in admin pages

2007-08-28 Thread daev
On 28, 18:05, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Is there any similar trick or should I modify admin > template for change form? Yes, you have to edit admin page template to do that --~--~-~--~~~---~--~~ You received this message because you are

Re: Thumbnails for ImageField in admin pages

2007-08-28 Thread daev
Try this: image = models.ImageField() def image_thumbnail(self): return "" % self.get_image_url() image_thumbnail.allow_tags = True class Admin: list_display = ( "image_thumbnail", ) --~--~-~--~~~---~--~~ You received this message because you are

Re: How to access upload_to property of FileField in views?

2007-08-27 Thread daev
In view: upload_to = Jewel._meta.get_field( "file" ).upload_to --~--~-~--~~~---~--~~ 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

Re: Accessing data from a tuple in a template?

2007-08-06 Thread daev
http://www.djangoproject.com/documentation/db-api/#get-foo-display --~--~-~--~~~---~--~~ 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

Re: extending django.contrib.auth

2007-08-03 Thread daev
You can create Profile model that can have all additional fields. Then connect it in settings.py to User model with AUTH_PROFILE_MODULE = "profiles.Profile". And you can get per user profile like this: user = User.objects.get( username = "foobar" ) profile = user.get_profile()

Re: schema evolution

2007-07-19 Thread daev
It's great! I have my own schema evolution solution here http://code.google.com/p/django-schemaevolution/. But yours seems to be more powerful. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Authentication for application with subdomains

2007-07-19 Thread daev
It's very simple to implement that application structure. For authentication you must set proper SESSION_COOKIE_DOMAIN variable in settings: http://www.djangoproject.com/documentation/settings/#session-cookie-domain For manage subdomains you can write you own middleware to parse request.META[

Re: Example of passing initial value to SelectDateWidget?

2007-04-29 Thread daev
'2007-04-29' The most simpliest way to solve such problems is to view django source code. On Apr 29, 8:59 pm, Mike Thompson <[EMAIL PROTECTED]> wrote: > Is anyone able to provide an example of passing initial data to the > SelectDateWidget in newforms.extras.widgets (or to the DateField that >

Re: Django Schema Migration

2007-04-29 Thread daev
Here is Schema Evolution Project home site: http://code.google.com/p/django-schemaevolution/ Any feedbacks are welcome daev wrote: > It's very funny but couple of dayes ago I start to write some schema > wvolution framework for django. I've read articles in django-code wiki > abo

Re: Django Schema Migration

2007-04-23 Thread daev
It's very funny but couple of dayes ago I start to write some schema wvolution framework for django. I've read articles in django-code wiki about schema evolution and make some major decisions. I realized that the better way(for me) not to analize application model definition but to analize

Re: block.super

2007-02-12 Thread daev
I think that you can only use {{block.super}}. May be you have to change your template design On Feb 12, 12:09 pm, "Rob Slotboom" <[EMAIL PROTECTED]> wrote: > Sorry that isn't working (at least not in my template ) --~--~-~--~~~---~--~~ You received this message

Re: Use of post_save on newly created objects

2007-02-10 Thread daev
I've write in my project: def create_profile_for_user(sender, instance, signal, *args, **kwargs): try: User.objects.get(id=instance._get_pk_val()) except (User.DoesNotExist, AssertionError): profile = Profile( user = instance ) profile.save()

Re: are the Installed apps settings necessary?

2007-02-10 Thread daev
On Feb 10, 8:41 pm, "canen" <[EMAIL PROTECTED]> wrote: > You don't need INSTALLED_APPS for views, it's more for models if I am > not mistaken, for example, syncdb won't work if your app is not in > INSTALLED_APPS. Yes. Its true --~--~-~--~~~---~--~~ You received

Re: how to set the choices of Select Widget by code in the newforms

2007-02-10 Thread daev
On Feb 10, 8:07 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > how? In my project i have that code: #in some view form_class = AddPostForm #form adds post to the blog form_class.base_fields[ 'category' ].choices = getCategoriesTuple( request.blog ) #sets choices to ChoiceField

Re: new forms - problem populating with data from a table

2007-02-10 Thread daev
On Feb 9, 10:12 pm, "Tipan" <[EMAIL PROTECTED]> wrote: > else: > form=UserAccountForm() > return render_to_response('account.html',{'form':form}) somthing like this: form = UserAccountForm( user.__dict__ )

Re: Multilingual content - yet another idea

2007-02-01 Thread daev
> <[EMAIL PROTECTED]> wrote: > > Well, I was wrong and there was a way around it. I just committed > a new version that displays correct column headers in admin list view. > It does not require any workarounds anymore. > > -mk Thanks. But i still have this problem. Even after update my work copy

Re: Multilingual content - yet another idea

2007-01-28 Thread daev
I have trouble in admin list view. Fields under translation has incorrect column header in list. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to