This shouldn't be hard How to show in a Django Model Form just the related records from Model.B for the user to choose. Ginven that it is provided the Model.A a
class example(models.Model): var1 = models.IntegerField(default=0) var2 = models.IntegerField(default=0) var3 = models.IntegerField(default=0)
For example my name is David and my friend is Daniel. I want to show these two names in their first letter wise . Item has a 'name' field. In the template I wan
can any one help me with assigning value to a foreign key field. Im trying to create user profile where user can add there countries. when creating the models,
I want to save data from the Django model to PostgreSQL database with: mymodel.objects.create(title='test') this model only has title and id but it raises th
I have been trying to create a requirements.txt file from the Pycharm terminal but it is adding all unnecessary packages as well. What should I do to show only
I wanted to use HTMX to show messages from django backend after a lot of trial and error I ended up with a working solution, that I want to leave behind for any
I am still very new to Django and I want to add the HTML for a navigation bar and its respective CSS into my base HTML file. Here is what I did up till now: in
I'm getting this error anytime when creating a new project in pycharm: Cannot run program "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.
I am using custom renderer class by default in settings.py. For api I check query parameter "page", if it exist then I paginate result else return normal respon
I am still very new to Django and I want to add the HTML for a navigation bar and its respective CSS into my base HTML file. Here is what I did up till now: in
I am using Django restframework and I am trying to export excel. My issue is the process is take a lot of time till it generates the excel file. The final file
I'm deploying Django in Google App Engine. I get 502 Bad Gateway and in the log I get the following error: 2021-03-08 12:08:18 default[20210308t130512] Traceb
I can render media files for a django form, through a custom widget, like this: class TinyMCEWidget(Textarea): def __init__(self, attrs=None): if a
I link css to html on vs-code. center-aliend doesn't work here. Is there anyone who knows what part is wrong? I want to set the text 'Hello Static!!' to the cen
I am making an application in Django, where I have a main (index) page displaying a number of objects styled with CSS. The CSS is in a static file. When I do no
Hi Everyone i am creating api for partially update record, but getting error [patch() missing 1 required positional argument: 'id'], please help me out views.py
Imagine there is a model: class OrgUnit(models.Model): name = models.CharField(...) type = models.CharField(...) address = models.TextField(...)
I have a site that needs some custom styles in Django and I can't get the static file to load. I have a static folder inside my main folder - The one where mana
I created a django project and want to share it with my team members, however in the settings files it contains some passwords for the database etc. Of course w