fix regex page no issue

This commit is contained in:
Sanj 2012-02-28 10:56:16 +05:30
parent 03edb7e6b4
commit ee3b51a24e
2 changed files with 2 additions and 1 deletions

View File

@ -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:

View File

@ -15,7 +15,7 @@ urlpatterns = patterns('',
# Uncomment the next line to enable the admin:
# for human translators
(r'^trans/(?P<model>[A-Za-z].*?)/(?P<field>[A-Za-z].*?)/(?P<page_no>[0-9]*?)', 'ships.views.translate'),
(r'^trans/(?P<model>[A-Za-z].*?)/(?P<field>[A-Za-z].*?)/(?P<page_no>\d*)/', 'ships.views.translate'),
# (r'^dotrans/(?P<model>[A-Za-z].*?)/(?P<field>[A-Za-z].*?)/', 'ships.views.dotranslate'),
# for automated google translation