Hi. You misunderstood the docs a bit, I c/p'ed the url-conf bit here:
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/path/to/media'}), The problem here that is also causing the error is that the file name should be a variable and not hardcoded for every file, so instead of default.css you should instead have (?P<path>.*). This is part of the argument that serve will take, which it uses to find the right file to serve. That is why the error is saying: erve() takes at least 2 non-keyword arguments (1 given) the 2nd arguement that it expect is the document root. Hope this clear things up for you ~Jakob On 13 Apr., 13:58, amit sethi <amit.pureene...@gmail.com> wrote: > Hi , i am new to django and i am trying to serve my css file . > I followed the instruction to serve static files in development server and > made a seperate /media directory > I copied my css file into it > > and changed the url pattern to include: > (r'^site_media/default.css$', 'django.views.static.serve', > {'document_root': '/home/amit/analytics/media', 'show_indexes': > True}), > > now i get the error > serve() takes at least 2 non-keyword arguments (1 given) > i am new to web development please help > -- > A-M-I-T S|S --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---