On Nov 13, 11:55 pm, Ric wrote:
> the field class define this code
>
> def formfield(self, form_class=forms.CharField, **kwargs):
> """
> Returns a django.forms.Field instance for this database Field.
> """
> defaults = {'required': not self.blank,
>
yes but definitely not the current code, because i cannot subclass
with super
On 14 Nov, 15:46, ptone wrote:
> On Nov 13, 11:55 pm, Ric wrote:
>
>
>
>
>
>
>
>
>
> > the field class define this code
>
> > def formfield(self, form_class=forms.CharField, **kwargs):
> > """
> > R
There's merit in both the responses.
Since it's trivial to write your own transaction middleware, I would say
the most important thing is to document that the middleware only affects
your 'default' database. Then it's up to the developer to decide if they
need anything further.
On Sun, Nov 13, 2
I am wondering about how to properly close connections if you use the
ORM outside requests. For requests this is done in django/db/
__init__.py:
"""
# Register an event that closes the database connection
# when a Django request is finished.
def close_connection(**kwargs):
for conn in connectio
a minor bug in django admin.
in django.contrib.admin.options mark_safe is called to render media.
in add_view and change_view we can find mark_safe(media)
in changelist_view media is injected as an object (without mark_safe)
i propose to pass the media object to the template (without
mark_safe),
form_class is not in kwargs if the method is declared like this
def formfield(self, form_class=forms.CharField, **kwargs):
a possible solution is to use a code like this
def formfield(self, **kwargs):
form_class = kwargs.pop("form_class", self.choices and
forms.TypedChoiceField or forms.Char
On 14 nov. 2011, at 23:15, Ric wrote:
> a minor bug in django admin.
Could you open a ticket in our bug tracker?
https://code.djangoproject.com/newticket
Thanks,
--
Aymeric Augustin.
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To