Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for comments #2

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Extends change list admin template to show saved addresses on the map.
Also modify the Media class.
  • Loading branch information
gipi committed Jan 3, 2013
commit 1755f7dd6834c2aa3ca92e071ac3b5949001498e
5 changes: 5 additions & 0 deletions easy_maps/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ class Meta:
class AddressAdmin(admin.ModelAdmin):
search_fields = ['address']
form = AddressAdminForm
class Media:
js = (
'https://maps.google.com/maps/api/js?sensor=false',
'js/easy_maps.js',
)

def get_urls(self):
"""Add a view that serves geolocalized data on POST request
Expand Down
6 changes: 6 additions & 0 deletions easy_maps/templates/admin/easy_maps/change_list.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% extends "admin/change_list.html" %}
{% load easy_maps_tags %}
{% block result_list %}
{{block.super}}
{% easy_map cl.query_set 900 700 %}
{% endblock %}