Compare commits
No commits in common. "ac1d7fb5e882027a8eebc3a85d5c8eba7ec8f30b" and "1efa9b2166c69f2b2459b1f00e9248c03587528a" have entirely different histories.
ac1d7fb5e8
...
1efa9b2166
Binary file not shown.
@ -11,34 +11,16 @@ https://docs.djangoproject.com/en/3.0/ref/settings/
|
||||
"""
|
||||
|
||||
import os
|
||||
import json
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
with open( BASE_DIR + "/settings.json", "r") as userfile:
|
||||
usersettings = json.load(userfile)
|
||||
CALIBRE_DIR = os.path.abspath(usersettings["CALIBRE_DIR"])
|
||||
SECRET_KEY = usersettings["SECRET_KEY"]
|
||||
ALLOWED_HOSTS = usersettings["ALLOWED_HOSTS"]
|
||||
INTERNAL_IPS = usersettings["INTERNAL_IPS"]
|
||||
|
||||
|
||||
# CALIBRE_DIR = os.path.abspath(
|
||||
# "C:\\Users\\MassiveAtoms\\Documents\\Calibre Library")
|
||||
# SECRET_KEY = 'u(8^+rb%rz5hsx4v^^y(ul7g(4n7a8!db@s*9(m5cs*2_ppy8+'
|
||||
# ALLOWED_HOSTS = ['127.0.0.1', ]
|
||||
# INTERNAL_IPS = ['127.0.0.1', ]
|
||||
|
||||
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
|
||||
|
||||
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
CALIBRE_DIR = os.path.abspath(
|
||||
"C:\\Users\\MassiveAtoms\\Documents\\Calibre Library")
|
||||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
|
||||
|
||||
# optimisation stuff ###############################################3
|
||||
# #
|
||||
|
||||
|
||||
# optimisation stuff
|
||||
CONN_MAX_AGE = 60 * 5
|
||||
|
||||
CACHES = {
|
||||
@ -50,9 +32,6 @@ CACHES = {
|
||||
}
|
||||
}
|
||||
|
||||
## ##
|
||||
########################################################################
|
||||
## STATIC FILES ##
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/3.0/howto/static-files/
|
||||
@ -63,9 +42,23 @@ STATICFILES_DIRS = [
|
||||
]
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
## ##
|
||||
########################################################################
|
||||
## DERUG ##
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'u(8^+rb%rz5hsx4v^^y(ul7g(4n7a8!db@s*9(m5cs*2_ppy8+'
|
||||
|
||||
|
||||
ALLOWED_HOSTS = ['127.0.0.1', ]
|
||||
INTERNAL_IPS = [
|
||||
# ...
|
||||
'127.0.0.1',
|
||||
# ...
|
||||
]
|
||||
|
||||
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
@ -83,9 +76,9 @@ DEBUG_TOOLBAR_PANELS = [
|
||||
]
|
||||
|
||||
|
||||
## ##
|
||||
########################################################################
|
||||
## DERUG ##
|
||||
|
||||
|
||||
|
||||
|
||||
LOGIN_REDIRECT_URL = '/books'
|
||||
|
||||
|
BIN
CalibreWebCompanion/db.sqlite3
Normal file
BIN
CalibreWebCompanion/db.sqlite3
Normal file
Binary file not shown.
@ -6,47 +6,46 @@
|
||||
<div class="col s12 m7">
|
||||
<div class="card z-depth-0 horizontal">
|
||||
<div class="card-image">
|
||||
<a style="padding-top:15%" href=" {% static "" %}{{download}}"><img src=" {% static "" %}{{imgpath}}"
|
||||
alt="download" srcset=""></a>
|
||||
<a style="padding-top:15%" href="{{download}}"><img src=" {% static "" %}{{imgpath}}" alt="download" srcset=""></a>
|
||||
</div>
|
||||
<div class="card-stacked">
|
||||
<div class="card-content">
|
||||
<h1> {{book.title}}</h1>
|
||||
<h1> {{book.title}}</h1>
|
||||
<h4> by
|
||||
{% if book.authors %}
|
||||
{% for author in book.authors.all %}
|
||||
<a href="{{author.get_absolute_url}}">{{author.name}}</a>
|
||||
{%endfor%}
|
||||
{% else %}
|
||||
{{book.author_sort}}
|
||||
{%endif%}
|
||||
<br>
|
||||
Published by
|
||||
{% if book.publishers %}
|
||||
{% for pub in book.publishers.all %}
|
||||
<a href="{{pub.get_absolute_url}}">{{pub.name}}</a>
|
||||
{%endfor%}
|
||||
{% else %}
|
||||
Unknown
|
||||
{%endif%}
|
||||
<br>
|
||||
Tags:
|
||||
{% if book.tags %}
|
||||
{% for tag in book.tags.all %}
|
||||
<a href="{{tag.get_absolute_url}}">{{tag.name}}</a>,
|
||||
{%endfor%}
|
||||
{% else %}
|
||||
{%endif%}
|
||||
<br>
|
||||
Rating:
|
||||
{% if book.ratings %}
|
||||
{% for rating in book.ratings.all %}
|
||||
<a href="{{rating.get_absolute_url}}">{{rating}}</a>
|
||||
{%endfor%}
|
||||
{% else %}
|
||||
{%endif%}
|
||||
<br>
|
||||
<a href="{{book.publisher.get_absolute_url}}">{{book.publisher}}</a>
|
||||
{% if book.authors %}
|
||||
{% for author in book.authors.all %}
|
||||
<a href="{{author.get_absolute_url}}">{{author.name}}</a>
|
||||
{%endfor%}
|
||||
{% else %}
|
||||
{{book.author_sort}}
|
||||
{%endif%}
|
||||
<br>
|
||||
Published by
|
||||
{% if book.publishers %}
|
||||
{% for pub in book.publishers.all %}
|
||||
<a href="{{pub.get_absolute_url}}">{{pub.name}}</a>
|
||||
{%endfor%}
|
||||
{% else %}
|
||||
Unknown
|
||||
{%endif%}
|
||||
<br>
|
||||
Tags:
|
||||
{% if book.tags %}
|
||||
{% for tag in book.tags.all %}
|
||||
<a href="{{tag.get_absolute_url}}">{{tag.name}}</a>,
|
||||
{%endfor%}
|
||||
{% else %}
|
||||
{%endif%}
|
||||
<br>
|
||||
Rating:
|
||||
{% if book.ratings %}
|
||||
{% for rating in book.ratings.all %}
|
||||
<a href="{{rating.get_absolute_url}}">{{rating}}</a>
|
||||
{%endfor%}
|
||||
{% else %}
|
||||
{%endif%}
|
||||
<br>
|
||||
<a href="{{book.publisher.get_absolute_url}}">{{book.publisher}}</a>
|
||||
</h4>
|
||||
</div>
|
||||
</div>
|
||||
@ -54,9 +53,9 @@
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
{% autoescape off %}
|
||||
{{comment}}
|
||||
{% endautoescape %}
|
||||
{% autoescape off %}
|
||||
{{comment}}
|
||||
{% endautoescape %}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in New Issue
Block a user