django-1.11 Questions

5

Solved

I have such php function which I try to rewrite in my Django project. What should be an analogue in python for php methods like header() and show_error()? Also how to send file to response? php: ...
Crustal asked 23/5, 2018 at 4:28

3

Solved

Please could you me why I get this error message while displaying "fav" in my template QuerySet object has no attribute game_id I tried to replace game_id by game, id_game but nothing... view.p...
Octa asked 31/5, 2017 at 12:29

2

Solved

Django 1.11 offers new ways to create database indexes. So far we had db_index=True in each field: # example 1 class Person(models.Model): name = models.CharField(db_index=True) age = models.In...
Razor asked 8/6, 2017 at 22:1

6

Solved

I tried to launch a Django 1.11 project on production server. When I start the app I see the following error: Invalid HTTP_HOST header: 'bla-bla-bla.bla-bla-vla.com'. You may need to add u'bla-b...
Hesperidium asked 19/7, 2017 at 14:52

4

In unit test I create 3 objects (articles) at the beginning. After test complete I notice that there are 3 images in media_root folder. Question: How to delete that images which was created after ...
Blastema asked 18/9, 2017 at 7:4

5

I am using localization in Django 1.11 application. I can exclude the virtual environment folder and node_modules folder while adding the messages in message file using -i option like: django-admi...
Folio asked 17/1, 2019 at 4:31

2

In trying to make the migrations with python manage.py runserver, I got the following traceback : Traceback (most recent call last): File "manage.py", line 22, in <module> execute_from_co...
Elainaelaine asked 22/12, 2017 at 13:10

3

I have to use multiple databases in my project but there is a problem. Model can't see intended database accounts.db. when i go localhost:port/admin/app/accounts it says me no such table: accounts....
Covalence asked 27/8, 2019 at 13:49

1

Solved

I've seen all over problems using Memcached in Django projects which is considered to be The fastest, most efficient type of cache supported natively by Django For instances, Why doesn't mem...
Caddaric asked 12/10, 2020 at 11:53

3

Solved

Is it possible to manually specify the set of related object to show in an inline, where no foreign key relation exists? # Parent class Diary(models.Model): day = models.DateField() activities ...
Gramme asked 20/6, 2017 at 7:33

2

Solved

I'm using Django 1.11 I have created a Form and using Class based view to create a record and save to database. Business/models.py class BusinessType(models.Model): title = models.CharField(max...
Chivalric asked 12/10, 2017 at 4:29

1

I'm attempting to create a class based logging handler which notifies some third party service when the app sees a DisallowedHost exception using some of the built in logging configurations provide...
Callison asked 5/12, 2018 at 20:49

1

I have recently upgraded to django 1.11 and I want to use the newly released, Subquery exrpession feature. There are two models as follows class Project(models.Model): title = models.CharField(_...
Cloistered asked 6/6, 2018 at 14:22

2

Solved

I'm upgrading an old project running on Django 1.8 to at least Django 1.11 for LTS. I've heard upgrading a django project multiple versions can be difficult and frustrating. I haven't done this, so...
Lxx asked 4/4, 2018 at 13:54

1

I recently updated Django to the bleeding-edge version 1.11rc1 because of the Subquery feature that was introduced there. Now, let's say this is my use case: I have following models - Users, Group...
Inpour asked 30/3, 2017 at 17:40

1

Solved

I have a ImageField that stores in AWS S3 (similar to FileField). In the form, it has this "Currently" label that shows the image file path. I would like to trim and just show the filename. referr...
Jailhouse asked 19/12, 2017 at 12:33

2

Solved

I'm getting this following error: ImproperlyConfigured at /elearning/7447932a-6044-498a-b902-97cbdd0a4001/ DetailView is missing a QuerySet. Define DetailView.model, DetailView.queryset, or overri...
Glantz asked 25/7, 2017 at 6:44

2

Solved

UPDATE April 8th, 2019 This is a known bug for django<=2.2, fixed as of this PR ================================= (We assume the mysql backends) I can set TIME_ZONE several times in settings...
Mcmillen asked 3/7, 2017 at 16:16

1

Solved

I am currently using Django version 1.11.2 and would like to use the FilteredSelectMultiple widget outside of the admin page. This is my forms.py: class TBDAuthGroupManageForm(forms.Form): permiss...
Residential asked 20/6, 2017 at 5:29

1

Solved

There is a multiple checkbox in template, if value contain in render the choice will checked by default. It works well with 1.10. form.py: class NewForm(forms.Form): project = forms.ModelMultipl...
Vehement asked 28/4, 2017 at 7:57
1

© 2022 - 2024 — McMap. All rights reserved.