File tree 2 files changed +3
-4
lines changed
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):
12
12
slug = models .SlugField (max_length = 50 , blank = True )
13
13
14
14
def __unicode__ (self ):
15
- return '%s' % ( self .file )
15
+ return self .file . name
16
16
17
17
@models .permalink
18
18
def get_absolute_url (self ):
Original file line number Diff line number Diff line change 1
1
from django .conf .urls .defaults import patterns , include , url
2
- from django .shortcuts import redirect
2
+ from django .http import HttpResponseRedirect
3
3
4
4
# Uncomment the next two lines to enable the admin:
5
5
from django .contrib import admin
9
9
# Examples:
10
10
# url(r'^$', 'upload.views.home', name='home'),
11
11
12
-
13
- url (r'^$' , redirect (‘url - name ’)),
12
+ url (r'^$' , lambda x : HttpResponseRedirect ('/upload/new/' )),
14
13
url (r'^upload/' , include ('fileupload.urls' )),
15
14
16
15
# Uncomment the admin/doc line below to enable admin documentation:
You can’t perform that action at this time.
0 commit comments