#19595: The 'redirect' from django.shortcuts does not work in a view function 
when
the only parameter is a URL string
-----------------------------+--------------------------------------
     Reporter:  sergzach     |                    Owner:  nobody
         Type:  Bug          |                   Status:  new
    Component:  Core (URLs)  |                  Version:  1.5-beta-1
     Severity:  Normal       |               Resolution:
     Keywords:               |             Triage Stage:  Unreviewed
    Has patch:  0            |      Needs documentation:  0
  Needs tests:  0            |  Patch needs improvement:  0
Easy pickings:  0            |                    UI/UX:  0
-----------------------------+--------------------------------------

Comment (by sergzach):

 The main lads/urls.py:


 {{{
 from django.conf.urls import patterns, include, url
 from django.views.generic import TemplateView

 # Uncomment the next two lines to enable the admin:
 # from django.contrib import admin
 # admin.autodiscover()

 urlpatterns = patterns('',
     # Examples:
         url(r'^$', 'home.views.home', name='home'),
     url(r'^viewer', 'home.views.viewer', name='viewer'),
     url(r'^lazy-load', 'home.views.viewer_lazy_load'),
         url( r'^delete-image', 'home.views.delete_image' ),
     url( r'^photo-log', 'home.views.photo_log' ),
     url( r'^unhandled', 'home.views.unhandled_lad_profile' ),
     url( r'^proxy', 'home.views.proxy' ),
         url( r'^how-many', 'home.views.how_many' ),
     url( r'^get-photos', 'home.views.get_photos' ),
     url( r'^all-lads', 'home.views.all_lads' ),
     url( r'^add-lad', 'home.views.add_lad' ),
     url( r'^filter-lads', 'home.views.filter_lads' ),
     url( r'^save-thumbnail', 'home.views.save_thumbnail' ),
     url( r'^google001d510d0966bd9a.html', TemplateView( template_name =
 "home/google001d510d0966bd9a.html" ) ),
     url( r'^yandex_6af1bdaeb51f904e.html', TemplateView( template_name =
 "home/yandex_6af1bdaeb51f904e.html" ) ),
         url( r'^robots.txt', TemplateView( template_name =
 "home/empty.html" ) ),
         #url( r'^myauth', include( 'myauth.urls' ) ),
         url( r'^myauth', 'myauth.views.vk_view' ),
         url( r'^([\w\-]+)', 'home.views.lad_profile' ),
     # url(r'^lads/', include('lads.foo.urls')),

     # Uncomment the admin/doc line below to enable admin documentation:
     # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

     # Uncomment the next line to enable the admin:
     # url(r'^admin/', include(admin.site.urls)),
 )

 }}}

 There is also an urls.py file in myauth, but it is not included in the
 main file:


 {{{
 from django.conf.urls import patterns, url
 from views import vk_view

 # Uncomment the next two lines to enable the admin:
 # from django.contrib import admin
 # admin.autodiscover()

 urlpatterns = patterns('',
     # Examples:
         url(r'^vk', vk_view ),
 )



 """from django.conf.urls.defaults import *
 from orders.views import OrdersView, OrderDetailView

 from django.contrib.auth.decorators import login_required

 urlpatterns = patterns( '',
                         url( r'(\d+)', login_required(
 OrderDetailView.as_view() ) ),
                         url( r'(\w)', login_required( OrdersView.as_view()
 ) ),
                         )"""

     # Uncomment the next line to enable the admin:
     # url(r'^admin/', include(admin.site.urls)),
 )
 }}}

 Thank you.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19595#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to