Code

#19626 closed Bug (invalid)

No module named django.views.generic.simple in 1.5c1

Reported by: anonymous Owned by: nobody
Component: Generic views Version: 1.5-beta-1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I have this line in my urls.py:

from django.views.generic.simple import redirect_to

Django breaks with: "No module named simple".

I guess this means that django.views.generic.simple is not available in 1.5 anymore. This is a backward incompatible change. But this is not mentioned in in the release notes.

Here is the traceback:

Environment:

Request Method: GET
Request URL: http://localhost:8000/

Django Version: 1.5c1
Python Version: 2.7.3
Installed Applications:
('django.contrib.auth',

'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'cmbarter.users',
'cmbarter.profiles',
'cmbarter.products',
'cmbarter.deposits',
'cmbarter.deals',
'cmbarter.orders',
'cmbarter.mobile')

Installed Middleware:
('django.middleware.gzip.GZipMiddleware',

'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware')

Traceback:
File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response

  1. response = middleware_method(request)

File "/usr/local/lib/python2.7/dist-packages/django/middleware/locale.py" in process_request

  1. check_path = self.is_language_prefix_patterns_used()

File "/usr/local/lib/python2.7/dist-packages/django/middleware/locale.py" in is_language_prefix_patterns_used

  1. for url_pattern in get_resolver(None).url_patterns:

File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in url_patterns

  1. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)

File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py" in urlconf_module

  1. self._urlconf_module = import_module(self.urlconf_name)

File "/usr/local/lib/python2.7/dist-packages/django/utils/importlib.py" in import_module

  1. import(name)

File "/home/evgeni/cmb/cmbarter/../cmbarter/urls.py" in <module>

  1. from django.views.generic.simple import redirect_to

Exception Type: ImportError at /
Exception Value: No module named simple

Attachments (0)

Change History (2)

comment:1 Changed 18 months ago by epandurski@…

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 18 months ago by timo

  • Resolution set to invalid
  • Severity changed from Release blocker to Normal
  • Status changed from new to closed

It's mentioned in the Deprecation Timeline: https://docs.djangoproject.com/en/dev/internals/deprecation/ under 1.5 ("The function-based generic view modules will be removed in favor of their class-based equivalents") as well as the 1.3 release notes when these functions were originally deprecated: https://docs.djangoproject.com/en/dev/releases/1.3/#function-based-generic-views

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.