Questions tagged as 'django'

2
answers

python manage.py syncdb does not work!

When you try to follow a tutorial I can not continue because the bank was not created, can you help me? Error: Unknown command: 'syncdb' Type 'manage.py help' for usage.     
asked by 02.03.2017 / 01:49
1
answer

Django does not render static files that are in subfolders within / static /

I'm working on a Django project that has static files (css / js / imgs) in the following structure: File Structure django_project | +apps | +django_project | +media | +static |...
asked by 30.01.2017 / 15:11
1
answer

Upload and view PDF's Django admin

I want to ask a question, I'm trying to upload a PDF file, in django, and I wanted to know if you how do I view this pdf, I have the following code: models.py class Edital(models.Model): # ... class DataFile(models.Model): Arquiv...
asked by 08.02.2017 / 06:39
1
answer

Creating a form that has the pre-set choice

I want to throw an item on as expense or revenue for that I did; from django.db import models # Create your models here. class SubCategoria(models.Model): ESCOLHA = ( (u'1', u'Receita'), (u'2', u'Despesa'), ) categ...
asked by 28.11.2016 / 13:49
2
answers

Popular select a partit from another select using python and django

Good night, I'm new to the forum, and I started doing a small project with python and django. I'm trying to fill a select according to the selected option in another. But since I'm a beginner, I do not know how to do that. <div class="form-...
asked by 27.02.2017 / 00:10
1
answer

Specific Url in Django

I am rewriting a website using Django. This is a blog and I need the urls to be the same as the old site so that the site does not lose ranking in the search engines. What would be the best way to handle this problem?     
asked by 15.02.2017 / 20:23
2
answers

how to save objects in django with quantity validation?

I'm still a beginner on Django and would like to know how I would save a certain amount of students on jobs. Example: vagas = 5 , how do I allow only 5 students to be saved? class Turma(models.Model): descricao = model...
asked by 22.11.2016 / 13:55
1
answer

How do I allocate a Python project (Django) to a ready and configured server? (Apache, MySQL, Python, Django OK)

I have a server ready and fully configured. Python, Django, Apache, MySQL, all OK. I would like to replicate an existing project on this server for testing. The files and database are already replicated, however, when accessing the project fo...
asked by 24.08.2016 / 15:33
2
answers

Django rest and angularjs error cors

I'm using django rest and angularjs 1.x in a project, in case this backend and frontend project are isolated, I'm using a gulp server to run angularjs, but when I try to access the api rest through the $http.get of the angle, the browser...
asked by 23.07.2016 / 03:35
2
answers

how to override the save method of models

I'm trying to override the save method of models so that when a new workbook is created it will be saved and exported immediately to a .json file, this would be a form of automatic backup, but when you register a new workbook it exports all the...
asked by 21.04.2016 / 00:14