Changeset 11406 for src/django_gheat/gheat
- Timestamp:
- Aug 16, 2012, 9:00:50 PM (12 years ago)
- Location:
- src/django_gheat/gheat
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/gheat/admin.py
r9819 r11406 4 4 class AccesspointAdmin(admin.ModelAdmin): 5 5 list_display = ['ssid','type', 'mac', 'organization'] 6 search_fields = ['ssid', 'mac', 'organization ']6 search_fields = ['ssid', 'mac', 'organization__name'] 7 7 ordering = ['ssid'] 8 8 admin.site.register(Accesspoint, AccesspointAdmin) -
src/django_gheat/gheat/dataimport/__init__.py
r9819 r11406 64 64 global organizations 65 65 if not organizations: 66 organizations = dict(Organization.objects.all().values_list('name','id'))66 organizations = dict(Organization.objects.all().values_list('name','id')) 67 67 68 68 name = Organization.get_name_by_ssid(ssid) 69 if not name:70 return 'NULL'69 if not organizations.has_key(name): 70 return None 71 71 else: 72 return int(organizations[name])72 return str(organizations[name]) 73 73 74 74
Note:
See TracChangeset
for help on using the changeset viewer.