django-1.9 Questions

3

Solved

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.Mo...
Elishaelision asked 4/12, 2015 at 10:56

5

Solved

lets say i'm showing some data to user , i want user to be able to perform some sort of filtering on a numeric field in the database using a GET form so i have something like this code = request....
Perfidy asked 4/9, 2016 at 13:59

4

Solved

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 &...
Matchmaker asked 11/11, 2016 at 3:42

6

Solved

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.CharFie...
Sleeping asked 17/8, 2016 at 11:46

7

Solved

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) cla...
Valaria asked 15/4, 2016 at 8:15

4

This is a silly problem. I just created a project and have been trying to figure out this problem. from django.conf.urls import url from django.views.generic import TemplateView urlpatterns = [...
Diecious asked 12/3, 2016 at 23:4

10

Solved

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 c...
Knew asked 24/2, 2015 at 0:1

4

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 tr...
Dabber asked 18/1, 2016 at 11:22

8

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 Post...
Exclamatory asked 22/10, 2014 at 9:1

1

Solved

I have run into the same problem that @JohnnyQ has commented on here. My __init__.py is referring to multiple imports that in-turn are referring to models and these are required. The code works pe...
Combustible asked 27/1, 2020 at 8:5

3

Solved

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 f...
Blair asked 11/7, 2016 at 16:7

2

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 ...
Jam asked 7/1, 2016 at 17:11

3

Solved

Whenever I try to run "python manage.py runserver" in Powershell as admin, I get an **ModuleNotFoundError: No module named 'django.urls'**. Can somebody help me please?! I'm using django 1.9 and py...
Ahq asked 8/12, 2017 at 9:52

1

I am using django postgres JSONfield and the model structure is as below from django.contrib.postgres.fields import JSONField class JsonAnswer(models.Model): name = models.CharField(max_length=2...
Backhouse asked 21/9, 2017 at 6:20

1

Solved

So as I recently came to understand, the default that we specify in a Django field is merely for filling up pre-existing rows, and doesn't function as a "real" default value at the database level. ...
Kansas asked 10/12, 2018 at 12:55

4

Solved

I have some users that are allowed to see a certain view. To allow users to login and complain with a 403 Forbidden for those users that cannot see that login, I can use the following (as explaine...
Pasticcio asked 8/1, 2016 at 12:5

1

Solved

I have a Django model against a postgresql database table where I want Django to not insert field_3 during object creation as its a timestamp field that DB is supposed to fill in. class AbcModel: ...

2

I am new to django webapp development and i am stuck with a problem. I have created 1 app with 1 model to insert data to the database using 1 form. I am going to use multiple databases for this. E...
Rumania asked 10/6, 2016 at 16:12

1

Solved

The test fails with the error in Django 1.9 env, but tests run perfectly well in 1.10.4 and 1.8. Can someone throw some light here ! Here is the error add_message raise MessageFailure('You ca...
Biphenyl asked 8/12, 2016 at 6:35

2

Solved

When I perform a migration on one of my projects app I get the following error: ValueError: Unhandled pending operations for models: common.shipmentaddress (referred to by fields: catalog.Fulfill...

2

I'm developing a Django (1.9) Rest backend and AngularJS frontend with Cross-site referencing. While attempting to execute a ./manage.py dumpdata command, it throws the following exception: $ pyth...
Lott asked 18/12, 2015 at 5:5

3

Solved

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 <func...
Inesinescapable asked 17/2, 2016 at 10:32

2

Solved

I'm trying to use django-registration in my simple project. settings.py # DJANGO REGISTRATION ACCOUNT_ACTIVATION_DAYS = 7 AUTH_USER_EMAIL_UNIQUE = True EMAIL_HOST = 'localhost' EMAIL_PORT = 1025 ...
Immemorial asked 21/11, 2015 at 18:37

1

Solved

I am using Django 1.9 and Django Rest Framework 3.3 I'm creating three new endpoints that are similar but still different enough that I want them to be their own viewsets to avoid messy code. They...
Neal asked 8/4, 2016 at 17:27

1

Solved

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', ...
Mulligrubs asked 3/4, 2016 at 19:7

© 2022 - 2024 — McMap. All rights reserved.