Questions tagged as 'django'

1
answer

Set as default User logged in on the model | Django + Python3

I'm trying to learn Django, and with that I'm trying to create a simple ticket system. I've made a lot of progress in my studies, but now I'm packing on the following problem. How to do by default when saving a ticket, does Django save the...
asked by 23.02.2017 / 15:12
1
answer

Django without model visualization in the common user admin even having permissions and being in the same group

Good afternoon, So I am trying to give permissions that already comes in django to an ordinary user who even belonging to the group can not access the models that is granted to it. Someone had this problem of not viewing models in admin. version...
asked by 03.03.2017 / 19:02
2
answers

Rename application in Django Admin

Good night guys, I'm trying to rename the application in django admin according to the documentation, but it did not work, I think I'm doing something wrong, the code is as follows: players control / apps.py from django.apps import AppCon...
asked by 10.02.2017 / 22:28
1
answer

Error while running migrated project from django 1.7 to django 1.10

I'm migrating a project made in django 1.7 to django 1.10, when I try to run the project I get the error:    The view core.config.views.home did not return an HttpResponse object.   It returned None instead. So I could understand this and...
asked by 03.01.2017 / 23:34
1
answer

How do I create 2 forms simultaneously Django

What I want is in a single templante bring these 2 forms simultaneously, in separate pages works, but the two together still could not do. Do I need to do an intermediate form? Am I doing wrong at some point? ... forms.py from django import...
asked by 19.12.2016 / 12:28
1
answer

Inheritance of templates with django

I'm having a problem with applying temeracy to django. Apparently this is all right however my html child is not rendered in the template base.html <!doctype html> {% load static %} <html lang="en"> <head> <meta cha...
asked by 19.12.2016 / 22:32
0
answers

Email attachment with file upload in django

I need to send a request.FILES file from a File field as an attachment in the email. I'm following a topic that teaches this, but it's not working out. Django for my project is 1.5 I'm doing the following: def send_templated_email(sub...
asked by 24.01.2017 / 18:12
1
answer

How to extract data from a Django QuerySet

I have a table with some information, the name of the employee, pis, date and time, the time field records the time of the record in the point clock, these records are all in the same column, for example: Employee 1, has four check in, check in,...
asked by 21.11.2016 / 21:24
1
answer

Unicode-objects must be encoded before hashing

The error points to this line of code: salt=hashlib.sha1(str(random.random())).hexdigest()[:5] Before it worked normally, but after I switched to django 1.10.3 and python 3.5 points to that error     
asked by 01.12.2016 / 12:46
2
answers

PIP does not work on virtualenv

After activating virtutalenv the pip does not work, I get the following error wilker@debian:~/Documentos/Git/Curso Django/Blog$ source bin/activate (Blog) wilker@debian:~/Documentos/Git/Curso Django/Blog$ pip freeze bash: /home/wilker/Document...
asked by 09.12.2016 / 03:03