Hi guys!

I used webware for a long time and I want to test newer tecnologies
now. I really liking the way Django works. One of the coolest thing I
see in django is the decoupling of applications to be able to attach
then in many projects.

Well, I'm trying the polls application and I try to be as much
decoupled as possible. I do the example exactly as the doc suggests,
nothing wrong happens, I decide to go ahead and first I create a
template dir inside my application, the templates should go in the
polls/templates/polls/ reather than in a specific local to store
templates. My application was still coupled to the project by the
urls.py module, see:

 urlpatterns = patterns('',
     (r'^$', 'django.views.generic.list_detail.object_list',
info_dict),
     (r'^(?P<object_id>\d+)/$',
'django.views.generic.list_detail.object_detail', info_dict),
     (r'^(?P<object_id>\d+)/results/$',
         'django.views.generic.list_detail.object_detail',
dict(info_dict, template_name='polls/results.html')),
     (r'^(?P<object_id>\d+)/vote/$', 'saraswati.polls.views.vote'),
 )

Note that the last line is coupled to my project. I try to use just
"views.vote" without success, I try to import vote function from the
views module and use that function instead of the string without
success too. How can I decouple this url?

Besides the url, I have problems with internationalization, I marked
the proper strings in the views, templates and models, created the
polls/conf/locale, generated the pt_BR locale set with make-messages.py
and compile-messages.py. I add the LocaleMiddleware to the
MIDDLEWARE_CLASSES too, just after SessionMiddleware. None of my
messages was replaced by the proper translation. What am I doing wrong?

Thanks for the good job with Django,
Regards.


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to