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
1
vote
3 answers

Django TypeError: authenticate() takes exactly 0 arguments (3 given)

Django version 1.10.7 I'm getting TypeError: authenticate() takes exactly 0 arguments (3 given) Importing the authenticate() like this: from django.contrib.auth import authenticate, login Calling authenticate() like this : authenticate(request,…
Rahul Verma
  • 2,946
  • 14
  • 27
1
vote
0 answers

Django Error : django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet

I'm not quite sure what is going wrong here, I have added all the apps in settings.py file, successfully ran the migrations with manage.py etc. but i keep getting this error. I'm running this in PyCharm 2017.2.2 and I don't see any errors in my…
1
vote
1 answer

Exception Value: column home_profile.goal does not exist

I'm really stuck here and i'm a little confused as to why this error is being thrown. I'm running Django 1.10 and the live database is a postgresql DB. I'm not that familiar with postgres. I've been doing all of my development work with sqlite for…
JDavies
  • 2,730
  • 7
  • 34
  • 54
1
vote
0 answers

How to show user activity in modal by django-activity-stream app?

Can someone who worked with app django-activity-stream say me how to use it correctly by example? I am really comfused after reading the documentation. I need to show last 10 activity which was in my modal Characterictic. User can edit…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
1
vote
1 answer

How to update multiple objects of the same model using ModelForm?

I have multiple Product objects in my project. I want to create a form which updates all Product objects at once. Since Product has many attributes I want to spare some time and do it using ModelForm but I can't figure out how to do that. So there…
Milano
  • 18,048
  • 37
  • 153
  • 353
1
vote
1 answer

PermissionError: [Errno 13] Permission denied | WeasyPrint

I use WeasyPrint app to generate pdf file in my django project. I have next code which raise error. It seems to me that main problem in this line output = open(output.name, 'r'). I think user doen't have access rights. How to fix this…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
1
vote
1 answer

Problems with save several images in Django

I have problem with saving files in django. Pls can someone help me? I have form with 2 fields: description and image. By image field user can load several images. To create image field I used django-multiupload app. Also I load data to server by…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
1
vote
1 answer

get_form throws TypeError after upgrading Django to 1.10

I recently been upgrading from 1.4 - 1.11 (incrementally), and since going from 1.9 to 1.10 I am having an issue with get_form(). It seems my context doesn't contain "form" and when the super get_context_data is called, it tries to pass an empty…
JayBee
  • 540
  • 1
  • 5
  • 22
1
vote
0 answers

How create custom tree widget for ModelMultipleChoiceField in django?

In my form I have function field which is ModelMultipleChoiceField where I want to add selected by user functions. As queryset function field take all objects of Group. Can someone help me to create custom widget as the picture below for that field?…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
1
vote
3 answers

Take list of all objects ids

I have model Product where as primary key use code field which is UUID. I want take list of ids of all products. I want list like this: ['14431ec4-3224-480f-85e2-b541891919b1', '6e54636b-7283-4504-a16f-f54d29db26f2'] I tried next code but it return…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
1
vote
1 answer

How to disable checkboxes in MultipleChoiceField?

I use MultipleChoiceField in form. It shows me REQUIREMENTS_CHOICES list with checkboxes where user can select and add new requirements to database. Is it possible to disable checkboxes (in my case requirements) which is already in the database?…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
1
vote
1 answer

How to remove label?

How to remove label from MultipleChoiceField in template? forms.py: class RequirementAddForm(forms.ModelForm): symbol = forms.MultipleChoiceField(required=False, widget=forms.CheckboxSelectMultiple, choices=REQUIREMENTS_CHOICES,) class…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
1
vote
1 answer

MultipleChoiceField create multiple objects

I use MultipleChoiceField in my form. I want to add all selected values to database, but next code which I use add only last value which user select. I tried in my view create multiple number objects. Where I did mistake? models.py: class…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
1
vote
0 answers

Show more information about ManyToMany field?

I use django-reversion app in my project. I have modal "Task" with ManyToMany field "comments". In my project I have page with revertions list. And it shows me in comments field id of comments. For example: comments (field_name): [66, 67, 68]…
Nurzhan Nogerbek
  • 4,806
  • 16
  • 87
  • 193
1
vote
1 answer

Can `auto_id` and `id_for_label` ever have different values?

Both {{ form.myfield.auto_id }} and {{ form.myfield.id_for_label }} have the same value. Usually it's "id_myfield". It is usually used to construct forms, so technically they should always be the same.