- Timestamp:
- Jul 12, 2011, 3:28:05 PM (13 years ago)
- Location:
- src/django_gheat
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/gheat/admin.py
r9054 r9395 1 from gheat.models import Accespoint, Apparatuur, Gebruiker, MeetRondje, Meting 1 from gheat.models import Accespoint, Apparatuur, Gebruiker, MeetRondje, Meting, MeetBestand 2 2 from django.contrib import admin 3 3 … … 5 5 admin.site.register(Apparatuur) 6 6 admin.site.register(Gebruiker) 7 admin.site.register(MeetRondje) 7 class MeetBestandInline(admin.TabularInline): 8 model = MeetBestand 9 class MeetRondjeAdmin(admin.ModelAdmin): 10 inlines = [ MeetBestandInline, ] 11 12 admin.site.register(MeetRondje, MeetRondjeAdmin) 8 13 admin.site.register(Meting) -
src/django_gheat/gheat/models.py
r9245 r9395 80 80 return "%s - %s" % (self.gebruiker.naam, self.naam) 81 81 82 class MeetBestand(models.Model): 83 meetrondje = models.ForeignKey(MeetRondje) 84 bestand = models.FileField(upload_to='meet-bestand/%Y/%m/%d') 85 86 82 87 class Meting(models.Model): 83 88 meetrondje = models.ForeignKey(MeetRondje) -
src/django_gheat/settings.py
r9394 r9395 59 59 # Absolute path to the directory that holds media. 60 60 # Example: "/home/media/media.lawrence.com/" 61 MEDIA_ROOT = '' 61 MEDIA_ROOT = os.path.join(PROJECT_HOME,'sitemedia') 62 62 63 63 64 # URL that handles the media served from MEDIA_ROOT. Make sure to use a 64 65 # trailing slash if there is a path component (optional in other cases). 65 66 # Examples: "http://media.lawrence.com", "http://example.com/media/" 66 MEDIA_URL = '' 67 68 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a 69 # trailing slash. 70 # Examples: "http://foo.com/media/", "/media/". 71 ADMIN_MEDIA_PREFIX = '/media/' 67 MEDIA_URL = '/media/' 72 68 73 69 # Absolute path to the directory static files should be collected to. … … 75 71 # in apps' "static/" subdirectories and in STATICFILES_DIRS. 76 72 # Example: "/home/media/media.lawrence.com/static/" 77 STATIC_ROOT = 'sitestatic'73 STATIC_ROOT = os.path.join(PROJECT_HOME,'sitestatic') 78 74 79 75 # URL prefix for static files.
Note:
See TracChangeset
for help on using the changeset viewer.