Questions tagged [django-1.11]

Django 1.11 is a version of the Django framework, released April 2017. It is a Long Term Support (LTS) release, and will be supported until at least April 2020. Please only use this tag if your question relates specifically to this version.

Django 1.11 requires Python 3.4, 3.5, or 3.6. It is the last version of Django to support Python 2.

Here are some of the salient features of Django 1.11:

Django-1.11 was released in April 2017 as a long-term support release and will be supported until April 2020.

324 questions
0
votes
1 answer

ImportError: No module named urls

I have a django rest project which is built on Django1.7. I need to run it on Django 1.11. When i run python manage.py migrate The error is: ImportError: No module named urls on url.py line url(r'^docs/',…
0
votes
1 answer

Django error while trying to create custom model class

I started organizing my models in a package as specified here : https://docs.djangoproject.com/en/1.11/topics/db/models/#organizing-models-in-a-package I'm using a legacy Oracle database I also created a module containing some…
Mojimi
  • 2,561
  • 9
  • 52
  • 116
0
votes
1 answer

Django Foreignkey id to value

I'm new to django. Below you will find the code structure. Let me explain. Basicly on the index.html page I show all Articles of today (publication_date is today). Now they are correctly showing, the problem is that I also want to show the Company…
Sharpless512
  • 3,062
  • 5
  • 35
  • 60
0
votes
2 answers

if form.is_valid() always false

I'm learning Django 1.11 and I'm creating a form with widget_tweaks tools. I have a variable "code" which is supposed to inform the template if the form is sent or not. If it's not sent, code = 1 and the form is displayed If the form is displayed, I…
user6089877
0
votes
1 answer

Get Slug in DetailView

urls.py urlpatterns = [ url(r'^$', views.IndexView.as_view(), name="index"), url(r'^(?P[-\w]+)/$', views.DetailView.as_view(), name="detail"), ] views.py class DetailView(generic.DetailView): model = Company template_name =…
Sharpless512
  • 3,062
  • 5
  • 35
  • 60
0
votes
1 answer

Django 1.11: Python 3.6 Upgrade causes issues with SSL connections

I just upgraded my Django 1.10 (Python 3.5) app to Django 1.11 (Python 3.6) in my MacOS Sierra. Most things still work, but I realized that SSL connections are not working the way they were before. I noticed it with some issues with my AWS S3…
A Campos
  • 753
  • 3
  • 10
  • 31
0
votes
2 answers

Django image file is not rendering

my settings file is like below, STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR,'static') STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static', 'static_dirs'),) MEDIA_URL = '/static/images/' MEDIA_ROOT =…
Bhargav
  • 454
  • 1
  • 6
  • 15
0
votes
1 answer

Django 1.11 - It must be in YYYY-MM-DD HH:MM[:ss[.uuuuuu]][TZ] format."]

I know there was such a question, but it did not work for me well. I get a message from the console when I do "migrate". How to deal with this error? I would like someone to tell me tpo step by step. I would be very grateful. I am using for…
Davdei
  • 157
  • 1
  • 2
  • 10
0
votes
0 answers

Django 1.11 is not loading css files

I have the next configuration: urls.py urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^manager/', include('manager.urls')), #Static pages url(r'^index', TemplateView.as_view(template_name='index.html'), name='index'), …
Benjamin RD
  • 11,516
  • 14
  • 87
  • 157
0
votes
2 answers

Get number of filtered items with a backward reference to a model Django

I have being playing with this for hours with out find a solution. I have the following models: class Category(models.Model): name = models.CharField(max_length=100) class Item(models.Model): name = models.CharField(max_length=250) …
Adrian Martinez
  • 479
  • 1
  • 9
  • 17
0
votes
0 answers

upgrade from django 1.10.6 to 1.11 runserver giving exception

After upgrading django from 1.10.6 to 1.11 while runserver I am getting following exception. models.Q is inherited from tree.Node and there is no significant change around this in both the versions that could break usage of Q. class…
-1
votes
1 answer

How to enabled cors in django1.1 with angular 7?

I am trying to develop my front end in angular 7 and would like to make cors request to my server to get data. Chrome and Firefox block preflight request. Can someone point me to how to resolve this issue? In my Django settings, I have done…
yash vaidya
  • 9
  • 1
  • 4
-1
votes
1 answer

How to add similar posts in Detailview in Django 1.11

I want to add similar posts section to my blog django application in Class DetailView on detail page class DetailView(generic.DetailView): model = Deal template_name = 'deals/detail.html'
-1
votes
1 answer

How to update a model TextField based on a function output

I have a PIL function that checks the uploaded image resolution and resizes it to either a fulscreen resolution or banner resolution then saves it to the database. Now I need to add a model textfield that saves the values "fullscreen" or "banner" to…
KKP4
  • 1
  • 2
-1
votes
1 answer

Django upgrade filter/prefetch_related behaviour change?

I'm in the process of upgrading from Django 1.8.19 to 1.11.15 and I've found a piece of code which is breaking. In particular this query is doing something different to what it did before. project_groups = brand.project_groups.prefetch_related( …
James Bradbury
  • 1,708
  • 1
  • 19
  • 31
1 2 3
21
22