Questions tagged as 'django'

1
answer

Django: How to add fields to a model from another module

I have worked with an ERP (Open Object) in which modules that affect module models are added, which allow us to add functions and fields. In django something similar is possible through Meta.proxy but this limits the possibility of creating new...
asked by 30.11.2017 / 22:30
1
answer

python function with django

Good morning, I'm starting to use Django and well I have a problem, and I'm not able to call a function that I created in python through a button and / or a href. In my views.py file I have the method that I want to execute when I click on th...
asked by 28.12.2017 / 16:27
2
answers

Optimize django by eliminating duplicate querys

I am trying to get the number of products that each category has, but each category is in turn the father of other categories, so I want to know how many children that category has and their daughter categories, I have simplified the query to th...
asked by 26.12.2017 / 12:46
2
answers

pk of an object in a CreateView with views based on Django classes

Cordial greeting. I am in a table with users and when clicking I need to take the pk of the selected user to a form where a book will be created, so that this book is related to the user. How can I do this process or how does it work? m...
asked by 26.01.2018 / 22:42
2
answers

Finder in Django administrator

In the django administrator, is there any way to enable a search engine? You have a button to add a record, but when these records are too many, it is too late to find a record to modify or delete. In the image 14 thousand records are shown,...
asked by 27.01.2018 / 03:19
0
answers

Failed to raise the server with Composer and django

I'm following the tutorial to raise django in a docker container on this page, django-docker , I can configure the system as it indicates but at the moment of lifting the server with docker-compose up it throws me the following result:...
asked by 22.11.2017 / 02:54
0
answers

Datepicker Range Javascript and Django

I try to use the DatePicker tool from link in my project Django I wish that the date entered by the user was sent with method POST in my view, the problem is that I do not know anything about javascript and this is...
asked by 28.11.2017 / 15:05
0
answers

What is the equivalent of debug: Symfony router in Django?

I would like to know if for Django and / or Django Rest framework there is a command that returns all the routes that are in my application. I'm looking for something similar to the one returned by the Symfony debug:router command, whe...
asked by 14.11.2017 / 15:57
1
answer

Receive pk of an object in a CreateView Django

How can I get in a CreateView the pk of an object to assign it to another that has a ForeignKey field. Model.py class Manga(models.Model): author=models.ForeignKey(settings.AUTH_USER_MODEL) title = models.CharField(max_length = 10...
asked by 11.11.2017 / 23:12
0
answers

Upload Django Project to the Server CPanel

Hi, I created my project in django and I already had a web, in this web I have a link that should go to the project / admin to log in, I uploaded the folder of my project and unzipped it but when I click em it says error 504 I do not know if it...
asked by 05.11.2017 / 15:26