Hi all,
I'm running Django 1.7 and Python 3.4. I'm trying to make the username
field of my custom model to be read-only. I think this is usually set in
the form. Below is what I currently have in my *forms.py*
class AuthUserChangeForm(UserChangeForm):
"""
A form for updating users. Includ
Is this a bug in the Django tester?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email
thanks for your answer.
yes, I just tried that. Same result.
By now, I have understood much more about the templates.
But still, for the admin pages
mysite/templates/admin/base_site.html
doesn't work yet.
I have actually found more errors in the tutorial:
https://docs.djangoproject.com/en/1.7
I'm not sure if a syncdb changes the null attribute of a field at the DB
level, I think you need to make a migration for that.
Either way, it would be useful if you could post the declarations of the
form and the model to see if everything is ok.
On Sun, Nov 16, 2014 at 2:51 PM, elcaiaimar wrote
Obviously you've restarted the server and refreshed the page in such a way to
ensure it's not a caching issue ?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
I am working through https://docs.djangoproject.com/en/1.7/intro/tutorial02
so far all went fine - but now *templates changes just don't work.*
I think there must be a flaw in that tutorial, something missing,
or something different in django 1.7.1 ?
https://docs.djangoproject.com/en/1.7/intro/t
Hello everybody, I've a problem with DecimalField at Forms. I've a long
form in my template and I want to left some fields in blank. I've declared
these fields with
*required=False*, but when I submit the form I receive this error: '*This
value must be a decimal number*'.
I've tried to declare
I understand the problem. Why doesn't the Django tester provide time zone
aware date times? I know if I set "USE_TZ = False" the warnings will
disappear. I was looking for another solution. Could I conditionally
set "USE_TZ = False" only when testing?
--
You received this message because y
I want the default modB localField value to be the modA wantedField value
corresponding to the foreign key. This would gives :
class modA(models.Model):
wantedField = models.CharField(max_length=9)
[ ... other fields ...]
def asDefault():
return wantedField
please post the exception or the error page you are getting.
in any case this seems right to me, on the staff page you inline the
location, you are complaining that you can only choose the FK of that
location to customer and not staff, well, the staff FK is obviously the one
you are editing/creati
Whoops, I referenced the docs for the Model save() function, not the
ModelForm save() function. The signatures should be updated:
def save(self, commit=True):
rather than:
def save(self, *args, **kwargs):
The super() call would also need to be modified accordingly:
def save(self, commit=True):
I understand that the the 'extra fields' are not part of the main model.
However, without either providing a save() method definition somewhere,
those fields will never be saved. Take the example I posted previously:
class ModelFormMixin(forms.ModelForm):
extra_field_1 = forms.CharField(requir
12 matches
Mail list logo