Last active
December 20, 2016 07:27
-
-
Save wiesson/62c3ad8267d1551f33705e36d57d4eb5 to your computer and use it in GitHub Desktop.
https://docs.djangoproject.com/en/1.10/ref/contrib/admin/javascript/ https://docs.djangoproject.com/en/1.10/ref/contrib/admin/#modeladmin-asset-definitions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
from django.conf import settings | |
from .models import Location | |
class LocationAdmin(admin.ModelAdmin): | |
class Media: | |
css = { | |
'all': ('app/css/geocoder.css',) | |
} | |
js = ( | |
'app/js/map.js', '//maps.googleapis.com/maps/api/js?key=' + settings.API_KEY_GOOGLEMAPS + '&libraries=places&callback=initMap' | |
) | |
admin.site.register(Location, LocationAdmin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment