Skip to content
This repository has been archived by the owner on Mar 13, 2019. It is now read-only.

Commit

Permalink
Remove link attribute from visualizationdescription
Browse files Browse the repository at this point in the history
  • Loading branch information
josecolella committed Jun 30, 2014
1 parent edfc73f commit 0f24f32
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion visualization/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class VisualizationModelDescription(models.Model):
description = models.TextField(db_index=True, max_length=350)

def __str__(self):
return self.title + " " + self.link
return self.title

def __lt__(self, other):
try:
Expand Down
18 changes: 12 additions & 6 deletions visualization/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,18 @@ class Index (ListView):

def get(self, request, *args, **kwargs):
if request.user.is_authenticated():
userUploadedFiles = UserUploadedFiles.objects.get(user=request.user)
data = {
'models': self.model,
'form': self.form_class,
'files': userUploadedFiles.uploadedFiles
}
try:
userUploadedFiles = UserUploadedFiles.objects.get(user=request.user)
data = {
'models': self.model,
'form': self.form_class,
'files': userUploadedFiles.uploadedFiles
}
except UserUploadedFiles.DoesNotExist:
data = {
'models': self.model,
'form': self.form_class
}
else:
data = {
'models': self.model,
Expand Down

0 comments on commit 0f24f32

Please sign in to comment.