Questions tagged as 'django'

2
answers

Django Rest Framework without styles or scripts

Once I have the API working, when I enter the graphical environment ( domain.com/API ) of tests I get no styles, meaning that all < a href="/ questions / tagged / css" class="post-tag" title = 'show questions with the tag "css"'> css and the...
asked by 11.05.2016 / 15:45
1
answer

Problems with Image Link

I created a model called worker that has a field called signature where I'm uploading the signature digital in an image: class Trabajador(models.Model): usuario = models.OneToOneField(User) dni = models.CharField(max_length=8,p...
asked by 10.05.2016 / 17:29
2
answers

Format Date to Save Form

Good afternoon, I have a view based on Form View: class CrearPuesto(FormView): template_name = 'crear_puesto.html' form_class = PuestoForm success_url = reverse_lazy('administracion:maestro_puestos') def form_valid(self, form)...
asked by 04.05.2016 / 22:28
2
answers

CMD executes tasks in a separate window, how to do it so that it can be executed again in the main window?

Working with Django in the CMD suddenly now executes all the processes in a separate window causing several inconveniences. I need you to do them again in the original window as you always did.  I chose to illustrate the case the typical "manag...
asked by 28.06.2016 / 11:00
0
answers

How to call a zeep python service?

I'm trying to connect to a SOAP service with the Zeep library. I have a function that mocks the data and makes the call: def cotizacionGuia(self,valor_declarado): wsdl = 'https://redservipruebas.almalogix.com/distribucion/webservices/ws...
asked by 28.03.2018 / 12:26
1
answer

Function-Based Views (FBV) VS. Class Based Views (CBV)

When creating a project in Django, let's say, of relative complexity and size, I have always been inclined to use FBV since I find them easier to use. Some say that it is better to use CBV because they have some advantages such as the inheritanc...
asked by 02.12.2015 / 13:34
1
answer

Show the selected data of a select in a textarea

I am new to programming at Django, please if anyone can help me, I appreciate it. I have a select where the options are the objects stored in the database of a model called Tema , what I want to do is show the attributes of the m...
asked by 29.03.2016 / 20:56
2
answers

Select dependent on Django?

How do I place four select to my template that show state, municipality, location? and of course, if the user selects the state DF, the other select only brings the municipalities and localities. How do I do it? In order to save them al...
asked by 04.01.2016 / 18:07
2
answers

Modify the Django user model

Django has its own model for managing users for login, I would like to know if this can be modified. The idea is to add some fields such as user type, mail, dependency, city, etc.     
asked by 19.04.2016 / 14:25
1
answer

Go through the dictionary in the template

I have the following view: from django.shortcuts import render def ini (request): dic = {"nombre" : "Mauro", "apellido" : "London", "sexo" : "M"} return render(request, "ini.html", dic ) and the ini.html: {% extends 'base.html' %...
asked by 11.10.2018 / 01:56