Re: cache decorators in urls.py error

2012-04-13 Thread Phang Mulianto
Hi Tom, i already fix it, it is because "then probably the error is that you have not imported your view function. It's hard to tell, as you just say 'different errors come out'." i just realize i not import my view in the url.py , as in documentation is not said i have to import it first before

Re: cache decorators in urls.py error

2012-04-13 Thread Tom Evans
On Fri, Apr 13, 2012 at 1:51 PM, Phang Mulianto wrote: > Hi , > > i already try Randomly trying things is unlikely to fix anything. cache_page decorates a function. Therefore, if this doesn't work: > (r'^$',cache_page(index), { 'template_name': > 'blog/public_list.html'}, >> 'index'), > then p

Re: cache decorators in urls.py error

2012-04-13 Thread Phang Mulianto
Hi , i already try (r'^$',cache_page(index), { 'template_name': 'blog/public_list.html'}, > 'index'), and even : (r'^$',cache_page(index()), { 'template_name': 'blog/public_list.html'}, > 'index'), but different error comes out... i don't know whats wrong.. anyone can help point it out.. O

Re: cache decorators in urls.py error

2012-04-10 Thread Tom Evans
On Sat, Apr 7, 2012 at 3:53 PM, Phang Mulianto wrote: > Hi, > > i have my apps and try to use cache decorator in url.py but got error. > > Here are the urls.py > > from django.views.decorators.cache import cache_page > > urlpatterns = patterns('article.views', >     #(r'^$','index', { 'template_na

cache decorators in urls.py error

2012-04-07 Thread Phang Mulianto
Hi, i have my apps and try to use cache decorator in url.py but got error. Here are the urls.py from django.views.decorators.cache import cache_page urlpatterns = patterns('article.views', #(r'^$','index', { 'template_name': 'blog/public_list.html'}, 'index'), (r'^$',cache_page('index')

Re: urls.py error: unbalanced parenthesis

2009-07-19 Thread Gabriel Gunderson
On Sun, Jul 19, 2009 at 4:02 AM, Rob B (uk) wrote: >         (r'^(?P\d{4}/, 'archive_year', entry_info_dict, This named regular-expression group is missing a ")" It should be: (?P\d{4}) http://docs.djangoproject.com/en/dev/topics/http/urls/#named-groups Best, Gabe --~--~-~--~~

Re: urls.py error: unbalanced parenthesis

2009-07-19 Thread Frédéric Hébert
2009/7/19 Rob B (uk) : > > Getting a unblanced parenthesis error with this urls setup. Not sure > why. The message is pretty self-explanatory. It seems to me that you have forgotten a parenthesis after your first symbolic group named year. Frédéric > urls.py: > from django.conf.urls.defaults im

urls.py error: unbalanced parenthesis

2009-07-19 Thread Rob B (uk)
Getting a unblanced parenthesis error with this urls setup. Not sure why. urls.py: from django.conf.urls.defaults import * from coltrane.models import Entry entry_info_dict = { 'queryset': Entry.objects.all(), 'date_field': 'pub_date', } urlpatterns = patterns('django.vi

Re: urls.py error

2006-09-25 Thread brad
Thanks Shaun Li. I just figured that out, but thank you because I very well could have still been stumped until you posted. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: urls.py error

2006-09-25 Thread brad
Opps. I posted before I treid all that I could try. I found my error thanks to you help Don Arbow and everybody's help on my last post. Thanks you all. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: urls.py error

2006-09-25 Thread Shaun Li
Just add ',' after ')' when only one note that tuple needed:(r'^select/$', 'mysite.polls.views.select'),-- Shaun Li --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Re: urls.py error

2006-09-25 Thread brad
from django.conf.urls.defaults import * urlpatterns = patterns('', # Example: # (r'^mysite/', include('mysite.apps.foo.urls.foo')), (r'^polls/$', 'mysite.polls.views.select'), (r'^polls/(?P\d+)/$', 'mysite.polls.views.detail'), (r'^polls/(?P\d+)/results/$', 'mysite.polls.views

Re: urls.py error

2006-09-25 Thread Don Arbow
On Sep 25, 2006, at 5:48 PM, brad wrote: > > Exception Type: TypeError > Exception Value:'tuple' object is not callable > Exception Location: E:\dp1\mysite\..\mysite\urls.py in ?, line 10 > > And line ten of 'urls.py' is the following: > > (r'^select/$', 'mysite.polls.views.sel

urls.py error

2006-09-25 Thread brad
Hello. I have recently received help on a related post that can be found here: http://groups.google.com/group/django-users/browse_thread/thread/272b01561e0eb43d But, I am getting an error now when I try to access my templates. Here's the error & thanks for all of the help that I may receive. Than