diff options
author | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-05-13 05:28:57 +0100 |
---|---|---|
committer | substantialnoninfringinguser <substantialnoninfringinguser@gmail.com> | 2009-05-13 05:28:57 +0100 |
commit | 7c0791973ba8e1be12b612c3069da7e5c980cdc8 (patch) | |
tree | 5fedc9b1779d5d001479676e44c25157c10f4f5f /expo/models.py | |
parent | 0ec2b1c4f26d4cadf22f472d2786104e8b73cc73 (diff) | |
download | troggle-7c0791973ba8e1be12b612c3069da7e5c980cdc8.tar.gz troggle-7c0791973ba8e1be12b612c3069da7e5c980cdc8.tar.bz2 troggle-7c0791973ba8e1be12b612c3069da7e5c980cdc8.zip |
[svn] Added some actual funtionality to virtual survey binder.
Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8155 by aaron @ 1/15/2009 11:21 PM
Diffstat (limited to 'expo/models.py')
-rw-r--r-- | expo/models.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/expo/models.py b/expo/models.py index a75e8ed..e5eb87c 100644 --- a/expo/models.py +++ b/expo/models.py @@ -1,4 +1,5 @@ import urllib
+import string
from django.forms import ModelForm
from django.db import models
from django.contrib import admin
@@ -319,8 +320,9 @@ class ScannedImage(models.Model): #object_id = models.PositiveIntegerField()
#location = generic.GenericForeignKey('content_type', 'object_id')
+ #This is an ugly hack to deal with the #s in our survey scan paths. The correct thing is to write a custom file storage backend which calls urlencode on the name for making file.url but not file.path.
def correctURL(self):
- return urllib.quote(self.file.url)
+ return string.replace(self.file.url,r'#',r'%23')
def __str__(self):
return get_scan_path(self,'')
|