File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class Picture(models.Model):
1212 slug = models .SlugField (max_length = 50 , blank = True )
1313
1414 def __unicode__ (self ):
15- return '%s' % ( self .file )
15+ return self .file . name
1616
1717 @models .permalink
1818 def get_absolute_url (self ):
Original file line number Diff line number Diff line change 11from django .conf .urls .defaults import patterns , include , url
2- from django .shortcuts import redirect
2+ from django .http import HttpResponseRedirect
33
44# Uncomment the next two lines to enable the admin:
55from django .contrib import admin
99 # Examples:
1010 # url(r'^$', 'upload.views.home', name='home'),
1111
12-
13- url (r'^$' , redirect (‘url - name ’)),
12+ url (r'^$' , lambda x : HttpResponseRedirect ('/upload/new/' )),
1413 url (r'^upload/' , include ('fileupload.urls' )),
1514
1615 # Uncomment the admin/doc line below to enable admin documentation:
You can’t perform that action at this time.
0 commit comments