yes, of course. --------------------- from django.views.generic.create_update import create_object, update_object from django.views.generic.simple import redirect_to from voting.views import vote_on_object from project.komentar.models import *
komentar_vote_dict = { 'model': Komentar, 'template_object_name': 'komentar', } komentar_date_dict = { 'queryset': Komentar.objects.all().select_related(), 'date_field': 'created', 'template_object_name': 'komentar', } komentar_latest_dict = { 'queryset': Komentar.objects.order_by('- created').select_related(), 'template_object_name': 'komentar', 'extra_context' : { 'sort' : 'latest' }, 'allow_empty': 'true', 'paginate_by': 25, 'template_name' : 'komentar/komentar_list.html', } urlpatterns = patterns('', (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(? P<slug>[-\w]+)/$', object_detail, dict(komentar_date_dict, slug_field='slug')), (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/ $', archive_day, dict(komentar_date_dict, allow_empty=True)), (r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/ $', archive_month, dict(komentar_date_dict, allow_empty=True)), (r'^(?P<object_id>\d+)/(?P<direction>up|down|clear)/?$', vote_on_object, komentar_vote_dict), (r'^edit/(?P<object_id>\d+)/$', update_object, dict(model=Komentar, login_required=True, template_name="komentar/ komentar_edit_form.html")), (r'^create/$', create_object, dict(model=Komentar, login_required=True, post_save_redirect="/ komentar/latest/")), (r'^latest/$', object_list, dict(komentar_latest_dict)), (r'^$', redirect_to, {'url': '/komentar/ latest/'}), ) this is urls.py from project/app. i'll paste urls.py from project too: ------------------------------------ from django.conf.urls.defaults import * from django.views.generic.simple import direct_to_template, redirect_to from registration.views import register from project.user_details.views import create_user_profile urlpatterns = patterns('', (r'^komentar/$', include('project.komentar.urls')), (r'^users/', include('project.user_details.urls')), (r'^accounts/register/$', register, {'profile_callback': create_user_profile}), (r'^accounts/', include('registration.urls')), (r'^accounts/profile/$', redirect_to, {'url': '/'}), (r'^accounts/$', direct_to_template, {'template': 'registration/index.html'}), (r'^$', direct_to_template, {'template': 'homepage.html'}), (r'^admin/', include('django.contrib.admin.urls')), (r'^r/', include('django.conf.urls.shortcut')), (r'', include('django.contrib.flatpages.urls')), ) I'm sorry for this long paste.. i could you dpaste. thanks, martin On Nov 15, 8:50 pm, RajeshD <[EMAIL PROTECTED]> wrote: > > could someone please point me where to look to solve this? since i'm a > > newbie in django, this is probably a stupid question: if i'm getting > > no module named views, does this mean that django can't find urls.py > > or is it because views.py is empty (everything is in urls.py)? > > Care to paste here your urls.py file from the project/apps directory? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---