Questions tagged as 'django'

1
answer

How to register an array of data in Django

I have an array of data in my session storage related to products in a store, and I would like to register a sale as soon as the user registers all their products and clicks on the end of the sale. This array of products is gaining a line wit...
asked by 26.10.2015 / 13:27
1
answer

Problem importing from User models

I'm doing some testing on a Django project, I've created a very simple module just for testing myself. Follow below: from django.contrib.auth.models import User def teste(): for i in User.objects.all(): print i.username if __name...
asked by 12.05.2014 / 17:04
1
answer

Searching for a field contained in several models

I have a manager in my project, which is to do TAGS, and on the front of my system the user will search for a tag, and it will return everything related to that tag. Follow the models.py: from django.db import models from django.utils impor...
asked by 20.11.2018 / 19:05
1
answer

Page Display Error - Django

In Django I'm developing a Library project! (I'm new to Django, I've never worked with web development) In summary, I have a model library and a model book in the models.py file, in the Model book there is a ForeignKey Library. The entire...
asked by 15.05.2014 / 20:42
2
answers

Django - How to redirect the user to the other pages of the application?

In the template menu I have a menu Dropdown with the links to the other pages application! In the home page of the application I have the links to the other pages of the application! Ex: Home, Reports, About ... All are link's that sho...
asked by 16.05.2014 / 20:10
1
answer

What is a migrate? [duplicate]

I'm a beginner in the django world and one of the first things I find in tutorials is the term migrate I'd like to know what that means, how to use it and what it's for.     
asked by 02.02.2018 / 00:31
1
answer

Field handling in the Model before writing to the database (Python + Django)

I am trying to perform a password encryption using Python 3.7 and Django 2.1. Looking at the Python documentation, Django and some answers here in StackOverflow, I came up with the code as follows, however, the password field is written blank...
asked by 31.08.2018 / 13:46
1
answer

Python, Django with multiple databases

To work with several databases in the Laravel framework, once you have configured all the connections in the configuration files, simply define in the model which connection to the database that model will use, and then regardless of the operati...
asked by 17.12.2017 / 22:25
1
answer

Error in html django?

Good morning, I have a small problem to reference my variable in django html. I'm a beginner on the web part, I'm trying to create a website for a project, then during the construction of the html, I tried to make a reference for my view.py, but...
asked by 18.08.2017 / 15:53
1
answer

Django collectstatic AWS S3

I have a question regarding collectstatic . I'm using Amazon Free Tier and realized that I've exceeded the S3 PUT usage limit because I made several collectstatic . I was developing one day in the Amazon environment due to laziness a...
asked by 13.07.2017 / 21:57