Questions tagged as 'django'

2
answers

Django: error in configuring url's

I'm Using django in its version: 1.11.4 python 3.6 in linux debian I have the following files configured in settings.py INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes',...
asked by 08.03.2018 / 06:49
1
answer

Apache serving Django and Wordpress simultaneously

I have a website created in Wordpress that is in /var/www/sitio1 that is all right, this site is on port 80 and its address is ejemplo.com . Now, I have another site created in Django that is on port 8000, located in the /var/...
asked by 30.05.2016 / 18:04
1
answer

How to call parts of my html template in django?

Do I want to call parts of my html template in my view? something like this $ ticket_date = $ this- > input-> post ('ticket_date'); in php, but I do not know how to do it. Someone knows, please help me     
asked by 12.08.2016 / 20:54
1
answer

Return in a ListView information of 2 models filtered by the authenticated user

Hi, I'm new to django and would like to know how I can return the information of an authenticated user of 2 models in a ListView This is my code: models.py from django.contrib.auth.models import User class ModelOne1(models.Model):...
asked by 20.08.2018 / 17:35
1
answer

Invalid HTTP_HOST header using Nginx and Django

I have an application developed in Django 1.7, to serve the application I am using Nginx, Gunicorn and Ubuntu server 12.10. Django notifies me several times a day with the following log: Invalid HTTP_HOST header: 'testp5.mielno.lubin.pl'. You...
asked by 23.01.2016 / 20:06
1
answer

Permissions error when wanting to upload documents in django using apache in redhat

When wanting to publish my website on a redhat server with apache, I can not write data on the bd, I followed this tutorial: link I already tried giving it permissions with chmod 755 db.sqlite3, I also tried as owner of the directory and...
asked by 08.04.2018 / 12:59
2
answers

Retrieve related field in another table

I am using django 1.10, with python 3.5 in Windows 8.1. I have a database that considers fields on an element (Work), in another table (Modality) I have the identifier and the description of this Modality, but in Work, I only have saved the valu...
asked by 01.06.2016 / 01:23
1
answer

Views and render () in Django

I am learning to use Django (specifically version 1.9). However, when creating a view, and when starting the Django server, I have the following error: TypeError: render() takes at least 2 arguments (1 given) What I do not understand is, wh...
asked by 15.12.2015 / 20:51
1
answer

Get the duration of a video on django

Hi, I would like to know how I get the duration of a video on django. I will show you what I have so they know what I have tried I've tried using these examples: link but you can not because those codes receive the name of the file as a...
asked by 21.08.2016 / 22:44
1
answer

Show items while typing in the search engine in django with ajax

In link this is a search engine that shows some results while typing in it. But now what I want is that it does not show those results if I do not change the list of spells while I'm typing there. Something like what google does, I think it is...
asked by 23.09.2016 / 14:58