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
0
votes
1 answer

Correct Usage of Django Related Fields

One aspect of Django's models that I simply don't get my head around are the related fields, and getting their usage correct. I think this reflects a poor understanding of SQL and databases in general - so I suspect it's an issue for many django…
Vernon
  • 2,703
  • 2
  • 24
  • 30
0
votes
1 answer

Django runserver with DEBUG True serving the wrong static files

Trying to server staticfiles via runserver for development, with Django 1.10 I have 'django.contrib.staticfiles' in my INSTALLED_APPS and the following relevant settings: STATICFILES_FINDERS = ( …
DanH
  • 5,498
  • 4
  • 49
  • 72
0
votes
1 answer

(Django 1.10) referring to properties of an object referred to by ForeignKey

In my app each object Kurs needs to have a field 'prowadzacy' specifying the user to which the given Kurs belongs. Therefore, my models.py has the following: class Kurs(models.Model): prowadzacy = models.ForeignKey(User) I also need to know the…
Leszek Wroński
  • 269
  • 3
  • 4
  • 12
0
votes
0 answers

Is it correct to add static link to my urlpatterns at urls.py

I am new at Django, and as I'm about to finalize my project, I toggled DEBUG from True to False to see if there are any actual errors. Now the static files are giving me an error 404 which I found the reason here. As a work around, I included this…
Eduard
  • 666
  • 1
  • 8
  • 25
0
votes
0 answers

Django.contrib.auth and post_migrate

I am currently extending django.contrib.auth. One of the features I need is generating Groups and associated Permissions based on some rules defined in project settings. The perfect place to do so would be the post_migrate signal. However,…
Art
  • 2,235
  • 18
  • 34
0
votes
1 answer

PyCharm not detecting unresolved references [Django]

So I'm having a problem with PyCharm and can't find a solution for it. It fails to recognize unresolved references: The image also shows that it fails to auto-complete request.session. It only happens with .session, it works with every other…
0
votes
1 answer

Weird behavior in Django queryset union of values

I want to join the sum of related values from users with the users that do not have those values. Here's a simplified version of my model structure: class Answer(models.Model): person = models.ForeignKey(Person) points =…
Ícaro
  • 1,432
  • 3
  • 18
  • 36
0
votes
2 answers

Django 1.10: Error Installing django_debug_toolbar

I'm trying to install django-debug-toolbar Whenever I add the middleware in the settings, I'm getting the following error: File "/.env/lib/python3.5/site-packages/django/core/handlers/wsgi.py", line 153, in __init__ …
Wasi
  • 1,473
  • 3
  • 16
  • 32
0
votes
1 answer

Import file from another app in Django 1.10

I'm trying to import a file from another app, and I get this error: Unhandled exception in thread started by Traceback (most recent call last): File…
Carlos
  • 58
  • 7
0
votes
1 answer

Trouble while providing webservices in django python to android

I am new for Django1.10 Python. I've to provide web services for an app. So I created a web service in python's Django framework. The web service is properly working for iOS but getting issue while handling with android. For dealing with web…
0
votes
1 answer

Django 1.10 - Different templates for each OneToOne model

Basically, I'm trying to get the current user type, by using the OneToOne models you can see below and display different template "parts" specific for each model. I researched a bit and found out about type() and hasattr(). I was wondering if…
Supperino
  • 3
  • 1
  • 4
0
votes
0 answers

What is the django equivalent of Jinja2 batch filter?

I am trying to use django 1.10 templating system to display a list as a sequence of row, each containing at most 3 columns. In Jinja2 I would write: {% for items in all_items|batch(3) %}
{% for item in items %}
Jopela
  • 5,415
  • 2
  • 18
  • 19
0
votes
0 answers

Django 1.10 - Multiple Table Inheritance vs Single model with 'type'

Basically, I'm trying to build an authentification system using django's authentification support. I would need 2 different user types, TypeA and typeB for example. They should register through different routes, each one containing many different…
0
votes
1 answer

To how list group by values and values in that category

I want my template to display my group by category as a header, and then all the values for that group by category under it. For example, my table looks like this: ['John','Physics'] ['Jim','Physics'] ['Sam','Biology'] ['Sarah','Biology'] And I…
user2453757
0
votes
1 answer

Can't Post a Form in Django

It's my first real project in Django and I'm kinda noob here :)) In my index page I need some information from the user and then post it to another view. here what I found: NoReverseMatch at /download/ Reverse for 'progress' with arguments '('',)'…
Ali Torabi
  • 32
  • 1
  • 14
1 2 3
12
13