Questions tagged as 'django'

1
answer

Error creating admin user Django 1.11

I'm trying to create a user admin , but it always returns me the error below. What can be happening? I'm using the following settings: Ubuntu Server 14.04.5 LTS, Python 3.4.3, Django 1.11. Any help will be welcome. Username (leave...
asked by 08.06.2017 / 16:08
3
answers

ValueObjects Django

Good morning, I'm starting now with Python and Django and I had a question about the creation of my models. I'd like to create something like: Person (models.Model) Name ... Address Address () Backyard Neighborhood ... T...
asked by 11.08.2016 / 18:18
1
answer

Include in the head tag Djanto Templates

I have the following files: base.html : <!-- base.html -- --> <html> <head> <title>Title</title> {% include "head.html" %} </head> <body> Body </bo...
asked by 04.01.2016 / 14:13
1
answer

problem installing Django

I downloaded Django and unpacked it on the desktop I went to Cmd I typed cd desktop shortly thereafter Django-1.6.2 > python setup.py install to install it, the following message appears:    'python' is not recognized as an inte...
asked by 31.12.2015 / 14:55
1
answer

Total and subtotal in django template using lists

How do I calculate the subtotal and total per store (store) in the view to play the results in the template? In case I'm using lists. def quotation_list(request): stores = list(Store.objects.all()) products = list(Product.objects.all()...
asked by 06.12.2015 / 07:31
1
answer

Forms Session

What I did I have a view that calls a template with a form. In a certain case, I need to save some data in the session scope and send it to another url - which will call another view and another template. My Problem I created the sessio...
asked by 11.12.2015 / 14:02
1
answer

Integration AngularJS and Django forms to write data [closed]

How are you handling the integration frameworks in JavaScript with forms
asked by 01.10.2015 / 19:53
1
answer

How to return objects num many to many Django

Consider the template class Dealership(models.Model): dealership = models.CharField(max_length=50) class Ordered(models.Model): customer = models.ForeignKey("Customer") dealership = models.ManyToManyField("Dealership") status...
asked by 16.06.2015 / 04:39
1
answer

Improving the return of a specific result

I think I'm unlearning the basics! I have a result that returns only one element in the dictionary: [{'quant': 236, 'district': 'Centro'}] My context is: context['Districts'] = d As I do in the template I write something like {{ D...
asked by 07.06.2015 / 04:24
2
answers

Can you upload to a subfolder using FileField?

When I set a FileField (or ImageField ), I have to specify a upload_to : campo1 = models.FileField(upload_to="uploads") campo2 = models.ImageField(upload_to="img/%Y/%m/%d") In the first case, all files go to the "uploads"...
asked by 24.07.2015 / 20:51