Re: Need help on RedirectView

2021-06-20 Thread Hello Singh
Thanks, David Sir
It help me a lot.

On Sun, 20 Jun 2021, 18:21 David Nugent,  wrote:

> It is just a method on the Article model. Don't copy-paste what is there,
> understand what it is doing.
>
> In this *example*, update_counter() will be defined in
> Article(models.Model), probably in models.py in the app. You obliged to use
> anything like this in your redirect.
>
> HTH,
>
> On Sun, Jun 20, 2021 at 10:21 PM Hello Singh 
> wrote:
>
>> Now I am trying Django class based view through Django documentation it
>> going well, but I a problem in RedirectView.
>>
>> There is `update_counter()` method I don't understand what it is doing
>> and where it come from. I highlight it in the given image.
>>
>> Please help me
>> Thanks developers
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAEoS0z44Zkf2TJNuay6AU1imCdu5ALmuHSzxJxLtgKS_R69wfQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAEoS0z44Zkf2TJNuay6AU1imCdu5ALmuHSzxJxLtgKS_R69wfQ%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAE5VhgX4s-oqRqg%2B9zw2UBE-tmLEz0jnJDUDSXcXqtO976rhYA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAE5VhgX4s-oqRqg%2B9zw2UBE-tmLEz0jnJDUDSXcXqtO976rhYA%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEoS0z6G5i2K8u-p%2BjFJf6WzPV2SGVpP_gjuFY9oiqb-2m4-DA%40mail.gmail.com.


Re: Need help on RedirectView

2021-06-20 Thread David Nugent
It is just a method on the Article model. Don't copy-paste what is there,
understand what it is doing.

In this *example*, update_counter() will be defined in
Article(models.Model), probably in models.py in the app. You obliged to use
anything like this in your redirect.

HTH,

On Sun, Jun 20, 2021 at 10:21 PM Hello Singh  wrote:

> Now I am trying Django class based view through Django documentation it
> going well, but I a problem in RedirectView.
>
> There is `update_counter()` method I don't understand what it is doing and
> where it come from. I highlight it in the given image.
>
> Please help me
> Thanks developers
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAEoS0z44Zkf2TJNuay6AU1imCdu5ALmuHSzxJxLtgKS_R69wfQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAEoS0z44Zkf2TJNuay6AU1imCdu5ALmuHSzxJxLtgKS_R69wfQ%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAE5VhgX4s-oqRqg%2B9zw2UBE-tmLEz0jnJDUDSXcXqtO976rhYA%40mail.gmail.com.


RE: RedirectView failing silently on NoReverseMatch is confusing

2017-01-19 Thread Matthew Pava
It looks like Tim wanted you to talk to the Django Developers list.  This is 
the Django Users list.

Stating that, I think the NoReverseMatch exception should not be caught.

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Grzegorz Tezycki
Sent: Thursday, January 19, 2017 4:27 AM
To: Django users
Subject: RedirectView failing silently on NoReverseMatch is confusing

Hi everyone.

Tim Graham told me that problem with ticet: #26911 should be discuss on mailing 
list.
Details of ticket are here : https://code.djangoproject.com/ticket/26911

When developer set 'pattern_name' in RedirectView and this pattern is 
incorrect, then method catch NoReverseMatch exception and return None.

I think, that method get_redirect_url should raise ImproperlyConfigured error 
with
message "Reverse URL for '' not found.", or NoReverseMatch exception not 
should be catch

What you think about this.
--
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
django-users+unsubscr...@googlegroups.com<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
django-users@googlegroups.com<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/65f3947f-6d28-41d7-ac83-df6209f621dc%40googlegroups.com<https://groups.google.com/d/msgid/django-users/65f3947f-6d28-41d7-ac83-df6209f621dc%40googlegroups.com?utm_medium=email_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7a13b7b51ab64ce4ad330e52f1611c5a%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.


RedirectView failing silently on NoReverseMatch is confusing

2017-01-19 Thread Grzegorz Tężycki
Hi everyone. 

Tim Graham told me that problem with ticet: #26911 should be discuss on 
mailing list.
Details of ticket are here : https://code.djangoproject.com/ticket/26911

When developer set 'pattern_name' in RedirectView and this pattern is 
incorrect, then method catch NoReverseMatch exception and return None. 

I think, that method get_redirect_url should raise ImproperlyConfigured 
error with 
message "Reverse URL for '' not found.", or NoReverseMatch exception 
not should be catch

What you think about this.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/65f3947f-6d28-41d7-ac83-df6209f621dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django RedirectView 410 (Gone) Response

2015-11-19 Thread Proto
It would help if I wasn't using `pattern_name` wrongly. For anyone else who 
does something similarly silly, `pattern_name` would be the actual pattern 
name, not the name of the url you want to redirect to. In this case, I want 
to use `url` parameter with `reverse`.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/80b5ebc9-3558-40f9-a324-5430ee5f6375%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django RedirectView 410 (Gone) Response

2015-11-19 Thread Proto
It would help if I wasn't using `pattern_name` wrongly. For anyone else who 
does something similarly sill, `pattern_name` would be the actual pattern 
name, not the name of the url you want to redirect to. In this case, I want 
to use `url` with `reverse`.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/73b21c9c-3761-4389-8211-16aebf0c2c76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django RedirectView 410 (Gone) Response

2015-11-19 Thread Proto
url(r'^change-service/$', RedirectView.as_view(pattern_name='new-service', 
permanent=False))

url(r'^new-service/$', 'service', name='service'),

Hitting this route gives a 410 error. I've never used the RedirectView so 
perhaps I haven't implemented something correctly?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0413bd4a-8e00-4a76-a27c-8b302550c708%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: RedirectView()

2015-02-23 Thread Brad Rice
OK, thanks. I had added that. I was just putting the url to the particular 
file in place. This is my whole urls.py at the top: So you are saying don't 
add the line that includes the web.urls?

urlpatterns = patterns('',

url(r'^admin/', include(admin.site.urls)),
url(r'^$', RedirectView.as_view(url='/web/', permanent=False)),
url(r'^web/', include('web.urls', namespace='web'),
)
)

Then this is the web urls.py

urlpatterns = patterns('',
url(r'^$', IndexView.as_view(), name='index'),
url(r'^gallery', gallery, name='gallery'),
)

On Monday, February 23, 2015 at 10:01:53 AM UTC-5, Andréas Kühne wrote:
>
>
> 2015-02-23 15:30 GMT+01:00 Brad Rice <brad...@gmail.com >:
>
>> I'm using RedirectView and it is redirecting to my app, but is not 
>> rendering the view in the app I am pointing to.
>>
>> I want to redirect my root / to my app /web
>>
>> I have this in my primary app urls:
>>
>> url(r'^$', RedirectView.as_view(url='/web/', permanent=False)),
>>
>> I have this in web.urls.py
>>
>> url(r'^$', IndexView.as_view(), name='index'),
>>
>> I have his in my web.vews.py
>>
>> class Index(View):
>>
>> def get(self, request, *args, **kwargs):
>> return HttpResponse('Hello, World!')
>>
>> when I go to / I do get redirected to /web/ but I get a index.html 
>> template display rather than Hello World. It isn't finding my Index(View) 
>> class for some reason.
>>
>> Can anybody explain to me how this should work?
>>
>> -- 
>> Brad Rice
>> brad...@gmail.com 
>> --
>> To succeed in life, you need two things: ignorance and confidence.
>> -Mark Twain
>>  
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAMqTKp4vQmDez7tJSZ54j96huCfhTiCY3F2-g_Lpgq-8sgPMEw%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/django-users/CAMqTKp4vQmDez7tJSZ54j96huCfhTiCY3F2-g_Lpgq-8sgPMEw%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> Hi Brad,
>
> You have not correctly written the web.urls.py file. It should be:
>
> url(r'^web/$', IndexView.as_view(), name='index'),
>
> The urls file doesn't know about in which app it resides, så you have to 
> add the complete url yourself. As long as you don't add the web.urls.py 
> into your main urls.py file with:
>
> url(r'^web/', include(web.urls)),
>
> then your code should work ok.
>
> Regards,
>
> Andréas
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/98517b28-588f-4344-a5a3-1f778a154f98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: RedirectView()

2015-02-23 Thread Andreas Kuhne
2015-02-23 15:30 GMT+01:00 Brad Rice <bradri...@gmail.com>:

> I'm using RedirectView and it is redirecting to my app, but is not
> rendering the view in the app I am pointing to.
>
> I want to redirect my root / to my app /web
>
> I have this in my primary app urls:
>
> url(r'^$', RedirectView.as_view(url='/web/', permanent=False)),
>
> I have this in web.urls.py
>
> url(r'^$', IndexView.as_view(), name='index'),
>
> I have his in my web.vews.py
>
> class Index(View):
>
> def get(self, request, *args, **kwargs):
> return HttpResponse('Hello, World!')
>
> when I go to / I do get redirected to /web/ but I get a index.html
> template display rather than Hello World. It isn't finding my Index(View)
> class for some reason.
>
> Can anybody explain to me how this should work?
>
> --
> Brad Rice
> bradri...@gmail.com
> --
> To succeed in life, you need two things: ignorance and confidence.
> -Mark Twain
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMqTKp4vQmDez7tJSZ54j96huCfhTiCY3F2-g_Lpgq-8sgPMEw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAMqTKp4vQmDez7tJSZ54j96huCfhTiCY3F2-g_Lpgq-8sgPMEw%40mail.gmail.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

Hi Brad,

You have not correctly written the web.urls.py file. It should be:

url(r'^web/$', IndexView.as_view(), name='index'),

The urls file doesn't know about in which app it resides, så you have to
add the complete url yourself. As long as you don't add the web.urls.py
into your main urls.py file with:

url(r'^web/', include(web.urls)),

then your code should work ok.

Regards,

Andréas

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALXYUb%3DHePP0DAm2Bodmaxt8sSYqo7A2hiNwvtLPRXV7Aarrdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


RedirectView()

2015-02-23 Thread Brad Rice
I'm using RedirectView and it is redirecting to my app, but is not
rendering the view in the app I am pointing to.

I want to redirect my root / to my app /web

I have this in my primary app urls:

url(r'^$', RedirectView.as_view(url='/web/', permanent=False)),

I have this in web.urls.py

url(r'^$', IndexView.as_view(), name='index'),

I have his in my web.vews.py

class Index(View):

def get(self, request, *args, **kwargs):
return HttpResponse('Hello, World!')

when I go to / I do get redirected to /web/ but I get a index.html template
display rather than Hello World. It isn't finding my Index(View) class for
some reason.

Can anybody explain to me how this should work?

-- 
Brad Rice
bradri...@gmail.com
--
To succeed in life, you need two things: ignorance and confidence.
-Mark Twain

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMqTKp4vQmDez7tJSZ54j96huCfhTiCY3F2-g_Lpgq-8sgPMEw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: RedirectView with query_string = True and urlencoded unicode string

2012-05-15 Thread German Larrain M.
Andrew,

What bothers me is that the redirection setup works perfectly for any value
of "anything" or querystring; it only fails for this specific case.

How is that possible?

Thanks again

On Mon, May 14, 2012 at 7:10 PM, Andrew Bruce <drubr...@gmail.com> wrote:

> You have passed 'anything' as a keyword argument that will get passed into
> your view. Unfortunately, you can't access it in your inline constructor
> call. Try subclassing RedirectView in views.py of your app.
>
> class SubRedirectView(RedirectView):
>
> query_string = True
>
> def get_redirect_url(self, **kwargs):
> return '/tmovil/planes/%s' % self.kwargs.get('anything', None)
>
> ~Drew
>
>
>
> On Mon, May 14, 2012 at 2:30 PM, Sławek Ehlert <slaf...@gmail.com> wrote:
>
>>  As the error states:
>> You don't have a format argument in your '/tmovil/planes/%(anything)s'
>> string.
>>
>> Cheers
>>
>> Dnia 14.05.2012 23:19, Germán napisał(a):
>>
>> Hi. Please excuse my ignorance in this affairs.
>>
>>  For an specific 
>> URI<http://www.lookup.cl/planes/?page=3&_ult=sec%3Dweb%26slk%3Dweb%26pos%3D4%26linkstr%3Dhttp%253A%252F%252Fwww.lookup.cl%252Fplanes%252F%253Fpage%253D3%26csec%3D%26cpos%3D%26concept%3D%26query%3Dvirgin%2Bmovil%2Bplanes%2Ben%2Bchile%26cbid%3D&_ult_url_params=csec%3D%26sec%3Dweb%26slk%3Dweb%26cpos%3D%26pos%3D4%26concept%3D%26query%3Dvirgin%2Bmovil%2Bplanes%2Ben%2Bchile%26cbid%3D>,
>> I have the following error
>>
>> Traceback (most recent call last):
>>
>>
>>
>> File 
>> "/usr/local/lib/python2.6/**dist-packages/django/core/**handlers/base.py",
>> line 111, in get_response
>>response = callback(request, *callback_args, **callback_kwargs)
>>
>>   File 
>> "/usr/local/lib/python2.6/**dist-packages/django/views/**generic/base.py",
>> line 47, in view
>>return self.dispatch(request, *args, **kwargs)
>>
>>   File 
>> "/usr/local/lib/python2.6/**dist-packages/django/views/**generic/base.py",
>> line 68, in dispatch
>>return handler(request, *args, **kwargs)
>>
>>   File 
>> "/usr/local/lib/python2.6/**dist-packages/django/views/**generic/base.py",
>> line 151, in get
>>url = self.get_redirect_url(kwargs)
>>
>>   File 
>> "/usr/local/lib/python2.6/**dist-packages/django/views/**generic/base.py",
>> line 146, in get_redirect_url
>>return url % kwargs
>>
>>  TypeError: not enough arguments for format string
>>
>>
>>  The version I use is 1.3.1, and the urls.py line determining the
>> redirection is
>>
>>
>> (r'^planes/((?P.*))', 
>> RedirectView.as_view(url='/tmovil/planes/%(anything)s', query_string=True)),
>>
>>
>>  Is it possible the bug reported in ticket 
>> 16842<https://code.djangoproject.com/ticket/16842>is cause for this error? 
>> If not, should I file a bug?
>>
>>  Thanks
>>
>> On Saturday, August 13, 2011 12:47:30 AM UTC-4, Karen Tracey wrote:
>>>
>>> On Thu, Aug 11, 2011 at 10:48 AM, Slafs  wrote:
>>>
>>>> Should i report a ticket?
>>>>
>>>
>>> Yes please, that's a bug in Django.
>>>
>>> Karen
>>>  --
>>> http://tracey.org/kmt/
>>>
>>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/django-users/-/SebYILZBuMAJ.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Germán Larraín M.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: RedirectView with query_string = True and urlencoded unicode string

2012-05-14 Thread Andrew Bruce
You have passed 'anything' as a keyword argument that will get passed into
your view. Unfortunately, you can't access it in your inline constructor
call. Try subclassing RedirectView in views.py of your app.

class SubRedirectView(RedirectView):

query_string = True

def get_redirect_url(self, **kwargs):
return '/tmovil/planes/%s' % self.kwargs.get('anything', None)

~Drew


On Mon, May 14, 2012 at 2:30 PM, Sławek Ehlert <slaf...@gmail.com> wrote:

>  As the error states:
> You don't have a format argument in your '/tmovil/planes/%(anything)s'
> string.
>
> Cheers
>
> Dnia 14.05.2012 23:19, Germán napisał(a):
>
> Hi. Please excuse my ignorance in this affairs.
>
>  For an specific 
> URI<http://www.lookup.cl/planes/?page=3&_ult=sec%3Dweb%26slk%3Dweb%26pos%3D4%26linkstr%3Dhttp%253A%252F%252Fwww.lookup.cl%252Fplanes%252F%253Fpage%253D3%26csec%3D%26cpos%3D%26concept%3D%26query%3Dvirgin%2Bmovil%2Bplanes%2Ben%2Bchile%26cbid%3D&_ult_url_params=csec%3D%26sec%3Dweb%26slk%3Dweb%26cpos%3D%26pos%3D4%26concept%3D%26query%3Dvirgin%2Bmovil%2Bplanes%2Ben%2Bchile%26cbid%3D>,
> I have the following error
>
> Traceback (most recent call last):
>
>
>
> File 
> "/usr/local/lib/python2.6/**dist-packages/django/core/**handlers/base.py",
> line 111, in get_response
>response = callback(request, *callback_args, **callback_kwargs)
>
>   File 
> "/usr/local/lib/python2.6/**dist-packages/django/views/**generic/base.py",
> line 47, in view
>return self.dispatch(request, *args, **kwargs)
>
>   File 
> "/usr/local/lib/python2.6/**dist-packages/django/views/**generic/base.py",
> line 68, in dispatch
>return handler(request, *args, **kwargs)
>
>   File 
> "/usr/local/lib/python2.6/**dist-packages/django/views/**generic/base.py",
> line 151, in get
>url = self.get_redirect_url(kwargs)
>
>   File 
> "/usr/local/lib/python2.6/**dist-packages/django/views/**generic/base.py",
> line 146, in get_redirect_url
>return url % kwargs
>
>  TypeError: not enough arguments for format string
>
>
>  The version I use is 1.3.1, and the urls.py line determining the
> redirection is
>
>
> (r'^planes/((?P.*))', 
> RedirectView.as_view(url='/tmovil/planes/%(anything)s', query_string=True)),
>
>
>  Is it possible the bug reported in ticket 
> 16842<https://code.djangoproject.com/ticket/16842>is cause for this error? If 
> not, should I file a bug?
>
>  Thanks
>
> On Saturday, August 13, 2011 12:47:30 AM UTC-4, Karen Tracey wrote:
>>
>> On Thu, Aug 11, 2011 at 10:48 AM, Slafs  wrote:
>>
>>> Should i report a ticket?
>>>
>>
>> Yes please, that's a bug in Django.
>>
>> Karen
>>  --
>> http://tracey.org/kmt/
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/SebYILZBuMAJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: RedirectView with query_string = True and urlencoded unicode string

2012-05-14 Thread Sławek Ehlert

As the error states:
You don't have a format argument in your '/tmovil/planes/%(anything)s' 
string.


Cheers

Dnia 14.05.2012 23:19, Germán napisał(a):

Hi. Please excuse my ignorance in this affairs.

For an specific URI 
, 
I have the following error


Traceback (most recent call last):

File
"/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py",
line 111, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File
"/usr/local/lib/python2.6/dist-packages/django/views/generic/base.py",
line 47, in view
   return self.dispatch(request, *args, **kwargs)

 File
"/usr/local/lib/python2.6/dist-packages/django/views/generic/base.py",
line 68, in dispatch
   return handler(request, *args, **kwargs)

 File
"/usr/local/lib/python2.6/dist-packages/django/views/generic/base.py",
line 151, in get
   url = self.get_redirect_url(**kwargs)

 File
"/usr/local/lib/python2.6/dist-packages/django/views/generic/base.py",
line 146, in get_redirect_url
   return url % kwargs

TypeError: not enough arguments for format string


The version I use is 1.3.1, and the urls.py line determining the 
redirection is


(r'^planes/((?P.*))', 
RedirectView.as_view(url='/tmovil/planes/%(anything)s', query_string=True)),


Is it possible the bug reported in ticket 16842 
 is cause for this error? 
If not, should I file a bug?


Thanks

On Saturday, August 13, 2011 12:47:30 AM UTC-4, Karen Tracey wrote:

On Thu, Aug 11, 2011 at 10:48 AM, Slafs  wrote:

Should i report a ticket?


Yes please, that's a bug in Django.

Karen
-- 
http://tracey.org/kmt/


--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/SebYILZBuMAJ.

To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Re: RedirectView with query_string = True and urlencoded unicode string

2012-05-14 Thread Germán
Hi. Please excuse my ignorance in this affairs.

For an specific 
URI,
 
I have the following error

Traceback (most recent call last): 

 

File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", 
line 111, in get_response
   response = callback(request, *callback_args, **callback_kwargs)

 File "/usr/local/lib/python2.6/dist-packages/django/views/generic/base.py", 
line 47, in view
   return self.dispatch(request, *args, **kwargs)

 File "/usr/local/lib/python2.6/dist-packages/django/views/generic/base.py", 
line 68, in dispatch
   return handler(request, *args, **kwargs)

 File "/usr/local/lib/python2.6/dist-packages/django/views/generic/base.py", 
line 151, in get
   url = self.get_redirect_url(**kwargs)

 File "/usr/local/lib/python2.6/dist-packages/django/views/generic/base.py", 
line 146, in get_redirect_url
   return url % kwargs

TypeError: not enough arguments for format string


The version I use is 1.3.1, and the urls.py line determining the 
redirection is

(r'^planes/((?P.*))', 
RedirectView.as_view(url='/tmovil/planes/%(anything)s', query_string=True)),


Is it possible the bug reported in ticket 
16842is cause for this error? If 
not, should I file a bug?

Thanks

On Saturday, August 13, 2011 12:47:30 AM UTC-4, Karen Tracey wrote:
>
> On Thu, Aug 11, 2011 at 10:48 AM, Slafs  wrote:
>
>> Should i report a ticket?
>>
>
> Yes please, that's a bug in Django.
>
> Karen
> -- 
> http://tracey.org/kmt/
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/SebYILZBuMAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Re: RedirectView with query_string = True and urlencoded unicode string

2011-08-12 Thread Karen Tracey
On Thu, Aug 11, 2011 at 10:48 AM, Slafs  wrote:

> Should i report a ticket?
>

Yes please, that's a bug in Django.

Karen
-- 
http://tracey.org/kmt/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Odp: Re: RedirectView with query_string = True and urlencoded unicode string

2011-08-11 Thread Slafs
Should i report a ticket?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/tTIMaMNLV8EJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Odp: Re: RedirectView with query_string = True and urlencoded unicode string

2011-08-11 Thread Slafs
Oh sorry. Here it is

http://dpaste.com/591903/

File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in 
get_redirect_url  146. return url % kwargsException Type: 
ValueError at /test/Exception Value: unsupported format character 'C' (0x43) at 
index 15


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/qU07EZe8UPcJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: RedirectView with query_string = True and urlencoded unicode string

2011-08-11 Thread Daniel Roseman
On Thursday, 11 August 2011 09:35:43 UTC+1, Slafs wrote:
>
> Hi there! 
>
> I'm having difficulties with the new class based RedirectView with 
> query_string = True and some unicode string in QUERY_STRING. 
> I made a sample of the error on bitbucket 
>
> https://bitbucket.org/slafs/redirectviewtest/src 
>
> could You please explain what I'm doing wrong? or maybe it is a bug in a 
> redirect view ? 
> I've read the docs about the "%" sign in urls but I think this behaviour 
> should not apply to args (query_string)
>
> Regards
>
> Sławek
>
>
You neglected to tell us what the error was, or show the traceback.
--
DR. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/940fZrOK0sAJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



RedirectView with query_string = True and urlencoded unicode string

2011-08-11 Thread Slafs
Hi there! 

I'm having difficulties with the new class based RedirectView with 
query_string = True and some unicode string in QUERY_STRING. 
I made a sample of the error on bitbucket 

https://bitbucket.org/slafs/redirectviewtest/src 

could You please explain what I'm doing wrong? or maybe it is a bug in a 
redirect view ? 
I've read the docs about the "%" sign in urls but I think this behaviour 
should not apply to args (query_string)

Regards

Sławek

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/0zE21qbsE0QJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.