Questions tagged [django-1.9]

Django 1.9 is a version of the Django framework, released December 2015. Please only use this tag if your question relates specifically to this version.

Django 1.9 supports Python 2.7, 3.4, and 3.5.

Here are a list of changes:

Django 1.9 was released in December 2015 and was supported until April 2017.

273 questions
56
votes
8 answers

Why does Django make migrations for help_text and verbose_name changes?

When I change help_text or verbose_name for any of my model fields and run python manage.py makemigrations, it detects these changes and creates a new migration, say, 0002_xxxx.py. I am using PostgreSQL and I think these changes are irrelevant to my…
utapyngo
  • 6,946
  • 3
  • 44
  • 65
53
votes
1 answer

How to perform filtering with a Django JSONField?

I'm using PostgreSQL and this new field from Django 1.9, JSONField. So I got the following data: id|data 1 |[{'animal': 'cat', 'name': 'tom'}, {'animal': 'dog', 'name': 'jerry'}, {'animal': 'dog', 'name': 'garfield'}] I'm trying to figure out how…
ezdookie
  • 1,477
  • 3
  • 15
  • 19
38
votes
2 answers

Django 1.9 ImportError for import_module

When trying to run either runserver or shell using manage.py I get an ImportError exception. I'm using Django 1.9. ImportError: No module named 'django.utils.importlib'
Matt
  • 8,758
  • 4
  • 35
  • 64
37
votes
2 answers

Django 1.9: Field clashes with the field of non-existing field in parent model

I have some simple models, Profile, Certifier and Designer, the two latter inheriting from Profile (multi table inheritance). In Designer there’s a foreign key to Certifier. class Profile(models.Model): TYPES = ( ('admin',…
35
votes
2 answers

Why did Django 1.9 replace tuples () with lists [] in settings and URLs?

I am bit curious to know why Django 1.9 replaced tuples () with lists [] in settings, URLs and other configuration files I just upgraded to Django 1.9 and noticed these changes. What is the logic behind them? INSTALLED_APPS = [ …
Kamlesh
  • 2,032
  • 2
  • 19
  • 35
34
votes
10 answers

"Unknown command syncdb" running "python manage.py syncdb"

I want to create the tables of one database called "database1.sqlite", so I run the command: python manage.py syncdb but when I execute the command I receive the following error: Unknown command: 'syncdb' Type 'manage.py help' for usage. But…
lanz
  • 481
  • 1
  • 5
  • 10
20
votes
6 answers

Django TextField and CharField is stripping spaces and blank lines

I just researched my "bug" and it turned out to be a new feature in Django 1.9 that CharFields strip spaces by default : https://docs.djangoproject.com/en/1.9/ref/forms/fields/#django.forms.CharField.strip The same seams to apply to text fields…
Andy
  • 726
  • 2
  • 6
  • 15
20
votes
2 answers

New url format in Django 1.9

I recently upgraded my Django project to version 1.9. When I try to run migrate, I am getting the following two errors: Support for string view arguments to url() is deprecated and will be removed in Django 1.10 (got app.views.about). Pass the…
jape
  • 2,861
  • 2
  • 26
  • 58
18
votes
7 answers

Django 1.9 JSONField order_by

I have the following django model that contains JSONField: class RatebookDataEntry(models.Model): data = JSONField(blank=True, default=[]) last_update = models.DateTimeField(auto_now=True) class Meta: verbose_name_plural =…
ryche
  • 2,004
  • 2
  • 18
  • 27
16
votes
3 answers

ImportError: cannot import name generic

I am working with eav-django(entity-attribute-value) in django 1.9. Whenever I was executing the command ./manage.py runserver , I got the error : Unhandled exception in thread started by Traceback (most recent call…
user5939813
15
votes
4 answers

ImportError: No module named timeutils

I'm trying to follow the install tutorial for Django-celery. After installing, I need to run migrate to make the necessary tables, but this error appears: Traceback (most recent call last): File "manage.py", line 10, in…
15
votes
3 answers

Django 1.9 drop foreign key in migration

I have a Django model that has a foreign key to another model: class Example(models.Model) something = models.ForeignKey(SomeModel, db_index=True) I want to keep the underlying DB column as a field, but to get rid of the foreign key constraint…
J. Doe
  • 555
  • 1
  • 6
  • 15
12
votes
2 answers

CSRF verification Failed - Referer is insecure while host is secure

I upgraded Django from 1.8 to 1.9. Afterwards, I get this error on my localhost after the Django admin login: Referer checking failed - Referer is insecure while host is secure. Everything works fine in production. Below is a snippet of my…
Patrick Tutu
  • 534
  • 1
  • 5
  • 13
12
votes
1 answer

Django settings Unknown parameters: TEMPLATE_DEBUG

Hi I'm following the tutorial on the djangoproject site and I'm getting an error on my localhost saying: Unknown parameters: TEMPLATE_DEBUG My settings.py looks like this: TEMPLATES = [ { 'BACKEND':…
Papouche Guinslyzinho
  • 5,277
  • 14
  • 58
  • 101
11
votes
4 answers

AttributeError: 'str' object has no attribute 'regex' django 1.9

I am working with django 1.9 and I am currently coding - in Windows Command Prompt - python manage.py makemigrations and the error: AttributeError: 'str' object has no attribute 'regex' I have tried coding: url(r'^$', 'firstsite.module.views.start',…
Hannah Wight
  • 131
  • 1
  • 3
  • 12
1
2 3
18 19