Top "Django-forms" questions

Specific questions related to forms with the Django web framework

How to add class, id, placeholder attributes to a field in django model forms

I have a django model like below models.py class Product(models.Model): name = models.CharField(max_length = 300) description = models.…

django forms attributes django-forms form-fields
Django: Hide button in template, if user is not super-user

How do you get your template/view to recognize whether or not a logged in user is a super user …

django django-models django-forms django-templates django-users
Django Passing Custom Form Parameters to Formset

This was fixed in Django 1.9 with form_kwargs. I have a Django Form that looks like this: class ServiceForm(forms.…

python django forms django-forms
Create Custom Error Messages with Model Forms

I can see how to add an error message to a field when using forms, but what about model form? …

django django-forms
Best way to do register a user in Django

I'm trying to implement User Registration for my Django app. The book I read mentions UserCreationForm but I need more …

django django-models django-forms
Django: Country drop down list?

I have a form for address information. One of the fields is for the address country. Currently this is just …

django drop-down-menu django-forms country django-widget
How does Django Know the Order to Render Form Fields?

If I have a Django form such as: class ContactForm(forms.Form): subject = forms.CharField(max_length=100) message = forms.CharField() …

python django django-forms
How to detect Browser type in Django?

How can i detect which browser type the client is using. I have a problem where i have to ask …

django django-forms http-headers user-agent
Django BooleanField as radio buttons?

Is there a widget in Django 1.0.2 to render a models.BooleanField as two radio buttons instead of a checkbox?

django django-models django-forms
Django-Registration & Django-Profile, using your own custom form

I am making use of django-registration and django-profile to handle registration and profiles. I would like to create a profile …

python django django-forms registration profile