Questions tagged as 'django'

1
answer

Many-to-Many: Django Template and Template

I have the following situation: - Budget - Product - Budget Items I searched for the Many-to-Many relationship in Django (1.10), so create a Template a Multi-Select. But if I need to, for example, inform the quantity of the product in t...
asked by 21.11.2016 / 15:23
2
answers

Django Custom Template Tags

Good afternoon, recently I have a problem in the Django framework, I have a problem in my custom template tag, I do the method in a .py file and I call it in templates and it does not display the result I want, can take a look please? Follow...
asked by 06.06.2016 / 22:59
1
answer

How to implement "foreign key" using Micro Services architecture? Django

I am trying to build a system using the micro services architecture, I came across the problem about dependency, in the case how to implement chave estrangeira using this architecture? I'm using Django Example The class pedido...
asked by 25.04.2016 / 22:57
1
answer

Django: Reverse for '' not found. '' is not a valid view function or pattern name

I'm trying to put a url based on my views.py but it returns me the error: Reverse for 'create_student' not found. 'create_student' is not a valid view function or pattern name. project urls.py: from django.contrib import admin...
asked by 20.08.2018 / 21:43
2
answers

Doubt when doing a ranking using django!

I'm making a game site using django and I want to do a ranking based on the score of all users! For now it looks like this: views.py : def index(request): perfis = Perfil.objects.all().order_by('-pontuacao_ultima') return render(re...
asked by 09.02.2018 / 00:38
1
answer

Django 1.11. Serving files like robots.txt, sitemap, etc.

I need to know how to serve these files that usually go to the root of the project. I'm making a route to each of them in the urls.py file but it does not seem to me the correct way. What is the right way?     
asked by 23.01.2018 / 13:59
2
answers

Error when creating a Django simple table?

class Produtos(models.Model): #id = models.AutoField(primary_key=True) nomeproduto = models.CharField(max_length=50, blank=True, null=True) quantproduto = models.CharField(max_length=30, blank=False, unique=True) status = models...
asked by 22.06.2018 / 15:43
1
answer

IDE for django? [closed]

Good evening, guys, I'm having a lot of problems with some ides, and I need your advice. I'm trying to program web projects in python, so I installed pycharm to work ... The beginning is a great IDE, but it seems that the world neither makes use...
asked by 17.08.2017 / 03:20
1
answer

Scheduling Tasks in Django

Galera is as follows, in Django things only happen when some user accesses your application. AN EXAMPLE ) Let's say you've created an application where the user logs in and writes little reminder texts, more or less like a post-it, for...
asked by 12.05.2017 / 15:21
1
answer

Django, configuration data format 'd / m / Y' [duplicate]

I can not change the Django configuration so the date format is set to 'd / m / Y'. In the validation of the form, if you inform 22/12/1980, the form is invalid. By informing 12/22/1980 the date field is valid and I can save the record. I'v...
asked by 01.05.2017 / 14:47