Top "Django-forms" questions

Specific questions related to forms with the Django web framework

How do I add a placeholder on a CharField in Django?

Take this very simple form for example: class SearchForm(Form): q = forms.CharField(label='search') This gets rendered in the …

python django django-forms
How can I get the file name from request.FILES?

How can I get the file name from request.FILES in Django? def upload(request): if request.method == 'POST': form = …

django django-forms
Django: multiple models in one template using forms

I'm building a support ticket tracking app and have a few models I'd like to create from one page. Tickets …

python django django-forms
How to create Password Field in Model Django

I want to create password as password field in views. models.py: class User(models.Model): username = models.CharField(max_…

python django django-models django-forms
__init__() got an unexpected keyword argument 'user'

i am using Django to create a user and an object when the user is created. But there is an …

python django django-models django-forms django-views
Django: Model Form "object has no attribute 'cleaned_data'"

I am trying to make a search form for one of my classes. The model of the form is: from …

python django django-forms
What is the equivalent of "none" in django templates?

I want to see if a field/variable is none within a Django template. What is the correct syntax for …

python django django-forms django-templates django-views
How to create password input field in django

Hi I am using the django model class with some field and a password field. Instead of displaying regular plain …

django django-models django-forms django-templates django-views
Django reverse lookup of foreign keys

I have a venue, this venue has many events happening there. My models look like this: class Event(models.Model): …

python django django-forms django-views
How do I use CSS in Django?

I am creating my application using Django, and am wondering how I can make Django use my CSS file? What …

css django django-forms