Re: does anyone use models with underscores in the name?

2016-10-03 Thread Constantine Covtushenko
I am using such names in one of my project. I found it very helpful for audit like fields: _cr_date and _cr_user Regards, Constantine C. > On Oct 3, 2016, at 19:30, Tim Graham wrote: > > Ticket #27295 notes that the ORM doesn't work well with models that start > with a

Re: Challenge teaching Django to beginners: urls.py

2016-09-12 Thread Constantine Covtushenko
Hi Emil, It is a very interesting idea. +1 from me On Mon, Sep 12, 2016 at 11:32 PM, Emil Stenström wrote: > Hi Djangonauts, > > I'm just back from my second year of teaching Django to absolute > beginners. The course is a combination of HTML, CSS, Python, and Django, > and after five days of

Re: Add an optional parameter to values() that returns a nested dictionary for foreign keys

2016-08-19 Thread Constantine Covtushenko
Agree with Loïc on 100%. And also it opens more options in the future. Regards, On Fri, Aug 19, 2016 at 9:58 PM, Loïc Bistuer wrote: > I prefer enforcing .values(alias=F(’something’)), to me > .values(alias=‘something’) reads as the equivalent of .values(alias=Value(‘ > something’)). > > -- > L

Re: Blank choices

2011-07-24 Thread Constantine
we could simply pass blank_choice in kwargs here https://code.djangoproject.com/browser/django/trunk/django/db/models/fields/__init__.py#L429 -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develo

Blank choices

2011-07-24 Thread Constantine
Hi For ChoiceField, TypedChoiceField we can't specify blank label for choise field in ModelForm or single Field Here ticket https://code.djangoproject.com/ticket/13086, here old discussion in user maillist http://groups.google.com/group/django-users/browse_thread/thread/f40d160714346979 -- You

Re: proposal Meta.exclude in Form

2011-04-20 Thread Constantine
i've workaround this overloading init, so the other way exist. But i surprised when not found meta class in simple form (model and modelform have) On Apr 20, 3:00 pm, Xavier Ordoquy wrote: > Le 20 avr. 2011 à 09:22, Constantine a écrit : > > > On Apr 20, 12:26 pm, Xavier Ordoqu

Re: proposal Meta.exclude in Form

2011-04-20 Thread Constantine
On Apr 20, 12:26 pm, Xavier Ordoquy wrote: > Le 20 avr. 2011 à 05:57, Constantine a écrit : ... > Actually, I don't understand. > If you need object creation, ModelForm is the way to go. unfortunately ModelForm is not suitable > You could also take it the other way. Base form

Re: proposal Meta.exclude in Form

2011-04-19 Thread Constantine
generally it's lack of Meta subclass in simple form, in which we can configure fields order, exclusion of some fields etc. Now i should override __init__ method, its not so declarative way as in modelform -- You received this message because you are subscribed to the Google Groups "Django develo

proposal Meta.exclude in Form

2011-04-19 Thread Constantine
FormModel have exclude attribute in Meta, but simple Form doesnt: example usage: i need base form for editing with many fields, and derived form for object creation with subset of fields and so i want to exclude unnecessary fields -- You received this message because you are subscribed to the Go