Changeset 9747 for src/django_gheat/gheat
- Timestamp:
- Dec 3, 2011, 11:01:20 AM (13 years ago)
- Location:
- src/django_gheat/gheat
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/gheat/admin.py
r9637 r9747 10 10 class MeetBestandInline(admin.TabularInline): 11 11 model = MeetBestand 12 readonly_fields = ['is_imported'] 13 12 14 class MeetRondjeAdmin(admin.ModelAdmin): 13 15 inlines = [ MeetBestandInline, ] … … 25 27 26 28 class MeetBestandAdmin(admin.ModelAdmin): 27 list_display = ['meetrondje', 'bestand', 'is_imported'] 29 list_display = ['meetrondje', 'bestand', 'filetype', 'is_imported'] 30 readonly_fields = ['is_imported'] 28 31 admin.site.register(MeetBestand, MeetBestandAdmin) 29 32 -
src/django_gheat/gheat/models.py
r9664 r9747 108 108 verbose_name_plural = 'MeetRondjes' 109 109 110 FILE_TYPES = ( 111 ( 'netxml', 'Netstumbler NetXML'), 112 ( 'gpsxml', 'Netstumbler GPSXML'), 113 ( 'droidcsv', 'DroidStumbler CSV'), 114 ) 115 110 116 class MeetBestand(models.Model): 111 117 meetrondje = models.ForeignKey(MeetRondje) 112 118 bestand = models.FileField(upload_to='scan-data/%Y/%m/%d') 113 is_imported = models.BooleanField(default=False) 119 filetype = models.CharField(max_length=64,choices=FILE_TYPES,default='netxml') 120 is_imported = models.BooleanField(default=False,help_text="This field get set the moment the data is processed into the database") 114 121 class Meta: 115 122 verbose_name_plural = 'MeetBestanden'
Note:
See TracChangeset
for help on using the changeset viewer.