Questions tagged as 'django'

1
answer

NoReverseMatch Error in Django

Hello! Studying Django and developing in this Framework, I came across the following error:    NoReverseMatch at / Reverse for 'displayURL' with arguments '(' ',)' not   found . 1 pattern (s) tried: ['profiles / (? P \ d +) $'] For a...
asked by 27.01.2018 / 00:45
1
answer

Read XML through Python

I need to get data in an XML file from another domain, initially I did a js, I had to abort. I thought about reading the files through .py within my Django project In test character I tried something else one less like this: tree = ET.Eleme...
asked by 09.11.2017 / 22:14
1
answer

Redirect to another page in the Django view

I'm learning Django now and the idea is this: I have a registration form with only the email, when this email is filled and the user clicks send, I need the view to go to the other page where the user will finish the registration, how do I do...
asked by 08.08.2017 / 14:35
2
answers

How do I test the user type and send to different views in DJANGO's generic views

Hello, I have a question in Django. I'm trying to do it this way. My user model has a "level" field, this field has some levels, among them "root", "seller" etc .. However, I would like to know how I can restrict some views only to root, others...
asked by 02.06.2017 / 14:58
2
answers

Is it possible to compare two variables from a view in Django?

Well, I want to compare two variables coming from a view in Django. I'm doing a for and iterating and comparing a value of type CharField (student.matricula) with another CharField (frequency.matricula)! I wondered if you could do that. My resul...
asked by 06.02.2017 / 15:13
1
answer

Django, retrieve selected value on page

Good evening! I created a view where I retrieve the sellers and created a variable (sales_id) to receive the selected salesperson on the screen. The html is being created correctly, but the variable in the view does not receive value in POST:...
asked by 09.03.2017 / 03:47
1
answer

Error in the language of the month Django

Good morning guys, Next, I have a very uncomfortable problem. When I try to use the date that was stored in the database, it comes with the month in English. settings.py: LANGUAGE_CODE = 'pt-br' TIME_ZONE = 'America/Sao_Paulo' USE_I18N...
asked by 05.02.2017 / 12:20
1
answer

ReportLab - Python - Doubt with date writing (date)

I am having problems with reportlab. Python 3 / Django application I have a Pessoa model that contains a data de nascimento field that is of type DateTimeField . I am trying to write the date of birth in the PDF but the...
asked by 26.10.2016 / 23:10
2
answers

Submit process to the server and release the user

I'm having a problem with an application that uses 3G and is slow to keep the user waiting. Does anyone know any library that I can send information to the server and release the user? The information is a batch with 100 sets of numbers th...
asked by 11.10.2016 / 04:56
1
answer

Error with Django and Cloudinary - can not use the string pattern on a bytes-like object

I'm trying to make a simple app: I've done the Django Girls tutorial and now I'm trying to use it as well including an image using the < a href="http://cloudinary.com/"> Cloudinary But I'm having the following error: Theerroroccursatl...
asked by 03.02.2016 / 20:22