django-forms
forms_for_model() and forms_for_instance() are deprecated how do I use ModelForm subclass Instead?
models.py class Person(models.Model): userID = models.ForeignKey(User, unique=True) name = models.CharField(\'name\', max_length=200)[详细]
2023-04-02 20:19 分类:问答Django: How to prepopulate file upload path with current file path?
I have a modelform that my views generate an HTML form for editing content. Currently, it\'s able to pull in the current stored text content, like this:[详细]
2023-04-02 16:04 分类:问答How to take value from UserProfile if it exist in another modelForm as default value
I have UerProfile defined and need to take phone data for MyForm class UserProfile(models.Model): ... phone = models.CharField(max_length=20, blank=True)[详细]
2023-04-02 15:56 分类:问答GET Formset returns 302 instead of 200 (django) [closed]
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time,or an extraordinarily narrow situation that is not generally applic[详细]
2023-04-02 15:26 分类:问答django model form
I have a very simple model form, but for some reason, 开发者_运维问答the code fails to syncdb and throws an error: AttributeError: \'module\' object has no attribute \'CharField\'[详细]
2023-04-02 08:04 分类:问答Saving multiple forms efficiently using Django's Form Wizad and the issue of missing list indexes
I\'m using Django\'s Form Wizard in my app. There are five forms in total however only three or four can be submitted, as two of the forms can be skipped based on a particular condition or from the tw[详细]
2023-04-02 01:53 分类:问答How to return JSON in django
I want to return only JSON data for this view method and I\'m not sure if I\'m doing it t开发者_JAVA百科he right way. Any tips would be greatly appreciated.[详细]
2023-04-02 01:19 分类:问答Django Custom ChangeUserForm setting is_active, is_staff, and is_superuser to False
I have a custom ChangeUserForm (ModelForm on User) that allows a user to update their account information.[详细]
2023-04-02 01:05 分类:问答django login not showing error message
I have a regular django login page but for some reason if I enter the wrong login information it\'s not showing the error messages and it just refreshing the page. Any ideas?[详细]
2023-04-01 22:18 分类:问答Django forms - append to class meta exclude and widgets
Is it possible to append to the exclude or widgets variables of an inherited Form? I have the following set up so far.[详细]
2023-04-01 21:55 分类:问答