Questions tagged as 'django'

1
answer

Use Twig tags with React Js

I'm using Django that uses Twig to render the templates. What I want to do is put an item that Django uses in the React code as follows: var usuario = {{usuario}}; But he will not let me. There is not any kind of tag {verbatim} that canc...
asked by 24.11.2016 / 00:46
1
answer

Python / Django warn that your session is going to expire

I have a cookie that has been defined: SESSION_COOKIE_AGE = 3600 And I would like to warn the user when it will expire. What is the best way?     
asked by 15.11.2016 / 10:07
1
answer

Using WSGI with python 3.5

Good afternoon I need help to get an application running with django 1.8 and python 3.5 on an ubuntu server (Edit :) They are installed libapache2-mod-wsgi-py3 and enabled the a2enmod wsgi The code is located at: /var/www/html/ri...
asked by 16.01.2017 / 21:13
2
answers

Download a PDF in Django

Hi, any suggestions to download a pdf file I have the following model where I keep the files: class Archivo(models.Model): archivo_pdf = models.BinaryField(null=True, blank=True) nombre = UCharField(max_length=30, null=True, blank=True...
asked by 21.10.2016 / 00:17
1
answer

Django get info on the same page without showing the pk in the url

I hope you can help me, I am trying to see information from the database but without moving the url. When I access the list I get, for example, a list of books and when I click on the details of the book, I enter it in detail, however when I...
asked by 17.09.2016 / 00:41
2
answers

can not import name commit_on_success, Mockups in django 1.9

I installed Mockups in django 1.9, initially I sent the error: ImportError for import_module and I solved it with: link now I get another import error: File "/home/alejandro/django190/local/lib/python2.7/site-packages/mockups/management/comm...
asked by 31.08.2016 / 04:57
1
answer

Install pymdeco in django

How can I install pymdeco in django, django I have it installed in a virtual environment, install pymdeco in my machine via pip but when I try to install pymdeco with pip in the virtual environment I can not use pymdeco. How to install pymdec...
asked by 21.08.2016 / 00:25
1
answer

help with Django Models

I am new in the programming field and I am learning django and python at the same time. I want to create a database with three tables. project, parts and processes. A project can have several pieces, but a piece can not belong to several project...
asked by 19.12.2016 / 23:11
1
answer

Create a model with a ForeignKey and another field

I wish you a good start to the week and I take this opportunity to ask a question about the implementation of my model in django 1.9 using mysql: I have a catalog of authors and each one has a unique id, each author participates in one or sev...
asked by 25.07.2016 / 21:59
1
answer

How to include an annotate field in filter Django?

I'm trying to make a filter with the field total_clasificacion , but It gives me the following error.    NameError: name total_classification is not defined listado_facturas = Clasificacion.objects.filter( Q(factura__cliente=1)&a...
asked by 14.09.2016 / 17:44