This solved my problem
On 9 sep, 12:18, Carlton Gibson wrote:
> On 9 Sep 2010, at 12:04, bagheera wrote:
>
> >> On Sep 8, 11:14 pm, maroxe wrote:
> >>> Hi, In my models I want to have an optional field to a foreign key. I
> >>> tried this:
>
> >
Hi, I am suffering whereever i try to do something in django that is
not common(in django, not in python in general)
For example, i don't know how to return an inclusion tag. This.
obviously, won't work:
@register.inclusion_tag('template.tpl')
def myinclusiontag(parameter):
return {'var': par
Hi, I am trying to understand an other magic thing about django: it
can convert strings to modules. In settings.py, INSTALLED_APPS is
declared like that:
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
)
All it contains is strings. Bu
Hi, There is something i don't get in django template system. I have a
FileField in my model called myfile. If i pass an instance of my model
to a template, i can access file.size (this is an example). Form where
this variable 'size' come from?? it's not part of the FileField class
as far as i know
Hi, In my models I want to have an optional field to a foreign key. I
tried this:
field = models.ForeignKey(MyModel, null=True, blank=True,
default=None)
But i am getting this error:
model.mymodel_id may not be NULL
i am using sqlite edit: if it can help, here is the exception
location:
Hi, When using Model class like this:
class MyModel(models.Model):
def __init__(self, *args, **kwargs):
self.myfield = models.Field()
super(MyModel, self).__init__(*args, **kwargs)
It doesn't take into consideration myfield(in the admin form, when
saving the object... )
But if
The problem occurs only when using AuthenticationForm!
On Jul 11, 4:14 pm, maroxe wrote:
> Hi all,
> I have a problem with django 1.2:
> is_valid returns always False, and form.errors is empty.
> I use AuthentificationForm provided by django.
> I have created a bou
Hi all,
I have a problem with django 1.2:
is_valid returns always False, and form.errors is empty.
I use AuthentificationForm provided by django.
I have created a bound form:
form = AuthentificationForm(request.POST)
and this request.POST:
I believe it's a probleme related to django new securit
8 matches
Mail list logo