Compare commits
3 Commits
14effd33e2
...
9c50e5891f
Author | SHA1 | Date | |
---|---|---|---|
|
9c50e5891f | ||
|
72094494eb | ||
|
c483c3511d |
@ -21,8 +21,7 @@ from django.contrib import admin
|
|||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.views.static import serve
|
from django.views.static import serve
|
||||||
from django.conf.urls.static import static
|
from django.conf.urls.static import static
|
||||||
from django.conf.urls import url
|
from django.urls import path, include, re_path
|
||||||
from django.urls import path, include
|
|
||||||
from django.views.generic.base import TemplateView
|
from django.views.generic.base import TemplateView
|
||||||
|
|
||||||
from lostplaces.views import SignUpView
|
from lostplaces.views import SignUpView
|
||||||
@ -32,6 +31,6 @@ urlpatterns = [
|
|||||||
path('signup/', SignUpView.as_view(), name='signup'),
|
path('signup/', SignUpView.as_view(), name='signup'),
|
||||||
path('explorer/', include('django.contrib.auth.urls')),
|
path('explorer/', include('django.contrib.auth.urls')),
|
||||||
path('', include('lostplaces.urls')),
|
path('', include('lostplaces.urls')),
|
||||||
url(r'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_ROOT}),
|
re_path(r'^static/(?P<path>.*)$', serve,{'document_root': settings.STATIC_ROOT}),
|
||||||
url(r'^uploads/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT})
|
re_path(r'^uploads/(?P<path>.*)$', serve,{'document_root': settings.MEDIA_ROOT})
|
||||||
]
|
]
|
||||||
|
@ -7,7 +7,7 @@ from django import forms
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
|
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
from lostplaces import widgets
|
from lostplaces import widgets
|
||||||
from lostplaces.models import Place, PlaceImage, Voucher, Explorer
|
from lostplaces.models import Place, PlaceImage, Voucher, Explorer
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext as _
|
||||||
from django.core.validators import MaxValueValidator, MinValueValidator
|
from django.core.validators import MaxValueValidator, MinValueValidator
|
||||||
|
|
||||||
from taggit.managers import TaggableManager
|
from taggit.managers import TaggableManager
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
from lostplaces.models.place import PlaceAsset
|
from lostplaces.models.place import PlaceAsset
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ from django.db import models
|
|||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.db.models.signals import post_save, pre_save
|
from django.db.models.signals import post_save, pre_save
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
from lostplaces.models.abstract_models import Expireable
|
from lostplaces.models.abstract_models import Expireable
|
||||||
from lostplaces.models.place import Place
|
from lostplaces.models.place import Place
|
||||||
|
@ -5,7 +5,7 @@ from django.db import models
|
|||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
from django.db.models.signals import post_delete, pre_save
|
from django.db.models.signals import post_delete, pre_save
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext as _
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|
||||||
from lostplaces.models.abstract_models import Submittable, Taggable, Mapable, Expireable
|
from lostplaces.models.abstract_models import Submittable, Taggable, Mapable, Expireable
|
||||||
|
@ -89,7 +89,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
{% partial 'nav/footer' %}
|
{% include 'partials/nav/footer.html' %}
|
||||||
{% endblock footer %}
|
{% endblock footer %}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
@ -12,13 +12,10 @@
|
|||||||
|
|
||||||
{% block maincontent %}
|
{% block maincontent %}
|
||||||
|
|
||||||
{% partial 'welcome' %}
|
{% include 'partials/welcome.html' %}
|
||||||
<article class="LP-TextSection">
|
<article class="LP-TextSection">
|
||||||
</article>
|
</article>
|
||||||
{% partial 'osm_map' %}
|
{% include 'partials/osm_map.html' with config=mapping_config modifier='wide' %}
|
||||||
{% set config mapping_config %}
|
|
||||||
{% set modifier 'wide' %}
|
|
||||||
{% endpartial %}
|
|
||||||
<div class="LP-PlaceGrid">
|
<div class="LP-PlaceGrid">
|
||||||
<h1 class="LP-Headline LP-Headline">{% translate 'Explore the latest places' %}</h1>
|
<h1 class="LP-Headline LP-Headline">{% translate 'Explore the latest places' %}</h1>
|
||||||
<ul class="LP-PlaceGrid__Grid">
|
<ul class="LP-PlaceGrid__Grid">
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
{% block maincontent %}
|
{% block maincontent %}
|
||||||
|
|
||||||
{% partial 'welcome' %}
|
{% include 'partials/welcome.html' %}
|
||||||
<article class="LP-TextSection">
|
<article class="LP-TextSection">
|
||||||
<p class="LP-Paragraph">
|
<p class="LP-Paragraph">
|
||||||
{% blocktranslate %}You can create, view and share your lost places with other members of this site. You can upload photos, place links to your web galleries and contribute your knowledge by tagging other places or commenting on them. You will find detailed information on where these locations are, how to get there and what to expect from them. This might even include detailed information on the surroundings or the history of a lost place.{% endblocktranslate %}
|
{% blocktranslate %}You can create, view and share your lost places with other members of this site. You can upload photos, place links to your web galleries and contribute your knowledge by tagging other places or commenting on them. You will find detailed information on where these locations are, how to get there and what to expect from them. This might even include detailed information on the surroundings or the history of a lost place.{% endblocktranslate %}
|
||||||
@ -25,9 +25,7 @@
|
|||||||
<a href="{% url 'place_detail' pk=place.pk %}" class="LP-Link">
|
<a href="{% url 'place_detail' pk=place.pk %}" class="LP-Link">
|
||||||
<article class="LP-PlaceTeaser">
|
<article class="LP-PlaceTeaser">
|
||||||
<div class="LP-PlaceTeaser__Image">
|
<div class="LP-PlaceTeaser__Image">
|
||||||
{% partial 'image' %}
|
{% include 'partials/image.html' with source_url=place.placeimages.first.filename.thumbnail.url %}
|
||||||
{% set source_url place.placeimages.first.filename.thumbnail.url %}
|
|
||||||
{% endpartial %}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="LP-PlaceTeaser__Meta">
|
<div class="LP-PlaceTeaser__Meta">
|
||||||
<div class="LP-PlaceTeaser__Info">
|
<div class="LP-PlaceTeaser__Info">
|
||||||
|
@ -26,12 +26,7 @@
|
|||||||
<h1 class="LP-Headline">{{ place.name }} {% include 'partials/icons/place_favorite.html' %} {% include 'partials/icons/place_visited.html' %}</h1>
|
<h1 class="LP-Headline">{{ place.name }} {% include 'partials/icons/place_favorite.html' %} {% include 'partials/icons/place_visited.html' %}</h1>
|
||||||
{% if place.get_hero_image %}
|
{% if place.get_hero_image %}
|
||||||
<div class="LP-PlaceDetail__Image">
|
<div class="LP-PlaceDetail__Image">
|
||||||
{% partial image %}
|
{% include '../partials/image.html' with source_url=place.get_hero_image.filename.hero.url link_url="#image"|addstr:place.get_hero_index_in_queryset %}
|
||||||
{% set source_url place.get_hero_image.filename.hero.url %}
|
|
||||||
{% set link_url %}
|
|
||||||
{{"#image"|addstr:place.get_hero_index_in_queryset}}
|
|
||||||
{% endset %}
|
|
||||||
{% endpartial %}
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</header>
|
</header>
|
||||||
@ -43,23 +38,18 @@
|
|||||||
<div class="LP-Quickinfo">
|
<div class="LP-Quickinfo">
|
||||||
<section class="LP-Section">
|
<section class="LP-Section">
|
||||||
{% url 'place_tag_submit' place_id=place.id as tag_submit_url %}
|
{% url 'place_tag_submit' place_id=place.id as tag_submit_url %}
|
||||||
{% partial tagging %}
|
{% include '../partials/tagging.html' with config=tagging_config %}
|
||||||
{% set config=tagging_config %}
|
|
||||||
{% endpartial %}
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{{votingplace.vote}}
|
{{votingplace.vote}}
|
||||||
<section class="LP-Section">
|
<section class="LP-Section">
|
||||||
{% partial voting %}
|
{% include '../partials/voting.html' with voting=placevoting %}
|
||||||
{% set place=place %}
|
|
||||||
{% set voting=placevoting %}
|
|
||||||
{% endpartial %}
|
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section class="LP-Section">
|
<section class="LP-Section">
|
||||||
<h1 class="LP-Headline">{% translate 'Map links' %}</h1>
|
<h1 class="LP-Headline">{% translate 'Map links' %}</h1>
|
||||||
{% partial osm_map config=mapping_config %}
|
{% include '../partials/osm_map.html' with config=mapping_config %}
|
||||||
<ul class="LP-LinkList">
|
<ul class="LP-LinkList">
|
||||||
<li class="LP-LinkList__Item">
|
<li class="LP-LinkList__Item">
|
||||||
<a target="_blank" href="https://www.google.com/maps?q={{place.latitude|safe}},{{place.longitude|safe}}" class="LP-Link">
|
<a target="_blank" href="https://www.google.com/maps?q={{place.latitude|safe}},{{place.longitude|safe}}" class="LP-Link">
|
||||||
@ -137,7 +127,7 @@
|
|||||||
|
|
||||||
<section class="LP-Section">
|
<section class="LP-Section">
|
||||||
{% translate 'Images' as headline %}
|
{% translate 'Images' as headline %}
|
||||||
{% partial "placeImageGrid" image_list=place.placeimages.all %}
|
{% include '../partials/placeImageGrid.html' with image_list=place.placeimages.all %}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</article>
|
</article>
|
||||||
|
@ -9,7 +9,7 @@ from django.urls import reverse
|
|||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
|
|
||||||
from lostplaces.models import Place
|
from lostplaces.models import Place
|
||||||
|
@ -12,7 +12,7 @@ from django.contrib.messages.views import SuccessMessageMixin
|
|||||||
|
|
||||||
from django.shortcuts import redirect, get_object_or_404
|
from django.shortcuts import redirect, get_object_or_404
|
||||||
from django.urls import reverse_lazy, reverse
|
from django.urls import reverse_lazy, reverse
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
from lostplaces.models import Place
|
from lostplaces.models import Place
|
||||||
from lostplaces.common import redirect_referer_or
|
from lostplaces.common import redirect_referer_or
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
from django.views import View
|
from django.views import View
|
||||||
|
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
from django.shortcuts import render, redirect, get_object_or_404
|
from django.shortcuts import render, redirect, get_object_or_404
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from django.views import View
|
from django.views import View
|
||||||
from django.shortcuts import get_object_or_404, redirect
|
from django.shortcuts import get_object_or_404, redirect
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
from lostplaces.views.base_views import PlaceAssetCreateView, PlaceAssetDeleteView
|
from lostplaces.views.base_views import PlaceAssetCreateView, PlaceAssetDeleteView
|
||||||
from lostplaces.models import PlaceImage, Place
|
from lostplaces.models import PlaceImage, Place
|
||||||
|
@ -10,7 +10,7 @@ from django.views.generic.detail import SingleObjectMixin
|
|||||||
|
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
from django.contrib.messages.views import SuccessMessageMixin
|
from django.contrib.messages.views import SuccessMessageMixin
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext as _
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
|
||||||
from django.shortcuts import render, redirect, get_object_or_404
|
from django.shortcuts import render, redirect, get_object_or_404
|
||||||
|
@ -9,7 +9,7 @@ from django.contrib import messages
|
|||||||
from django.urls import reverse_lazy, reverse
|
from django.urls import reverse_lazy, reverse
|
||||||
from django.shortcuts import render, redirect, get_object_or_404
|
from django.shortcuts import render, redirect, get_object_or_404
|
||||||
from django.http import HttpResponseForbidden
|
from django.http import HttpResponseForbidden
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import gettext as _
|
||||||
|
|
||||||
from lostplaces.forms import SignupVoucherForm, TagSubmitForm
|
from lostplaces.forms import SignupVoucherForm, TagSubmitForm
|
||||||
from lostplaces.models import Place, PhotoAlbum
|
from lostplaces.models import Place, PhotoAlbum
|
||||||
|
Loading…
Reference in New Issue
Block a user