Questions tagged [django-1.10]

Django 1.10 is a version of the Django framework, released August 2016. Please only use this tag if your question relates specifically to this version.

Django 1.10 requires Python 2.7, 3.4, or 3.5.

Here are a list of changes:

Django 1.10 was released in August 2016 and was supported until December 2017.

191 questions
3
votes
1 answer

BASE_DIR returning settings path and not project path (django 1.10)

I am currently setting up my settings files for Django 1.10 as per Two Scoops For Django 1.8 preferred settings files set up. my base.py settings file is: # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR =…
Corey Gumbs
  • 372
  • 6
  • 13
3
votes
1 answer

django 1.10 media images don't show

I have had django media images working in an existing django 1.7 project by adding the following to site urls.py: urlpatterns = patters( url(r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT,…
Atma
  • 29,141
  • 56
  • 198
  • 299
3
votes
1 answer

Django AttributeError: 'InterestsForm' object has no attribute '_errors'

I am trying to use a Django form to allow a Django User to input their three favourite interests. The error occurs during the template rendering where it says {{form.as_ul}}. Here is the code: reg_interests.html {% block content…
Max Goodridge
  • 373
  • 2
  • 7
  • 21
3
votes
1 answer

Turn off autoescaping in template.render

In Django < 1.8 there was possibility to render template without autoescaping: context = Context({...}, autoescape=False) result = template.render(context) In Django 1.8/1.9 I get following deprecation waring: RemovedInDjango110Warning: render()…
EMiDU
  • 654
  • 1
  • 7
  • 24
2
votes
2 answers

How to display changelist of multiple models in django admin?

I need to display multiple models in django admin change list view. I want to use single search box to filter all of them at once. Is there an easy way to do it? My idea was to inherit from admin site, add another view to it and iterate over models…
subli
  • 63
  • 4
2
votes
1 answer

Prevent Django from re-creating default permissions

Is there a way I can remove all the permission that Django creates by default and prevent it from creating them again? Currently I have a migration that runs a Permission.objects.all().delete() and I also have added default_permissions = () to the…
alexandernst
  • 14,352
  • 22
  • 97
  • 197
2
votes
1 answer

Django AttributeError: 'GeoQuerySet' object has no attribute 'extent'

My django code is broken and raises the following AttributeError: AttributeError: 'GeoQuerySet' object has no attribute 'extent' In my code I try to call extent on a django geoqueryset: if raster and bbox: self.extent = qs.extent() My…
RvdBerg
  • 195
  • 1
  • 11
2
votes
1 answer

How correctly save multiple files in django?

I need form where user can create article with several images. I use django-multiupload app for image field. I can select several images but when I try to submit the form I have message under the image field: "Field is empty and field is required".…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
2
votes
0 answers

How in DJANGO create editable Select field?

How in DJANGO create editable select field as in the picture below? I used before django-floppyforms app in my project. It use datalist which is unflexibility in css styling. So is it possible replace detalist to ul, li…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
2
votes
2 answers

DjangoORM: Resolve F Expression in Custom DB Function

I am trying to write a custom PostgreSQL function in Django that will coerce datetimes to a specified timezone inside of a queryset. My first pass at the db function looks like this: from django.db.models.expressions import Func class…
2
votes
1 answer

Django-admin: TemplateDoesNotExist at /admin/plans/plan/

I'm trying to make Django-plans app work. Everything seems to be working except /admin/plans/plan/ ( /admin/plans/order/, /admin/plans/userplan/ etc. works correctly). When I click on plan in Django-admin it returns: TemplateDoesNotExist at…
Milano
  • 18,048
  • 37
  • 153
  • 353
2
votes
2 answers

Django select_related query does not return all values to the template

I have 2 models. Characters and CharactersDetails from a django site I'm fooling around with. CharactersDetails has a foreignkey relationship to Characters class CharactersDetails(models.Model): character_link =…
JasonS
  • 161
  • 2
  • 14
2
votes
1 answer

custom django command - help string not visible in shell completion

Following is a custom command I have written in following file myapp/management/commands/create_myadmin.py from django.core.management.base import BaseCommand from django.contrib.auth.models import User class Command(BaseCommand): help =…
comiventor
  • 3,922
  • 5
  • 50
  • 77
2
votes
1 answer

How to get value from form and redirect to /value in Django 1.10

I need to get value from tag and redirect to '/value/' by submit. Now I'm getting: 'ApartmentForm' object has no attribute 'cleaned_data' I'm totally missing something. forms.py class ApartmentForm(ModelForm): class Meta: model =…
Leonid Ivanov
  • 331
  • 5
  • 15
2
votes
0 answers

Django 1.10 AdminEmailHandler infinite loop when DEBUG=False

I am facing a very strange behavior with Django 1.10 when setting DEBUG=False. Django logging utility is stuck in an infinite loop and is sending me tons of emails instead of only sending me one email. Actually it doesn't stop until I am stopping…
Julien Salinas
  • 1,059
  • 1
  • 10
  • 23
1 2
3
12 13