Follow django-chickpea rename to django-leaflet-storage
This commit is contained in:
parent
ef3b7ed150
commit
40c7fdf085
15 changed files with 21 additions and 21 deletions
|
@ -5,7 +5,7 @@ About
|
||||||
-----
|
-----
|
||||||
YouMap let you create map with OpenStreetMap layers in a minute and embed them in your site.
|
YouMap let you create map with OpenStreetMap layers in a minute and embed them in your site.
|
||||||
*Be cause we think that the more OSM will be used, the more OSM will be ''cured''.*
|
*Be cause we think that the more OSM will be used, the more OSM will be ''cured''.*
|
||||||
It uses `django-chickpea <https://github.com/yohanboniface/django-chickpea>`_, built on top of Django and Leaflet.
|
It uses `django-leaflet-storage <https://github.com/yohanboniface/django-leaflet-storage>`_, built on top of Django and Leaflet.
|
||||||
|
|
||||||
|
|
||||||
Quickstart
|
Quickstart
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
django==1.4.2
|
django==1.4.2
|
||||||
#south==0.7.6
|
#south==0.7.6
|
||||||
git+git://github.com/petry/django-foundation.git
|
git+git://github.com/petry/django-foundation.git
|
||||||
git+git://github.com/yohanboniface/django-chickpea.git
|
git+git://github.com/yohanboniface/django-leaflet-storage.git
|
||||||
git+git://github.com/frankban/django-endless-pagination.git
|
git+git://github.com/frankban/django-endless-pagination.git
|
||||||
hg+https://bitbucket.org/liberation/sesql
|
hg+https://bitbucket.org/liberation/sesql
|
||||||
django_compressor
|
django_compressor
|
|
@ -34,7 +34,7 @@ CHARSET = "utf-8"
|
||||||
from sesql.fields import *
|
from sesql.fields import *
|
||||||
from sesql.sources import *
|
from sesql.sources import *
|
||||||
from django.db.models import Q
|
from django.db.models import Q
|
||||||
from chickpea import models
|
from leaflet_storage import models
|
||||||
|
|
||||||
#
|
#
|
||||||
# Select the ORM to use
|
# Select the ORM to use
|
||||||
|
|
|
@ -25,7 +25,7 @@ LANGUAGES = (
|
||||||
SECRET_KEY = 'j6fly6aomgo6!3_$v#9kvhw-%wgs1@1l6x+4nr73tmn40=&_@&'
|
SECRET_KEY = 'j6fly6aomgo6!3_$v#9kvhw-%wgs1@1l6x+4nr73tmn40=&_@&'
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
'chickpea',
|
'leaflet_storage',
|
||||||
'foundation',
|
'foundation',
|
||||||
'endless_pagination',
|
'endless_pagination',
|
||||||
'youmap',
|
'youmap',
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<div class="twelve columns">
|
<div class="twelve columns">
|
||||||
<div class="row map_list">
|
<div class="row map_list">
|
||||||
{% if maps %}
|
{% if maps %}
|
||||||
{% include "chickpea/map_list.html" %}
|
{% include "leaflet_storage/map_list.html" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="twelve mobile-six columns">
|
<div class="twelve mobile-six columns">
|
||||||
{{ current_user }} has not map yet.
|
{{ current_user }} has not map yet.
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% load chickpea_tags compress %}
|
{% load leaflet_storage_tags compress %}
|
||||||
{% block title %}{{ map.name }}{% endblock %}
|
{% block title %}{{ map.name }}{% endblock %}
|
||||||
{% block body_class %}map_detail{% endblock %}
|
{% block body_class %}map_detail{% endblock %}
|
||||||
|
|
||||||
{% block extra_head %}
|
{% block extra_head %}
|
||||||
{% compress css %}
|
{% compress css %}
|
||||||
{% chickpea_css %}
|
{% leaflet_storage_css %}
|
||||||
<link rel="stylesheet" href="{{ STATIC_URL }}storage/contrib/css/storage.ui.default.css">
|
<link rel="stylesheet" href="{{ STATIC_URL }}storage/contrib/css/storage.ui.default.css">
|
||||||
{% endcompress %}
|
{% endcompress %}
|
||||||
{% compress js %}
|
{% compress js %}
|
||||||
{% chickpea_js %}
|
{% leaflet_storage_js %}
|
||||||
{% endcompress %}
|
{% endcompress %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% block map_init %}
|
{% block map_init %}
|
||||||
{% include "chickpea/map_init.html" %}
|
{% include "leaflet_storage/map_init.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
|
@ -1,4 +1,4 @@
|
||||||
{% load chickpea_tags endless %}
|
{% load leaflet_storage_tags endless %}
|
||||||
|
|
||||||
{% paginate 5 maps %}
|
{% paginate 5 maps %}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{% load chickpea_tags %}
|
{% load leaflet_storage_tags %}
|
||||||
<h3>Choose your tilelayer</h3>
|
<h3>Choose your tilelayer</h3>
|
||||||
<form action="{% url map_update_tilelayers map.pk %}" method="post" id="map_edit">
|
<form action="{% url map_update_tilelayers map.pk %}" method="post" id="map_edit">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
|
@ -1,13 +1,13 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
{% load chickpea_tags compress %}
|
{% load leaflet_storage_tags compress %}
|
||||||
|
|
||||||
{% block extra_head %}
|
{% block extra_head %}
|
||||||
{% compress css %}
|
{% compress css %}
|
||||||
{% chickpea_css %}
|
{% leaflet_storage_css %}
|
||||||
{% endcompress css %}
|
{% endcompress css %}
|
||||||
{% compress js %}
|
{% compress js %}
|
||||||
{% chickpea_js %}
|
{% leaflet_storage_js %}
|
||||||
{% endcompress js %}
|
{% endcompress js %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="twelve columns">
|
<div class="twelve columns">
|
||||||
<div class="row map_list">
|
<div class="row map_list">
|
||||||
{% include "chickpea/map_list.html" %}
|
{% include "leaflet_storage/map_list.html" %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<div class="twelve columns">
|
<div class="twelve columns">
|
||||||
<div class="row map_list">
|
<div class="row map_list">
|
||||||
{% if maps %}
|
{% if maps %}
|
||||||
{% include "chickpea/map_list.html" %}
|
{% include "leaflet_storage/map_list.html" %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="twelve mobile-six columns">
|
<div class="twelve mobile-six columns">
|
||||||
Not map found.
|
Not map found.
|
||||||
|
|
|
@ -16,7 +16,7 @@ urlpatterns = patterns('',
|
||||||
url(r'^$', views.home, name="home"),
|
url(r'^$', views.home, name="home"),
|
||||||
url(r'^search/$', views.search, name="search"),
|
url(r'^search/$', views.search, name="search"),
|
||||||
url(r'^user/(?P<username>[-_\w]+)/$', views.user_maps, name='user_maps'),
|
url(r'^user/(?P<username>[-_\w]+)/$', views.user_maps, name='user_maps'),
|
||||||
(r'', include('chickpea.urls')),
|
(r'', include('leaflet_storage.urls')),
|
||||||
)
|
)
|
||||||
|
|
||||||
if settings.DEBUG and settings.MEDIA_ROOT:
|
if settings.DEBUG and settings.MEDIA_ROOT:
|
||||||
|
|
|
@ -5,12 +5,12 @@ from django.db.models import Q
|
||||||
|
|
||||||
from sesql.shortquery import shortquery
|
from sesql.shortquery import shortquery
|
||||||
|
|
||||||
from chickpea.models import Map
|
from leaflet_storage.models import Map
|
||||||
|
|
||||||
|
|
||||||
class Home(TemplateView):
|
class Home(TemplateView):
|
||||||
template_name = "youmap/home.html"
|
template_name = "youmap/home.html"
|
||||||
list_template_name = "chickpea/map_list.html"
|
list_template_name = "leaflet_storage/map_list.html"
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
maps = Map.objects.order_by('-modified_at')[:100]
|
maps = Map.objects.order_by('-modified_at')[:100]
|
||||||
|
@ -36,7 +36,7 @@ class UserMaps(DetailView):
|
||||||
model = User
|
model = User
|
||||||
slug_url_kwarg = 'username'
|
slug_url_kwarg = 'username'
|
||||||
slug_field = 'username'
|
slug_field = 'username'
|
||||||
list_template_name = "chickpea/map_list.html"
|
list_template_name = "leaflet_storage/map_list.html"
|
||||||
context_object_name = "current_user"
|
context_object_name = "current_user"
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
|
@ -60,7 +60,7 @@ user_maps = UserMaps.as_view()
|
||||||
|
|
||||||
class Search(TemplateView):
|
class Search(TemplateView):
|
||||||
template_name = "youmap/search.html"
|
template_name = "youmap/search.html"
|
||||||
list_template_name = "chickpea/map_list.html"
|
list_template_name = "leaflet_storage/map_list.html"
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
q = self.request.GET['q']
|
q = self.request.GET['q']
|
||||||
|
|
Loading…
Reference in a new issue