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
4
votes
2 answers

Django 1.10: base_site.html override not working

I am creating a site in Django with a custom view, and want to link to that view on the admin page. But even though I've followed the directions to override base_site.html in the Django tutorial, nothing changes. No matter if input the simplest…
eijen
  • 409
  • 1
  • 4
  • 12
4
votes
0 answers

Django 1.10. Why does settings.LOGIN_URL default to /accounts/login/, while django.contrib.auth.urls uses ^login/$?

I'm migrating to Django 1.10 and trying to fix login issues. So, going by topics.auth.default Using the views I do the following: urlpatterns = [ .... url('^', include('django.contrib.auth.urls')), ] OK, and now I am getting a 404 about…
JL Peyret
  • 10,917
  • 2
  • 54
  • 73
4
votes
3 answers

Django get all related objects from model with 'through' relationship tables

In our app we have several relationships and several models, I'm trying to achieve a generic way to get all related objects of an object, even reverse ones. If I print ._meta.get_fields() from my model Pessoa, i get these relationship fields(I…
Mojimi
  • 2,561
  • 9
  • 52
  • 116
4
votes
3 answers

Disallow Django self-referential foreign key to point to self object

I have a regular self-referential foreign key: idol = models.ForeignKey("self", on_delete=models.CASADE) The admin page allows me to choose the the same object id. How can I prevent the django admin form from showing it?
iTayb
  • 12,373
  • 24
  • 81
  • 135
4
votes
1 answer

How to integrate django-admin-bootstrapped with django 1.10

How can I use django-admin-bootstrapped with django 1.10. https://github.com/django-admin-bootstrapped/django-admin-bootstrapped I used to be able to install admin-bootstratpped_plus and django-admin-bootstrapped but it no longer works since it does…
Stryker
  • 5,732
  • 1
  • 57
  • 70
3
votes
0 answers

django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: account

Run error prompt: django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: account . I have set up an "account" and now I'm prompted to repeat what I need to do to solve the above mistakes. INSTALLED_APPS = [ …
iamhere
  • 31
  • 2
3
votes
0 answers

Firebase DB access from django taking too long

I am using django 1.10 and python 3.5. I am using pyrebase for firebase DB access and all works well. But when I use pyrebase in django views it results in the entire API request to become much slower. I debugged the code and found out the pyrebase…
3
votes
1 answer

Django 1.10 UUIDField returns either string or UUID

While upgrading from Django 1.9.13 to Django 1.10.7 I encountered a weird issue with Django's native UUIDField. We use this UUIDField on our custom User model like: username = models.UUIDField(primary_key=True, default=uuid.uuid4,…
3
votes
3 answers

Django - Print dict in template

I've a dict of dicts my_var defined as: defaultdict(,{ 'product1': Counter({'total_qty': 1}), 'product2': Counter({'total_qty': 13}), 'product3': Counter({'total_qty': 65}) }) I pass it to the template…
davideghz
  • 3,596
  • 5
  • 26
  • 50
3
votes
2 answers

Django ValueError: could not convert string to float

Even though I put this line in my settings.py : LANGUAGE_CODE = 'pt-br' TIME_ZONE = 'America/Sao_Paulo' USE_I18N = True USE_L10N = True USE_TZ = True DECIMAL_SEPARATOR = ',' DATE_INPUT_FORMATS = ['%d/%m/%Y'] DATE_FORMAT = r'd/m/Y' As…
Mojimi
  • 2,561
  • 9
  • 52
  • 116
3
votes
1 answer

"No action selected" says Django-admin when deleting objects

I've created a simple model Product with couple of fields and then went to admin.py. I've registered the Product, make some fields list_editable and created a new action duplicate. def duplicate(modeladmin, request, queryset): number =…
Milano
  • 18,048
  • 37
  • 153
  • 353
3
votes
1 answer

Filter queryset by optional start and end date

I want to filter a queryset by a date range where both the start and end date are optional. Specifically, if dt_from: results = results.filter(date_modified__gte=dt_from) if dt_until: results =…
Flash
  • 15,945
  • 13
  • 70
  • 98
3
votes
3 answers

Django: Related model 'users.UserProfile' cannot be resolved

I tried running makemigrations and after migrate and I am constantly getting this error: ValueError: Related model 'users.UserProfile' cannot be resolved What I was trying to do is Link a UserProfile model to Django's own User Model: from django.db…
Tony
  • 2,382
  • 7
  • 32
  • 51
3
votes
1 answer

Django: Can't access model attributes

Lately I started using my existing mysql database in Django. Implementing it worked The database settings looks like this DATABASES = { 'default': { 'NAME': 'app_data', 'ENGINE': 'django.db.backends.sqlite3', }, 'users': { 'NAME':…
1
2
3
12 13