Ignore:
Timestamp:
Jul 12, 2011, 3:28:05 PM (13 years ago)
Author:
rick
Message:

We might as well want to store the results in the Django instance as well. Save some other hacks.

Location:
src/django_gheat/gheat
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/django_gheat/gheat/admin.py

    r9054 r9395  
    1 from gheat.models import Accespoint, Apparatuur, Gebruiker, MeetRondje, Meting
     1from gheat.models import Accespoint, Apparatuur, Gebruiker, MeetRondje, Meting, MeetBestand
    22from django.contrib import admin
    33
     
    55admin.site.register(Apparatuur)
    66admin.site.register(Gebruiker)
    7 admin.site.register(MeetRondje)
     7class MeetBestandInline(admin.TabularInline):
     8  model = MeetBestand
     9class MeetRondjeAdmin(admin.ModelAdmin):
     10  inlines = [ MeetBestandInline, ]
     11
     12admin.site.register(MeetRondje, MeetRondjeAdmin)
    813admin.site.register(Meting)
  • src/django_gheat/gheat/models.py

    r9245 r9395  
    8080    return "%s - %s" % (self.gebruiker.naam, self.naam)
    8181
     82class MeetBestand(models.Model):
     83  meetrondje = models.ForeignKey(MeetRondje)
     84  bestand = models.FileField(upload_to='meet-bestand/%Y/%m/%d')
     85 
     86
    8287class Meting(models.Model):
    8388  meetrondje = models.ForeignKey(MeetRondje)
Note: See TracChangeset for help on using the changeset viewer.