Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4e13842334 | ||
|
|
62c3a87cda | ||
|
|
cac6d44166 | ||
|
|
1a5f68e353 | ||
|
|
4569744726 |
1
GUIDE.md
1
GUIDE.md
@@ -138,6 +138,7 @@ Nginx is a self hosted, highly configurable webserver. Nginx can be configured t
|
||||
server {
|
||||
listen 80;
|
||||
location / {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_pass http://127.0.0.1:8080;
|
||||
}
|
||||
}
|
||||
|
||||
1
Pipfile
1
Pipfile
@@ -24,6 +24,7 @@ redis = "*"
|
||||
django-redis-cache = "*"
|
||||
pycountry = "*"
|
||||
ipaddress = "*"
|
||||
html2text = "*"
|
||||
|
||||
[pipenv]
|
||||
allow_prereleases = true
|
||||
|
||||
10
Pipfile.lock
generated
10
Pipfile.lock
generated
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "75fe7f0efbc05d6bc32c5ccaa08d3d619bf925682ca5eaffa728e74d0e8e5f66"
|
||||
"sha256": "e66668cad32f92f11324d92caa0e3e83afcb3cafe471f3ba1f178fc090dd7b6b"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {},
|
||||
@@ -118,6 +118,14 @@
|
||||
"index": "pypi",
|
||||
"version": "==20.0.4"
|
||||
},
|
||||
"html2text": {
|
||||
"hashes": [
|
||||
"sha256:c7c629882da0cf377d66f073329ccf34a12ed2adf0169b9285ae4e63ef54c82b",
|
||||
"sha256:e296318e16b059ddb97f7a8a1d6a5c1d7af4544049a01e261731d2d5cc277bbb"
|
||||
],
|
||||
"index": "pypi",
|
||||
"version": "==2020.1.16"
|
||||
},
|
||||
"idna": {
|
||||
"hashes": [
|
||||
"sha256:7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb",
|
||||
|
||||
@@ -79,7 +79,7 @@ Here's the information Shynet can give you about your visitors:
|
||||
|
||||
## Recommendations
|
||||
|
||||
Shynet isn't for everyone. It's great for personal projects and small to medium size websites, but hasn't been tested with ultra-high traffic sites. It's also requires a fair amount of technical know-how to deploy and maintain, so if you need a one-click solution, you're best served with other tools.
|
||||
Shynet isn't for everyone. It's great for personal projects and small to medium size websites, but hasn't been tested with ultra-high traffic sites. It also requires a fair amount of technical know-how to deploy and maintain, so if you need a one-click solution, you're best served with other tools.
|
||||
|
||||
## Concepts
|
||||
|
||||
|
||||
16
shynet/dashboard/tasks.py
Normal file
16
shynet/dashboard/tasks.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from celery import shared_task
|
||||
from django.core import mail
|
||||
from django.conf import settings
|
||||
import html2text
|
||||
|
||||
|
||||
@shared_task
|
||||
def send_email(to: [str], subject: str, content: str, from_email: str = None):
|
||||
text_content = html2text.html2text(content)
|
||||
mail.send_mail(
|
||||
subject,
|
||||
text_content,
|
||||
from_email or settings.DEFAULT_FROM_EMAIL,
|
||||
to,
|
||||
html_message=content,
|
||||
)
|
||||
@@ -14,7 +14,7 @@ import os
|
||||
from django.contrib.messages import constants as messages
|
||||
|
||||
# Increment on new releases
|
||||
VERSION = "v0.4.0"
|
||||
VERSION = "v0.4.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__)))
|
||||
|
||||
@@ -35,7 +35,7 @@ fi
|
||||
if [[ -n $SHYNET_WHITELABEL && ${sanity_results[3]} == True ]]; then
|
||||
echo "Setting whitelabel..."
|
||||
{
|
||||
./manage.py whitelabel $SHYNET_WHITELABEL && echo "Whitelabel set! Whitelabel: $SHYNET_WHITELABEL"
|
||||
./manage.py whitelabel "$SHYNET_WHITELABEL" && echo "Whitelabel set! Whitelabel: $SHYNET_WHITELABEL"
|
||||
} || {
|
||||
echo "Failed to set whitelabel, exiting" & exit 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user