Compare commits
11 Commits
feature/lo
...
cd20e730ba
Author | SHA1 | Date | |
---|---|---|---|
cd20e730ba | |||
c613d15e89 | |||
2380398fa9 | |||
4c5b9c7648 | |||
91a3f3171d | |||
4e366d94c9 | |||
773390b09f | |||
ac0121d96e | |||
a0c4f2cad3 | |||
66bd9f648b | |||
485eb7b886 |
10
Readme.md
10
Readme.md
@@ -22,7 +22,7 @@ Right now it depends on the following non-core Python 3 libraries. These can be
|
|||||||
* [django-widget-tweaks](https://github.com/jazzband/django-widget-tweaks) Tweak the form field rendering in templates, not in python-level form definitions.
|
* [django-widget-tweaks](https://github.com/jazzband/django-widget-tweaks) Tweak the form field rendering in templates, not in python-level form definitions.
|
||||||
* [django-taggit](https://github.com/jazzband/django-taggit) A simpler approach to tagging with Django.
|
* [django-taggit](https://github.com/jazzband/django-taggit) A simpler approach to tagging with Django.
|
||||||
|
|
||||||
### Bundled Dependencies
|
### Bundled Dependencies
|
||||||
We also leverage some other great OpenSource projects' code. We bundle those in the distribution to obsolete the need to pull those files from monitored CDNs.
|
We also leverage some other great OpenSource projects' code. We bundle those in the distribution to obsolete the need to pull those files from monitored CDNs.
|
||||||
|
|
||||||
* [OpenLayers](https://openlayers.org/) [6.4.3] OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles, vector data and markers loaded from any source.
|
* [OpenLayers](https://openlayers.org/) [6.4.3] OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles, vector data and markers loaded from any source.
|
||||||
@@ -88,7 +88,9 @@ Run `django_lostplaces/managy.py collectstatic` and you should be ready to go.
|
|||||||
|
|
||||||
If you haven't already setup a django instance, see [django's documentation](https://docs.djangoproject.com/en/3.1/topics/install/).
|
If you haven't already setup a django instance, see [django's documentation](https://docs.djangoproject.com/en/3.1/topics/install/).
|
||||||
|
|
||||||
After that, download the desired release (probably the latest one) [from the releases page](https://git.mowoe.com/reverend/lostplaces-backend/releases) and install it using `pip install --user name-of-the-file.tar.gz`
|
Afterwards, either
|
||||||
|
- download the desired release [from the releases page](https://git.mowoe.com/reverend/lostplaces-backend/releases) and install it using `pip install --user name-of-the-file.tar.gz`
|
||||||
|
- or install the latest release using `pip install django-lostplaces`
|
||||||
|
|
||||||
*Note: You can run pip install without the --user flag, which will require root privileges and introduces potential security issues.*
|
*Note: You can run pip install without the --user flag, which will require root privileges and introduces potential security issues.*
|
||||||
|
|
||||||
@@ -144,3 +146,7 @@ Before making the django instance public, you should tweak the config `settings.
|
|||||||
|
|
||||||
|
|
||||||
Run `django_lostplaces/manage.py collectstatic` you should be ready to go.
|
Run `django_lostplaces/manage.py collectstatic` you should be ready to go.
|
||||||
|
|
||||||
|
|
||||||
|
### Contact
|
||||||
|
If you run into any issues, have any questions or If you are interested in this project in general, feel free to get in touch with us via [reverend@reverend2048.de](mailto:reverend@reverend2048.de), we do speak English and German.
|
@@ -1,3 +1,4 @@
|
|||||||
|
exclude
|
||||||
include LICENSE
|
include LICENSE
|
||||||
include Readme.rst
|
include Readme.rst
|
||||||
include Pipfile
|
include Pipfile
|
BIN
django_lostplaces/lostplaces/static/images/missing_image.png
Normal file
BIN
django_lostplaces/lostplaces/static/images/missing_image.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
@@ -22,28 +22,7 @@
|
|||||||
{% for place in place_list %}
|
{% for place in place_list %}
|
||||||
<li class="LP-PlaceGrid__Item">
|
<li class="LP-PlaceGrid__Item">
|
||||||
<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">
|
{% include 'partials/place_teaser.html' with place=place%}
|
||||||
<div class="LP-PlaceTeaser__Image">
|
|
||||||
<img class="LP-Image" src="{{ place.placeimages.first.filename.thumbnail.url}}" />
|
|
||||||
</div>
|
|
||||||
<div class="LP-PlaceTeaser__Meta">
|
|
||||||
<div class="LP-PlaceTeaser__Info">
|
|
||||||
<span class="LP-PlaceTeaser__Title">
|
|
||||||
<h1 class="LP-Headline LP-Headline--teaser">{{place.name|truncatechars:19}}</h1>
|
|
||||||
</span>
|
|
||||||
<span class="LP-PlaceTeaser__Detail">
|
|
||||||
<p class="LP-Paragraph">{{place.location|truncatechars:25}}</p>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="LP-PlaceTeaser__Icons">
|
|
||||||
<ul class="LP-Icon__List">
|
|
||||||
<li class="LP-Icon__Item"><img class="LP-Icon" src="{% static '/icons/favourite.svg' %}" /></li>
|
|
||||||
<li class="LP-Icon__Item"><img class="LP-Icon" src="{% static '/icons/location.svg' %}" /></li>
|
|
||||||
<li class="LP-Icon__Item"><img class="LP-Icon" src="{% static '/icons/flag.svg' %}" /></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@@ -0,0 +1,37 @@
|
|||||||
|
{%load static %}
|
||||||
|
|
||||||
|
<article class="LP-PlaceTeaser {% if extended %} LP-PlaceTeaser--extended{% endif %}">
|
||||||
|
<div class="LP-PlaceTeaser__Image">
|
||||||
|
{% if place.placeimages.all|length > 0 %}
|
||||||
|
<img class="LP-Image" src="{{ place.placeimages.first.filename.thumbnail.url}}" />
|
||||||
|
{% else %}
|
||||||
|
<img class="LP-Image" src="{% static 'images/missing_image.png' %}" />
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="LP-PlaceTeaser__Meta">
|
||||||
|
<div class="LP-PlaceTeaser__Info">
|
||||||
|
<span class="LP-PlaceTeaser__Title">
|
||||||
|
<h1 class="LP-Headline LP-Headline--teaser">{{place.name|truncatechars:19}}</h1>
|
||||||
|
</span>
|
||||||
|
<span class="LP-PlaceTeaser__Detail">
|
||||||
|
<p class="LP-Paragraph">{{place.location|truncatechars:25}}</p>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="LP-PlaceTeaser__Description">
|
||||||
|
<p class="LP-Paragraph">
|
||||||
|
{% if place.description|length > 210 %}
|
||||||
|
{{place.description|truncatechars:210|truncatewords:-1}}
|
||||||
|
{% else %}
|
||||||
|
{{place.description}}
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="LP-PlaceTeaser__Icons">
|
||||||
|
<ul class="LP-Icon__List">
|
||||||
|
<li class="LP-Icon__Item"><img class="LP-Icon" src="{% static '/icons/favourite.svg' %}" /></li>
|
||||||
|
<li class="LP-Icon__Item"><img class="LP-Icon" src="{% static '/icons/location.svg' %}" /></li>
|
||||||
|
<li class="LP-Icon__Item"><img class="LP-Icon" src="{% static '/icons/flag.svg' %}" /></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</article>
|
@@ -18,37 +18,7 @@
|
|||||||
{% for place in place_list %}
|
{% for place in place_list %}
|
||||||
<li class="LP-PlaceList__Item">
|
<li class="LP-PlaceList__Item">
|
||||||
<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 LP-PlaceTeaser--extended">
|
{% include 'partials/place_teaser.html' with place=place extended=True %}
|
||||||
<div class="LP-PlaceTeaser__Image">
|
|
||||||
<img class="LP-Image" src="{{ place.placeimages.first.filename.thumbnail.url }}" />
|
|
||||||
</div>
|
|
||||||
<div class="LP-PlaceTeaser__Meta">
|
|
||||||
<div class="LP-PlaceTeaser__Info">
|
|
||||||
<span class="LP-PlaceTeaser__Title">
|
|
||||||
<h2 class="LP-Headline LP-Headline--teaser">{{place.name}}</h2>
|
|
||||||
</span>
|
|
||||||
<span class="LP-PlaceTeaser__Detail">
|
|
||||||
<p class="LP-Paragraph">{{place.location}}</p>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="LP-PlaceTeaser__Description">
|
|
||||||
<p class="LP-Paragraph">
|
|
||||||
{% if place.description|length > 210 %}
|
|
||||||
{{place.description|truncatechars:210|truncatewords:-1}}
|
|
||||||
{% else %}
|
|
||||||
{{place.description}}
|
|
||||||
{% endif %}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="LP-PlaceTeaser__Icons">
|
|
||||||
<ul class="LP-Icon__List">
|
|
||||||
<li class="LP-Icon__Item"><img class="LP-Icon" src="{% static '/icons/favourite.svg' %}" /></li>
|
|
||||||
<li class="LP-Icon__Item"><img class="LP-Icon" src="{% static '/icons/location.svg' %}" /></li>
|
|
||||||
<li class="LP-Icon__Item"><img class="LP-Icon" src="{% static '/icons/flag.svg' %}" /></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@@ -1,8 +0,0 @@
|
|||||||
# Config options for coverage
|
|
||||||
# Docs: https://coverage.readthedocs.io/en/latest/config.html
|
|
||||||
|
|
||||||
[coverage:run]
|
|
||||||
source = .
|
|
||||||
|
|
||||||
[coverage:report]
|
|
||||||
show_missing = True
|
|
9
setup.py → django_lostplaces/setup.py
Normal file → Executable file
9
setup.py → django_lostplaces/setup.py
Normal file → Executable file
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
with open('Readme.md') as f:
|
with open('../Readme.md') as f:
|
||||||
readme = f.read()
|
readme = f.read()
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
@@ -13,7 +13,7 @@ setup(
|
|||||||
author='Reverend',
|
author='Reverend',
|
||||||
author_email='reverend@reverend2048.de',
|
author_email='reverend@reverend2048.de',
|
||||||
url='https://git.mowoe.com/reverend/lostplaces-backend',
|
url='https://git.mowoe.com/reverend/lostplaces-backend',
|
||||||
packages=find_packages(exclude=['lostplaces']),
|
packages=find_packages(exclude=['django_lostplaces']),
|
||||||
long_description=readme,
|
long_description=readme,
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
classifiers=[
|
classifiers=[
|
||||||
@@ -31,5 +31,6 @@ setup(
|
|||||||
'django-widget-tweaks',
|
'django-widget-tweaks',
|
||||||
'django-taggit'
|
'django-taggit'
|
||||||
],
|
],
|
||||||
include_package_data=True
|
include_package_data=True,
|
||||||
|
license='MIT'
|
||||||
)
|
)
|
Reference in New Issue
Block a user