Benjamin Klüglein committed 1305748

Renamed File model to UploadedFile

Comments (0)

Files changed (3)

 from datenaustausch.upload.models import *
 from django.contrib import admin
 UPLOAD_DIR = "uploaded_files"
-class File(models.Model):
+class UploadedFile(models.Model):
     owner = models.ForeignKey(User)
     name = models.CharField(max_length=128, blank=False, null=False)
     description = models.TextField(max_length=512)
         return path.basename(
 class UploadTicket(models.Model):
-    referenced_file = models.ForeignKey(File, null=True, blank=True)
+    referenced_file = models.ForeignKey(UploadedFile, null=True, blank=True)
     identifier = models.CharField(max_length=48, blank=True, unique=True)
     created_by = models.ForeignKey(User)
     created_at = models.DateTimeField("Created at", auto_now=True)
 from django.http import HttpResponse, Http404, HttpResponseForbidden
 from django.shortcuts import render_to_response, get_object_or_404
-from datenaustausch.upload.models import File
+from datenaustausch.upload.models import UploadedFile
 from datenaustausch.upload.forms import DownloadFileForm
 def download(request, download_id):
-    f = get_object_or_404(File, pk=download_id)
+    f = get_object_or_404(UploadedFile, pk=download_id)
     if request.method == 'GET':
         form = DownloadFileForm()
         return render_to_response("templates/upload/show_download.html", {"download" : f, 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.