From ee3b51a24e2cb505c660042b4615a533483f7ea1 Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 28 Feb 2012 10:56:16 +0530 Subject: [PATCH] fix regex page no issue --- manifests/ships/views.py | 1 + manifests/urls.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/ships/views.py b/manifests/ships/views.py index b8d8b82..3fd4afc 100644 --- a/manifests/ships/views.py +++ b/manifests/ships/views.py @@ -86,6 +86,7 @@ def translate(request, model, field, page_no=1): # limit = False # else: # limit = True +# print page_no try: m = models.__getattribute__(model) except AttributeError: diff --git a/manifests/urls.py b/manifests/urls.py index 25e8e58..346a9d9 100644 --- a/manifests/urls.py +++ b/manifests/urls.py @@ -15,7 +15,7 @@ urlpatterns = patterns('', # Uncomment the next line to enable the admin: # for human translators - (r'^trans/(?P[A-Za-z].*?)/(?P[A-Za-z].*?)/(?P[0-9]*?)', 'ships.views.translate'), + (r'^trans/(?P[A-Za-z].*?)/(?P[A-Za-z].*?)/(?P\d*)/', 'ships.views.translate'), # (r'^dotrans/(?P[A-Za-z].*?)/(?P[A-Za-z].*?)/', 'ships.views.dotranslate'), # for automated google translation