Questions tagged as 'django'

1
answer

AWS S3 Disabling support for SSLv3

I received an email from AWS that says basically that S3 will no longer support SSLv3. So they listed the list of buckets that are receiving requests in SSLv3 and one of my buckets is production. The full email can be viewed here: link M...
asked by 24.04.2015 / 21:38
2
answers

Shell of Python and Django

I know that to open the Python interactive shell, we simply run it on the terminal of the operating system: python But with Django installed, you can also open the shell using the command: python manage.py shell Is there any difference...
asked by 25.05.2017 / 16:30
1
answer

Python / Django time interval

I need to create a time grid for a calendar: I have the following information in the Django template: Starting time: 08:00 End time: 6:00 p.m. Interval in minutes 00:30 I would like to implement something like: for hora in range...
asked by 06.05.2017 / 18:45
1
answer

404 Django Python Error

This is the error I'm having: AsyoucanseeinthelistofURLs,thenumber8isequaltothe"current url" given below. My url list: from django.conf.urls import include, url from django.contrib import admin from principal.views import IndexView, Log...
asked by 09.11.2016 / 16:54
1
answer

Models in Django gets everything in one file?

I'm starting my studies in Django, I come from frameworks like Rails, Laravel, Asp.Net, and I came across a difference that I even found strange in Django models being all together, is this normal? Is there a way to leave each model in a file? I...
asked by 12.12.2018 / 20:32
1
answer

Sort list with Python + Django

Good afternoon guys, I'm having a problem, I've registered for the django admin a video that should be sent to my template, but I need these videos to be sorted by the position field I have in my models.py in the bank models.py...
asked by 27.09.2018 / 16:30
1
answer

Problem in Django send_email function

Good afternoon! I have the following code in views.py: def email(request): if request.method=='POST': form = ContactForm(request.POST) form.email = request.POST.get('email', '') form.subject = request...
asked by 01.03.2018 / 17:19
2
answers

Make a count in relationship Many to Many

I'm trying to put in a view the number of students enrolled in a course using the following Models below. I can not change the columns of the Models, since the database already exists and I'm just making another system from it. But how doe...
asked by 10.01.2018 / 12:02
2
answers

Django collectstatic does not update modified files in s3

I'm using Django 1.10.6 , followed this tutorial to set up media and staticfiles on s3 and when squeeze collectstatic , files are not updated. p>     
asked by 16.05.2017 / 17:56
1
answer

Python, how to validate if the variable is None?

I'm not able to check if the variable has no value (None) View: endereco_id = request.POST.get('endereco_id', None) if formCliente.is_valid() and formEndereco.is_valid(): print('********** endereco_id **************') print(endereco...
asked by 14.04.2017 / 19:10