Hi,
Something like this might work:
from home.urls import urlpatterns as home_urls
url('^home/', include(list(login_required(x) for x in home_urls)))
Collin
On Friday, January 23, 2015 at 7:09:30 PM UTC-5, Vijay Khemlani wrote:
>
> I may be mistaken, but I don't think you can decorate an
I may be mistaken, but I don't think you can decorate an entire "include"
call
On Fri, Jan 23, 2015 at 8:51 PM, Neto wrote:
> Hi, I'm using login_required in url patterns but it does an error:
>
> urls.py
>
> from django.conf.urls import patterns, include, url
> from
Hi, I'm using login_required in url patterns but it does an error:
urls.py
from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
urlpatterns = patterns('',
url(r'^home/', login_required(include('home.urls'))),
)
error:
TypeError at
Thank you. :) i ll do my best and sort this issue out :)
On Feb 20, 2:32 pm, akaariai wrote:
> On Feb 20, 11:16 am, kalyani ram wrote:
>
>
>
>
>
>
>
>
>
> > Thank you very much Anssi. I just got it perfect :D I know i am so
> > silly with errors. but
On Feb 20, 11:16 am, kalyani ram wrote:
> Thank you very much Anssi. I just got it perfect :D I know i am so
> silly with errors. but i am beginner. Thanks alot.
> Can u help me one more error?
> I trying to make a db connection using postgresql and python2.7
> when i
Thank you very much Anssi. I just got it perfect :D I know i am so
silly with errors. but i am beginner. Thanks alot.
Can u help me one more error?
I trying to make a db connection using postgresql and python2.7
when i type import postgresql and enter I get the following error:
Python 2.7.2
On Feb 20, 10:01 am, kalyani ram wrote:
> My urls.py is as follows.
>
> from django.conf.urls.defaults import *
> from mysite.views import current_datetime, hours_ahead
>
> urlpatterns = patterns('',
> (r'^time/$', current_datetime)
> (r'^time/plus/(\d{1,2})/$',
Hey all,
I am recently trying out the examples from the link
http://www.djangobook.com/en/1.0/chapter03/, where the current time
have to be displayed and then modify and display the offset. I was
able to display the time without any issue, but with the offset part,
i get the error
TypeError at
> File "C:\Python25\Lib\site-packages\django\core\urlresolvers.py",
> line 200, in _get_urlconf_module
>self._urlconf_module = __import__(self.urlconf_name, {}, {}, [''])
>
> File "c:\projects\iFriends\..\iFriends\urls.py", line 17, in
>(r'^admi
On Fri, 2009-01-23 at 23:37 +1300, joti chand wrote:
> Hi Guys, I was doing to the tutorials from the book: Teach yourself
> django in 24 hours and Part1 hour 3 ...to view the admin site it is
> giving the following error.
That book was published before Django 1.0 was released and, in
\Python25\Lib\site-packages\django\core\urlresolvers.py",
> line 200, in _get_urlconf_module
>self._urlconf_module = __import__(self.urlconf_name, {}, {}, [''])
>
> File "c:\projects\iFriends\..\iFriends\urls.py", line 17, in
>(r'^admin/', include('django.contr
quot;c:\projects\iFriends\..\iFriends\urls.py", line 17, in
(r'^admin/', include('django.contribute.admin.urls')),
TypeError: 'tuple' object is not callable
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
12 matches
Mail list logo