Skip to content
Advertisement

Tag: django

Django: Not Found static/admin/css

I just deployed my first Django app on Heroku but I notice that it doesn’t have any CSS like when I runserver on the local machine. I know there’s something wrong with static files but I don’t understand much about it even when I already read the docs. I can do python3 manage.py collectstatic to create a static folder but

Specifying both ‘fields’ and ‘form_class’ is not permitted

I have the following form, which I want render it with Django crispy forms. This is my views.py This is my urls.py project main file : This is my medical_encounter_information/urls.py In my forms.py file I have: The template medical_encounter_information/templates/medical_encounter_information/rehabilitationsession_form.html is: When I type in my browser the url http://localhost:8000/sesiones-de-rehabilitacion/nuevo/ I get the following: But, When I type in my browser

How do I merge two django db’s?

I have two instances of the same Django app. I need to merge the data in these DBs to one DB. I considered Natural Key fixtures, but I have many objects whose natural key involves fields from a related model, so they are not being serialized when I am serializing using natural keys. For example This account’s fixture: (notice it

Django: Query Group By Month

How to calculate total by month without using extra? I’m currently using: django 1.8 postgre 9.3.13 Python 2.7 Example. What I have tried so far. and also this one, the answer seems great but I can’t import the TruncMonth module. Django: Group by date (day, month, year) P.S. I know that this question is already asked multiple times but I

how to parse json array in django

I am new in django rest api framework and using get i am fetching the a json array whose api is this https://api.coursera.org/api/courses.v1?q=search&query=machine+learning and i am not able to parse it.Actually i want to store all the names and send them to .html file .I have used this code but didnot worked for me. Answer This actually has nothing to

Advertisement