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
I created a model(AnalysisFieldTemplate) with a foreign key to AnalysisFieldRule. What i want is to have the possibility to leave the field display_analysis_fie
I am using the visual studio code for the basic Django project and whenever I try to run the server it gives the error Page not found (404) Request Method: GET
I'm trying to create a virtual environment for my current Django project using python3 -m venv env however the command doesn't create any directory with bin/
Suppose I have an object: survey = Survey.objects.all().first() and I want to create a relationship between it and a group of objects: respondents = Respond