Compare commits
67
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
781c8db3d3 | ||
|
|
f0a115b1c5 | ||
|
|
fd225cd372 | ||
|
|
3a94f97e92 | ||
|
|
fadbe2feb9 | ||
|
|
4a6a2cc2bd | ||
|
|
24ca19756f | ||
|
|
3c9a0b8d57 | ||
|
|
7b5ed373e2 | ||
|
|
b2493a8b1f | ||
|
|
8fafb18fcc | ||
|
|
c620ee05f2 | ||
|
|
f1bc97fb5d | ||
|
|
f02fde398a | ||
|
|
b620f75ccc | ||
|
|
a97a622595 | ||
|
|
937c087b1e | ||
|
|
c92fc99dee | ||
|
|
10769c634f | ||
|
|
8a1579b966 | ||
|
|
9cd2391a21 | ||
|
|
db9dd94055 | ||
|
|
6e1f752655 | ||
|
|
5ce132a6f2 | ||
|
|
06755ce98f | ||
|
|
cc8ecb3cb2 | ||
|
|
68a7fbde07 | ||
|
|
1d89673a92 | ||
|
|
dc4ffff6cb | ||
|
|
d9b704b522 | ||
|
|
311fa257e8 | ||
|
|
bacb20b160 | ||
|
|
3ae4d01239 | ||
|
|
54e916c665 | ||
|
|
c4ff09e93f | ||
|
|
e6446c7638 | ||
|
|
1334e12f74 | ||
|
|
f14b1879cf | ||
|
|
4608d5d304 | ||
|
|
752264aac2 | ||
|
|
72b2039221 | ||
|
|
b5fe6f2607 | ||
|
|
f7f978e1d0 | ||
|
|
c48bef25bd | ||
|
|
0eed827580 | ||
|
|
c15f6feb47 | ||
|
|
04350a89ee | ||
|
|
a92b86ac05 | ||
|
|
4ab52902f0 | ||
|
|
b4a94f2890 | ||
|
|
507fe0c52c | ||
|
|
7848103e38 | ||
|
|
8a12afb8ca | ||
|
|
bb91932435 | ||
|
|
ca02f288aa | ||
|
|
351fd1664b | ||
|
|
22db838497 | ||
|
|
55980d9286 | ||
|
|
2c95c2d582 | ||
|
|
6333cea237 | ||
|
|
ddd51b468e | ||
|
|
c442790e2c | ||
|
|
a4ab372b4b | ||
|
|
891ad298f3 | ||
|
|
e19d37fbc6 | ||
|
|
b2d785c4be | ||
|
|
281c1bf8f1 |
@@ -1,3 +1,11 @@
|
||||
Dockerfile
|
||||
Procfile
|
||||
run.sh
|
||||
runtime.txt
|
||||
Makefile
|
||||
heroku.yml
|
||||
docker-compose.*
|
||||
db.sqlite3
|
||||
venv
|
||||
.env
|
||||
.github/
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '45 22 * * 4'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript', 'python' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
@@ -1,18 +0,0 @@
|
||||
name: Docker Image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile --tag marcpartensky/website:$(date +%s)
|
||||
@@ -1,76 +0,0 @@
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
# Publish `master` as Docker `latest` image.
|
||||
branches:
|
||||
- master
|
||||
|
||||
# Publish `v1.2.3` tags as releases.
|
||||
tags:
|
||||
- v*
|
||||
|
||||
# Run tests for any PRs.
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
# TODO: Change variable to your image's name.
|
||||
IMAGE_NAME: marcpartensky/website
|
||||
|
||||
jobs:
|
||||
# Run tests.
|
||||
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
if [ -f docker-compose.test.yml ]; then
|
||||
docker-compose --file docker-compose.test.yml build
|
||||
docker-compose --file docker-compose.test.yml run sut
|
||||
else
|
||||
docker build . --file Dockerfile
|
||||
fi
|
||||
|
||||
# Push image to GitHub Packages.
|
||||
# See also https://docs.docker.com/docker-hub/builds/
|
||||
push:
|
||||
# Ensure test job passes before pushing image.
|
||||
needs: test
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Build image
|
||||
run: docker build . --file Dockerfile --tag $IMAGE_NAME
|
||||
|
||||
- name: Log into registry
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
|
||||
|
||||
- name: Push image
|
||||
run: |
|
||||
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
|
||||
|
||||
# Change all uppercase to lowercase
|
||||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
||||
|
||||
# Strip git ref prefix from version
|
||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
||||
|
||||
# Strip "v" prefix from tag name
|
||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
||||
|
||||
# Use Docker `latest` tag convention
|
||||
[ "$VERSION" == "master" ] && VERSION=latest
|
||||
|
||||
echo IMAGE_ID=$IMAGE_ID
|
||||
echo VERSION=$VERSION
|
||||
|
||||
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
|
||||
docker push $IMAGE_ID:$VERSION
|
||||
@@ -0,0 +1,61 @@
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
# Publish `v1.2.3` tags as releases.
|
||||
tags:
|
||||
- v*
|
||||
|
||||
# Run tests for any PRs.
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
IMAGE_NAME: website
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Update apt
|
||||
run: sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
|
||||
- name: Install Python3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
architecture: x64
|
||||
- name: Update pip
|
||||
run: pip install -U pip
|
||||
- name: Install pipenv
|
||||
run: pip install pipenv
|
||||
- name: Lock pip dependencies
|
||||
run: pipenv lock --pre --clear
|
||||
- name: Install dependencies
|
||||
run: pipenv install
|
||||
- name: Export to requirements.txt
|
||||
run: pipenv lock -r > requirements.txt
|
||||
- name: Collecting static
|
||||
run: SECRET_KEY=secret pipenv run ./manage.py collectstatic --noinput
|
||||
- name: Preparing migrations
|
||||
run: SECRET_KEY=secret pipenv run ./manage.py makemigrations
|
||||
- name: Updating package.json
|
||||
run: npm update
|
||||
- name: Fixing audit npm bugs
|
||||
run: npm audit fix
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
- name: Build and push
|
||||
id: docker_build
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
push: true
|
||||
tags: marcpartensky/website:latest
|
||||
@@ -1,36 +0,0 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a single version of Python
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
||||
|
||||
name: Python application
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flake8 pytest
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
# stop the build if there are Python syntax errors or undefined names
|
||||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
pytest
|
||||
+6
-16
@@ -1,11 +1,11 @@
|
||||
FROM python:3.7.7
|
||||
FROM python:3.7.12
|
||||
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update
|
||||
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_15.x | bash
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash
|
||||
RUN apt-get install -y nodejs
|
||||
RUN npm install -g npm@latest
|
||||
RUN npm install
|
||||
@@ -17,23 +17,13 @@ ENV PYTHONUNBUFFERED 1
|
||||
RUN pip install -U pip
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# Needed to collectstatic
|
||||
ENV SECRET_KEY secret
|
||||
RUN ./manage.py collectstatic --noinput
|
||||
|
||||
RUN ./run.sh
|
||||
|
||||
ENV PORT 80
|
||||
EXPOSE 80
|
||||
# EXPOSE 443
|
||||
|
||||
HEALTHCHECK --interval=5s \
|
||||
--timeout=5s \
|
||||
CMD curl -f http://127.0.0.1:$PORT || exit 1
|
||||
|
||||
# EXPOSE 443
|
||||
EXPOSE 80
|
||||
|
||||
ENTRYPOINT run.sh
|
||||
CMD curl -sf http://127.0.0.1:$PORT/robots.txt || exit 1
|
||||
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
# ENTRYPOINT ["daphne", "-e", "ssl:443:privateKey=$KEY:certKey=$CERT", "django_project.asgi:application"]
|
||||
|
||||
# ENTRYPOINT ["daphne", "django_project.asgi:application", "--port", "80", "--bind", "website", "-v2"]
|
||||
|
||||
@@ -1,32 +1,46 @@
|
||||
init:
|
||||
pip install pipenv
|
||||
run: update
|
||||
pipenv run ./manage.py runserver 127.0.0.1:8000
|
||||
build: update
|
||||
docker build . -t marcpartensky/website
|
||||
docker push marcpartensky/website
|
||||
push: update build
|
||||
git add -A
|
||||
git commit -m "Makefile update"
|
||||
git pushall
|
||||
docker push marcpartensky/website
|
||||
update: install
|
||||
npm update
|
||||
npm audit fix
|
||||
pipenv lock --pre --clear
|
||||
pipenv lock -r > requirements.txt
|
||||
pipenv run ./manage.py collectstatic --noinput
|
||||
pipenv run ./manage.py makemigrations
|
||||
install:
|
||||
pip install --user pipenv
|
||||
pipenv install --dev
|
||||
npm install --save
|
||||
update:
|
||||
pipenv lock --pre --clear
|
||||
npm update
|
||||
activate:
|
||||
pipenv shell
|
||||
deactivate:
|
||||
exit
|
||||
build:
|
||||
docker build . -t marcpartensky/website
|
||||
push:
|
||||
docker push marcpartensky/website
|
||||
git pushall
|
||||
up:
|
||||
up: init
|
||||
docker-compose up -d
|
||||
down:
|
||||
docker-compose down
|
||||
run:
|
||||
pipenv run ./manage.py runserver 0.0.0.0:8000
|
||||
migrations:
|
||||
pipenv run ./manage.py makemigrations
|
||||
migrate:
|
||||
docker-compose -f dev.yml down
|
||||
docker-compose -f docker-compose.yml down
|
||||
DOCKER_HOST=ssh://vps docker-compose -f dev.ym up -d --build --force-recreate --remove-orphans website-test
|
||||
migrate: update
|
||||
pipenv run ./manage.py migrate
|
||||
shell:
|
||||
pipenv run ./manage.py shell
|
||||
test:
|
||||
pipenv run ./manage.py runserver 0.0.0.0:8000 &
|
||||
curl localhost:8000
|
||||
kill %
|
||||
brewstart:
|
||||
brew services start mysql
|
||||
brew services start redis
|
||||
brewstop:
|
||||
brew services stop mysql
|
||||
brew services stop redis
|
||||
dev:
|
||||
docker-compose -f dev.yml up -d
|
||||
exec docker-compose -f dev.yml logs -f
|
||||
prod:
|
||||
docker-compose -f docker.compose.yml up -d
|
||||
clean:
|
||||
docker-compose -f docker-compose.yml down
|
||||
docker-compose -f dev.yml down
|
||||
deploy:
|
||||
DOCKER_HOST=ssh://vps docker-compose -f dev.yml up -d --build --force-recreate --remove-orphans website-test
|
||||
DOCKER_HOST=ssh://vps docker-compose -f docker-compose.dev.ym logs -f website-test
|
||||
|
||||
@@ -98,7 +98,6 @@ pipdeptree = "*"
|
||||
pipupgrade = "*"
|
||||
priority = "*"
|
||||
prompt-toolkit = "*"
|
||||
psycopg2= "*"
|
||||
psycopg2-binary = "*"
|
||||
ptyprocess = "*"
|
||||
pyasn1 = "*"
|
||||
@@ -156,6 +155,8 @@ django-robots = "*"
|
||||
|
||||
[dev-packages]
|
||||
black = "*"
|
||||
jedi = "*"
|
||||
pylint = "*"
|
||||
|
||||
[requires]
|
||||
python_version = "3.7.7"
|
||||
python_version = "3.7.12"
|
||||
|
||||
Generated
+801
-585
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,5 @@
|
||||
author: Marc Partensky
|
||||
name: Website of Marc Partensky
|
||||
date: 8/10/2019
|
||||
---
|
||||
|
||||
[](https://github.com/MarcPartensky/Website)
|
||||
[](https://github.com/MarcPartensky/Website/actions/workflows/docker-push.yml)
|
||||
[](https://github.com/MarcPartensky/Website/actions/workflows/codeql-analysis.yml)
|
||||
|
||||
# Website
|
||||
|
||||
@@ -77,7 +73,12 @@ Build usually last 5 minutes.
|
||||

|
||||
**Scan to add me as a contact**
|
||||
|
||||
## Bonus
|
||||
# Bonus
|
||||
|
||||
## Notes
|
||||
author: Marc Partensky
|
||||
name: Website of Marc Partensky
|
||||
date: 8/10/2019
|
||||
|
||||
## Heroku Buildpacks
|
||||
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 3.1.7 on 2021-10-25 16:10
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='NotificationModel',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('message', models.TextField()),
|
||||
('source', models.GenericIPAddressField()),
|
||||
('timestamp', models.DateTimeField(auto_now_add=True)),
|
||||
('seen', models.BooleanField(default=False)),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -17,3 +17,16 @@ class MarkdownModel(models.Model):
|
||||
# print('saving model somewhere')
|
||||
# print(args, kwargs)
|
||||
# return super().save(*args, **kwargs)
|
||||
|
||||
|
||||
class NotificationModel(models.Model):
|
||||
"""A model that represents a notification."""
|
||||
|
||||
message = models.TextField()
|
||||
source = models.GenericIPAddressField()
|
||||
timestamp = models.DateTimeField(auto_now_add=True)
|
||||
seen = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
"""Return the notification sent."""
|
||||
return f"{self.message}"
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
from django.db import models
|
||||
|
||||
|
||||
class MarkdownModel(models.Model):
|
||||
"""A model to store markdown files"""
|
||||
|
||||
title = models.CharField(max_length=80)
|
||||
file = models.FileField(upload_to="markdown/")
|
||||
|
||||
class Meta:
|
||||
ordering = ["title"]
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.title}"
|
||||
|
||||
# def save(self, *args, **kwargs):
|
||||
# print('saving model somewhere')
|
||||
# print(args, kwargs)
|
||||
# return super().save(*args, **kwargs)
|
||||
|
||||
|
||||
class NotificationModel(models.Model):
|
||||
"""A model that represents a notification."""
|
||||
|
||||
message = models.TextField()
|
||||
source = models.GenericIPAddressField()
|
||||
timestamp = models.DateTimeField(auto_now_add=True)
|
||||
seen = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
"""Return the notification sent."""
|
||||
return f"{self.message}"
|
||||
+17
-1
@@ -20,7 +20,7 @@ from rest_framework.views import APIView
|
||||
|
||||
from .forms import UploadFileForm, UploadMarkdownForm, TodoForm
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from .models import MarkdownModel
|
||||
from .models import MarkdownModel, NotificationModel
|
||||
|
||||
from todo.models import Todo
|
||||
|
||||
@@ -243,3 +243,19 @@ def port(request: HttpRequest, n: int = 1):
|
||||
result = subprocess.check_output(cmd, shell=True)
|
||||
print(result)
|
||||
return HttpResponse(result)
|
||||
|
||||
@csrf_exempt
|
||||
def notify(request: HttpRequest):
|
||||
"""Notify me with a get request container
|
||||
a get variable `message`."""
|
||||
message = request.GET.get("message")
|
||||
return HttpResponse("")
|
||||
|
||||
@csrf_exempt
|
||||
def notifications(request: HttpRequest):
|
||||
"""Return the list of notifications."""
|
||||
notifications = NotificationModel.objects.filter(seen=False)
|
||||
for notification in notifications:
|
||||
notification.seen = True
|
||||
notification.save()
|
||||
return JsonResponse(notifications)
|
||||
|
||||
+25
-24
@@ -1,23 +1,19 @@
|
||||
import time
|
||||
import os
|
||||
import glob
|
||||
import random
|
||||
import datetime
|
||||
import requests
|
||||
|
||||
from django.shortcuts import render, HttpResponse, Http404
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.template import loader
|
||||
from .models import Article
|
||||
from .forms import ArticleForm
|
||||
from .adapt import adapt
|
||||
|
||||
from django.template.loader import engines
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
from django.contrib.auth.decorators import login_required
|
||||
|
||||
from home.context import home, hydrate
|
||||
from .context import get_articles_objects
|
||||
from rich import print
|
||||
|
||||
|
||||
@@ -55,14 +51,16 @@ def clean_templates():
|
||||
static_cache_path = os.path.join(os.getcwd(), "article/static/article/cache")
|
||||
templates_cache_path = os.path.join(os.getcwd(), "article/templates/cache")
|
||||
|
||||
os.system(f"rm -rf {static_cache_path}")
|
||||
if os.path.exists(static_cache_path):
|
||||
os.system(f"rm -rf {static_cache_path}")
|
||||
# print("static:", static_cache_path)
|
||||
# print("templates:", templates_cache_path)
|
||||
|
||||
print(
|
||||
"before deleting templates",
|
||||
os.listdir(templates_cache_path),
|
||||
)
|
||||
if os.path.exists(templates_cache_path):
|
||||
print(
|
||||
"before deleting templates",
|
||||
os.listdir(templates_cache_path),
|
||||
)
|
||||
path = os.path.join(templates_cache_path, "*")
|
||||
# print('path:', path)
|
||||
for file in glob.glob(path):
|
||||
@@ -79,7 +77,6 @@ def build_template(title: str, article: Article, layout: str = "marc"):
|
||||
markdown_path = os.path.join(os.getcwd(), f"media/article/{title}.md")
|
||||
html_path = os.path.join(os.getcwd(), f"article/templates/cache/{title}.html")
|
||||
article_templates = os.path.join(os.getcwd(), "article/templates/cache")
|
||||
|
||||
article_static = os.path.join(os.getcwd(), "article/static/article")
|
||||
|
||||
with open(markdown_path, "w") as f:
|
||||
@@ -106,22 +103,28 @@ def build_template(title: str, article: Article, layout: str = "marc"):
|
||||
# else:
|
||||
os.system(f"mv {layout_path} {article_static}")
|
||||
|
||||
with open(html_path, "r") as f:
|
||||
text = str(f.read())
|
||||
with open(html_path, "r") as stream:
|
||||
text = str(stream.read())
|
||||
text = adapt(text, title, layout)
|
||||
with open(html_path, "w") as f:
|
||||
f.write(text)
|
||||
with open(html_path, "w") as stream:
|
||||
stream.write(text)
|
||||
|
||||
|
||||
def read(request, title: str):
|
||||
"""Read an article."""
|
||||
reset_template_cache()
|
||||
clean_templates()
|
||||
print("title", title)
|
||||
|
||||
title_no_extension = "".join(title.split(".")[:-1])
|
||||
print("title no extension:", title_no_extension)
|
||||
if "." in title:
|
||||
title_no_extension = "".join(title.split(".")[:-1])
|
||||
else:
|
||||
title_no_extension = title
|
||||
print("title_no_extension", title_no_extension)
|
||||
|
||||
article = Article.objects.filter(title=title_no_extension).first()
|
||||
# article = Article.objects.all()[0]
|
||||
print("article.layout:", article.layout)
|
||||
if not article:
|
||||
raise Http404("This article was not found.")
|
||||
|
||||
@@ -232,16 +235,14 @@ def upload(request):
|
||||
d = fetch_article_data(request.FILES["file"], request)
|
||||
form = ArticleForm(d)
|
||||
if form.is_valid():
|
||||
print(f"[lightgreen]valid form[/]")
|
||||
print("[lightgreen]valid form[/]")
|
||||
form.save()
|
||||
return HttpResponse("success")
|
||||
else:
|
||||
print(f"[red]invalid form[/]")
|
||||
print(f"[red]{form.errors.as_data()}[/]")
|
||||
return HttpResponse("invalid form", status=500)
|
||||
elif request.method == "GET":
|
||||
print("[red]invalid form[/]")
|
||||
print(f"[red]{form.errors.as_data()}[/]")
|
||||
return HttpResponse("invalid form", status=500)
|
||||
if request.method == "GET":
|
||||
form = ArticleForm()
|
||||
context = dict(form=form)
|
||||
return render(request, "api/upload.html", context)
|
||||
else:
|
||||
raise PermissionDenied("Only GET and POST methods are allowed")
|
||||
raise PermissionDenied("Only GET and POST methods are allowed")
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
version: "3.9"
|
||||
|
||||
x-common:
|
||||
website:
|
||||
&website
|
||||
DJANGO_SETTINGS_MODULE: django_project.settings
|
||||
SECRET_KEY: admin
|
||||
FTP_URL: 0.0.0.0:21
|
||||
USER: admin
|
||||
PASSWORD: admin
|
||||
EMAIL: admin@admin.com
|
||||
postgres:
|
||||
&postgres
|
||||
POSTGRES_DB: website
|
||||
POSTGRES_USER: admin
|
||||
POSTGRES_PASSWORD: admin
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
redis:
|
||||
&redis
|
||||
REDIS_URL: redis:6379
|
||||
|
||||
services:
|
||||
# nginx:
|
||||
# image: jwilder/nginx-proxy
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - web
|
||||
# ports:
|
||||
# - "127.0.1.1:80:80"
|
||||
# volumes:
|
||||
# - /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
|
||||
website:
|
||||
environment:
|
||||
<<: *website
|
||||
<<: *postgres
|
||||
<<: *redis
|
||||
VIRTUAL_HOST: website.dev
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile
|
||||
ports:
|
||||
- "127.0.0.1:8000:80"
|
||||
working_dir: /app
|
||||
entrypoint: /app/entrypoint.sh
|
||||
command: 80 0.0.0.0
|
||||
volumes:
|
||||
- ".:/app"
|
||||
depends_on:
|
||||
- redis
|
||||
- postgres
|
||||
networks:
|
||||
- web
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-fs", "http://website:80/robots.txt"]
|
||||
interval: 1m30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
postgres:
|
||||
image: postgres
|
||||
environment:
|
||||
<<: *postgres
|
||||
ports:
|
||||
- "127.0.0.1:5432:5432"
|
||||
networks:
|
||||
- web
|
||||
|
||||
# pgadmin:
|
||||
# image: dpage/pgadmin4
|
||||
# restart: unless-stopped
|
||||
# environment:
|
||||
# PGADMIN_DEFAULT_EMAIL: admin@admin.com
|
||||
# PGADMIN_DEFAULT_PASSWORD: admin
|
||||
# VIRTUAL_HOST: postgres.dev
|
||||
# volumes:
|
||||
# - dev_pgadmin:/var/lib/pgadmin
|
||||
# ports:
|
||||
# - "15432:80"
|
||||
# networks:
|
||||
# - web
|
||||
|
||||
pgweb:
|
||||
image: sosedoff/pgweb
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "127.0.0.1:15432:8081"
|
||||
environment:
|
||||
DATABASE_URL: "postgres://admin:admin@postgres:5432/website?sslmode=disable"
|
||||
networks:
|
||||
- web
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
redis:
|
||||
image: redis
|
||||
environment:
|
||||
<<: *redis
|
||||
ports:
|
||||
- "127.0.0.1:6379:6379"
|
||||
networks:
|
||||
- web
|
||||
|
||||
rediscommander:
|
||||
image: rediscommander/redis-commander
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
VIRTUAL_HOST: redis.dev
|
||||
REDIS_HOST: redis:6379
|
||||
ports:
|
||||
- "127.0.0.1:16379:8081"
|
||||
networks:
|
||||
- web
|
||||
|
||||
website-test:
|
||||
environment:
|
||||
<<: *website
|
||||
<<: *postgres
|
||||
<<: *redis
|
||||
VIRTUAL_HOST: website.dev
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile
|
||||
working_dir: /app
|
||||
entrypoint: /app/entrypoint.sh
|
||||
command: 80 0.0.0.0
|
||||
volumes:
|
||||
- ".:/app"
|
||||
networks:
|
||||
- web
|
||||
- caddy
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-fs", "http://website:80/robots.txt"]
|
||||
interval: 1m30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
labels:
|
||||
- "caddy=test.marcpartensky.com"
|
||||
- "caddy.reverse_proxy={{upstreams http 80}}"
|
||||
|
||||
networks:
|
||||
web:
|
||||
caddy:
|
||||
external: true
|
||||
volumes:
|
||||
dev_posgres:
|
||||
dev_pgadmin:
|
||||
+44
-19
@@ -197,27 +197,50 @@ COMPRESS_OFFLINE = True
|
||||
WSGI_APPLICATION = "django_project.wsgi.application"
|
||||
|
||||
# Database
|
||||
debug = {
|
||||
DATABASES = {}
|
||||
|
||||
postgres_name = os.environ.get("POSTGRES_DB")
|
||||
if postgres_name:
|
||||
postgres_database = {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": postgres_name,
|
||||
"USER": os.environ.get("POSTGRES_USER"),
|
||||
"PASSWORD": os.environ.get("POSTGRES_PASSWORD"),
|
||||
"HOST": os.environ.get("POSTGRES_HOST"),
|
||||
"PORT": os.environ.get("POSTGRES_PORT"),
|
||||
}
|
||||
DATABASES["default"] = postgres_database
|
||||
print("PostgreSQL logins detected, using those as default")
|
||||
|
||||
mysql_name = os.environ.get("MYSQL_DATABASE")
|
||||
if mysql_name:
|
||||
mysql_database = {
|
||||
"ENGINE": "django.db.backends.mysql",
|
||||
"NAME": mysql_name,
|
||||
"USER": os.environ.get("MYSQL_USER"),
|
||||
"PASSWORD": os.environ.get("MYSQL_PASSWORD"),
|
||||
"HOST": os.environ.get("MYSQL_HOST"),
|
||||
"PORT": os.environ.get("MYSQL_PORT"),
|
||||
}
|
||||
if "default" not in DATABASES:
|
||||
DATABASES["default"] = mysql_database
|
||||
print("MySQL logins detected, using those as default")
|
||||
else:
|
||||
DATABASES["mysql"] = mysql_database
|
||||
print("MySQL logins detected, using as second database")
|
||||
|
||||
local_db = {
|
||||
"ENGINE": "django.db.backends.sqlite3",
|
||||
"NAME": os.path.join(BASE_DIR, "db.sqlite3"),
|
||||
}
|
||||
|
||||
production = {
|
||||
"ENGINE": "django.db.backends.postgresql",
|
||||
"NAME": os.environ.get("POSTGRES_NAME"),
|
||||
"USER": os.environ.get("POSTGRES_USER"),
|
||||
"PASSWORD": os.environ.get("POSTGRES_PASSWORD"),
|
||||
"HOST": os.environ.get("POSTGRES_HOST"),
|
||||
"PORT": os.environ.get("POSTGRES_PORT"),
|
||||
}
|
||||
|
||||
if DEBUG:
|
||||
DATABASES = dict(default=debug, production=production)
|
||||
if "default" not in DATABASES:
|
||||
DATABASES["default"] = local_db
|
||||
print("No database detected, using local MySQL database as default")
|
||||
else:
|
||||
DATABASES = dict(default=production, debug=debug)
|
||||
DATABASES["debug"] = local_db
|
||||
print("Using local MySQL database as debug database")
|
||||
|
||||
# print('production port:', os.environ.get('POSTGRES_PORT'))
|
||||
# print("DATABASES:", DATABASES)
|
||||
|
||||
# DATABASES = {
|
||||
# 'default': {
|
||||
@@ -451,10 +474,12 @@ MDEDITOR_CONFIGS = {
|
||||
|
||||
# SQL Explorer : https://pypi.org/project/django-sql-explorer/
|
||||
# EXPLORER_DEFAULT_CONNECTION = 'readonly'
|
||||
if DEBUG:
|
||||
EXPLORER_CONNECTIONS = {"Default": "default", "Production": "production"}
|
||||
else:
|
||||
EXPLORER_CONNECTIONS = {"Default": "default", "Debug": "debug"}
|
||||
|
||||
EXPLORER_CONNECTIONS = {"Default": "default"}
|
||||
if "mysql" in DATABASES:
|
||||
EXPLORER_CONNECTIONS["Mysql"] = "mysql"
|
||||
if "debug" in DATABASES:
|
||||
EXPLORER_CONNECTIONS["Debug"] = "debug"
|
||||
|
||||
EXPLORER_DEFAULT_CONNECTION = "default"
|
||||
|
||||
|
||||
+4
-11
@@ -3,13 +3,13 @@ x-common:
|
||||
website:
|
||||
&website
|
||||
DJANGO_SETTINGS_MODULE: django_project.settings
|
||||
SECRET_KEY: openssl rand -base64 64
|
||||
SECRET_KEY: "${openssl rand -base64 64}"
|
||||
FTP_URL: 0.0.0.0:21
|
||||
postgres:
|
||||
&postgres
|
||||
POSTGRES_NAME: website
|
||||
POSTGRESQL_USER: root
|
||||
POSTGRES_PASSWORD: openssl rand -base64 64
|
||||
POSTGRES_PASSWORD: "${openssl rand -base64 64}"
|
||||
POSTGRES_HOST: postgres
|
||||
POSTGRES_PORT: 5432
|
||||
redis:
|
||||
@@ -26,11 +26,9 @@ services:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "8000:8000"
|
||||
- "8000:80"
|
||||
working_dir: /app
|
||||
entrypoint: >
|
||||
sh -c "./manage.py migrate;
|
||||
./manage.py runserver 0.0.0.0:8000"
|
||||
entrypoint: /app/entrypoint.sh
|
||||
depends_on:
|
||||
- redis
|
||||
- postgres
|
||||
@@ -41,8 +39,6 @@ services:
|
||||
image: redis
|
||||
environment:
|
||||
<<: *redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
networks:
|
||||
- website
|
||||
|
||||
@@ -50,9 +46,6 @@ services:
|
||||
image: postgres
|
||||
environment:
|
||||
<<: *postgres
|
||||
ports:
|
||||
# - "3306:3306"
|
||||
- "5432:5432"
|
||||
networks:
|
||||
- website
|
||||
|
||||
|
||||
+13
-2
@@ -1,5 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
./manage.py makemigrations
|
||||
port=${1:-$PORT}
|
||||
addr=${2:-$ADDR}
|
||||
port=${port:-"80"}
|
||||
addr=${addr:-"127.0.0.1"}
|
||||
username=${DJANGO_SUPERUSER_USERNAME:-"admin"}
|
||||
email=${DJANGO_SUPERUSER_EMAIL:-"admin@admin.com"}
|
||||
DJANGO_SUPERUSER_PASSWORD=${PASSWORD:-$(date +%s | sha256sum | base64 | head -c 32)}
|
||||
|
||||
echo -e "Running \033[1mentrypoint.sh\033[0m using $ADDR:$PORT"
|
||||
./manage.py migrate
|
||||
daphne django_project.asgi:application --port 80 --bind website -v2
|
||||
echo -e "Creating \033[1msuper user\033[0m using:\n - username: \033[1m$username\033[0m\n - email: \033[1m$email\033[0m\n"
|
||||
./manage.py createsuperuser --user $username --email $email --noinput
|
||||
./manage.py collecstatic --noinput --clear
|
||||
daphne django_project.asgi:application --port $port --bind $addr -v2
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
<p>fdp</p>
|
||||
<!--<div class="tenor-gif-embed" data-postid="11924336" data-share-method="host" data-width="100%" data-aspect-ratio="1.3387096774193548"><a href="https://tenor.com/view/system-failure-system-down-error-gif-11924336">System Failure System Down GIF</a> from <a href="https://tenor.com/search/systemfailure-gifs">Systemfailure GIFs</a></div><script type="text/javascript" async src="https://tenor.com/embed.js"></script>-->
|
||||
|
||||
Generated
+40
-40
@@ -13,9 +13,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/ansi-regex": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
|
||||
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
@@ -93,9 +93,9 @@
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
},
|
||||
"node_modules/core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||
},
|
||||
"node_modules/emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
@@ -173,9 +173,9 @@
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz",
|
||||
"integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==",
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz",
|
||||
"integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==",
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
},
|
||||
@@ -430,24 +430,24 @@
|
||||
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
|
||||
},
|
||||
"node_modules/string-width": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
|
||||
"integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"dependencies": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"strip-ansi": "^6.0.0"
|
||||
"strip-ansi": "^6.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/strip-ansi": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
|
||||
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"dependencies": {
|
||||
"ansi-regex": "^5.0.0"
|
||||
"ansi-regex": "^5.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
@@ -483,9 +483,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/uglify-js": {
|
||||
"version": "3.13.10",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.10.tgz",
|
||||
"integrity": "sha512-57H3ACYFXeo1IaZ1w02sfA71wI60MGco/IQFjOqK+WtKoprh7Go2/yvd2HPtoJILO2Or84ncLccI4xoHMTSbGg==",
|
||||
"version": "3.14.5",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.5.tgz",
|
||||
"integrity": "sha512-qZukoSxOG0urUTvjc2ERMTcAy+BiFh3weWAkeurLwjrCba73poHmG3E36XEjd/JGukMzwTL7uCxZiAexj8ppvQ==",
|
||||
"optional": true,
|
||||
"bin": {
|
||||
"uglifyjs": "bin/uglifyjs"
|
||||
@@ -602,9 +602,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-regex": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
|
||||
"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg=="
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
|
||||
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
@@ -667,9 +667,9 @@
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
|
||||
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
|
||||
},
|
||||
"emoji-regex": {
|
||||
"version": "8.0.0",
|
||||
@@ -727,9 +727,9 @@
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"is-core-module": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz",
|
||||
"integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==",
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz",
|
||||
"integrity": "sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw==",
|
||||
"requires": {
|
||||
"has": "^1.0.3"
|
||||
}
|
||||
@@ -944,21 +944,21 @@
|
||||
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
|
||||
},
|
||||
"string-width": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
|
||||
"integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
|
||||
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
|
||||
"requires": {
|
||||
"emoji-regex": "^8.0.0",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"strip-ansi": "^6.0.0"
|
||||
"strip-ansi": "^6.0.1"
|
||||
}
|
||||
},
|
||||
"strip-ansi": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
|
||||
"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
|
||||
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
|
||||
"requires": {
|
||||
"ansi-regex": "^5.0.0"
|
||||
"ansi-regex": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"through2": {
|
||||
@@ -990,9 +990,9 @@
|
||||
}
|
||||
},
|
||||
"uglify-js": {
|
||||
"version": "3.13.10",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.10.tgz",
|
||||
"integrity": "sha512-57H3ACYFXeo1IaZ1w02sfA71wI60MGco/IQFjOqK+WtKoprh7Go2/yvd2HPtoJILO2Or84ncLccI4xoHMTSbGg==",
|
||||
"version": "3.14.5",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.5.tgz",
|
||||
"integrity": "sha512-qZukoSxOG0urUTvjc2ERMTcAy+BiFh3weWAkeurLwjrCba73poHmG3E36XEjd/JGukMzwTL7uCxZiAexj8ppvQ==",
|
||||
"optional": true
|
||||
},
|
||||
"util-deprecate": {
|
||||
|
||||
+98
-84
@@ -1,151 +1,165 @@
|
||||
#
|
||||
# These requirements were autogenerated by pipenv
|
||||
# To regenerate from the project's Pipfile, run:
|
||||
#
|
||||
# pipenv lock --requirements
|
||||
#
|
||||
|
||||
-i https://pypi.org/simple
|
||||
aioredis==1.3.1
|
||||
appdirs==1.4.4
|
||||
appnope==0.1.2
|
||||
arrow==1.1.0
|
||||
asgiref==3.3.4
|
||||
astroid==2.5.6
|
||||
async-timeout==3.0.1
|
||||
arrow==1.2.1
|
||||
asgiref==3.4.1
|
||||
astroid==2.6.6
|
||||
async-timeout==4.0.1
|
||||
attrs==21.2.0
|
||||
autobahn==21.3.1
|
||||
Automat==20.2.0
|
||||
autobahn==21.11.1
|
||||
automat==20.2.0
|
||||
backcall==0.2.0
|
||||
blessed==1.18.0
|
||||
boto3==1.17.69
|
||||
botocore==1.20.69
|
||||
certifi==2020.12.5
|
||||
cffi==1.14.5
|
||||
channels==3.0.3
|
||||
channels-redis==3.2.0
|
||||
backports.zoneinfo==0.2.1; python_version < '3.9'
|
||||
blessed==1.19.0
|
||||
boto3==1.20.23
|
||||
botocore==1.23.23
|
||||
certifi==2021.10.8
|
||||
cffi==1.15.0
|
||||
channels-redis==3.3.1
|
||||
channels==3.0.4
|
||||
chardet==4.0.0
|
||||
click==7.1.2
|
||||
charset-normalizer==2.0.9; python_version >= '3'
|
||||
click==8.0.3
|
||||
colorama==0.4.4
|
||||
commonmark==0.9.1
|
||||
constantly==15.1.0
|
||||
coverage==5.5
|
||||
cryptography==3.4.7
|
||||
coverage==6.2
|
||||
cryptography==36.0.0
|
||||
daphne==3.0.2
|
||||
decorator==5.0.7
|
||||
decorator==5.1.0
|
||||
defusedxml==0.7.1
|
||||
dj-database-url==0.5.0
|
||||
Django==3.2.2
|
||||
django-503==0.1
|
||||
django-admin==2.0.1
|
||||
django-allauth==0.44.0
|
||||
django-appconf==1.0.4
|
||||
django-allauth==0.47.0
|
||||
django-appconf==1.0.5
|
||||
django-avatar==5.0.0
|
||||
django-compressor==2.4.1
|
||||
django-compressor==3.0
|
||||
django-cors-middleware==1.5.0
|
||||
django-crispy-forms==1.11.2
|
||||
django-crispy-forms==1.13.0
|
||||
django-excel-base==1.0.4
|
||||
django-excel-response2==3.0.2
|
||||
django-extensions==3.1.3
|
||||
django-extensions==3.1.5
|
||||
django-ftpserver==0.7.0
|
||||
django-heroku==0.3.1
|
||||
django-jsonfield-backport==1.0.3
|
||||
django-libsass==0.8
|
||||
django-jsonfield-backport==1.0.4
|
||||
django-libsass==0.9
|
||||
django-markdown-view==0.0.4
|
||||
django-mdeditor==0.1.18
|
||||
django-picklefield==3.0.1
|
||||
django-q==1.3.5
|
||||
django-q==1.3.9
|
||||
django-rename-app==0.1.3
|
||||
django-robots==4.0
|
||||
django-shortuuidfield==0.1.3
|
||||
django-six==1.0.4
|
||||
django-sql-explorer==2.1.2
|
||||
django-storages==1.11.1
|
||||
djangorestframework==3.12.4
|
||||
django-sql-explorer==2.3
|
||||
django-storages==1.12.3
|
||||
django==3.2.10
|
||||
djangorestframework==3.13.0
|
||||
docopt==0.6.2
|
||||
docutils==0.17.1
|
||||
docutils==0.18.1
|
||||
flake8==3.9.2
|
||||
future==0.18.2
|
||||
graphviz==0.16
|
||||
graphviz==0.19.1
|
||||
gunicorn==20.1.0
|
||||
h2==4.0.0
|
||||
h2==4.1.0
|
||||
hiredis==2.0.0
|
||||
hpack==4.0.0
|
||||
hyperframe==6.0.1
|
||||
hyperlink==21.0.0
|
||||
idna==2.10
|
||||
importlib-metadata==4.0.1
|
||||
idna==3.3
|
||||
importlib-metadata==4.8.2
|
||||
incremental==21.3.0
|
||||
ipython==7.23.1
|
||||
ipython-genutils==0.2.0
|
||||
isort==5.8.0
|
||||
jedi==0.18.0
|
||||
jeepney==0.6.0
|
||||
ipython==7.30.1
|
||||
isort==5.10.1
|
||||
jedi==0.18.1
|
||||
jeepney==0.7.1
|
||||
jmespath==0.10.0
|
||||
keyring==23.0.1
|
||||
keyring==23.4.0
|
||||
keyrings.alt==3.2.0
|
||||
lazy-object-proxy==1.6.0
|
||||
libsass==0.20.1
|
||||
Markdown==3.2.2
|
||||
matplotlib-inline==0.1.2
|
||||
libsass==0.21.0
|
||||
markdown==3.2.2
|
||||
matplotlib-inline==0.1.3; python_version >= '3.5'
|
||||
mccabe==0.6.1
|
||||
mock==4.0.3
|
||||
msgpack==1.0.2
|
||||
msgpack-python==0.5.6
|
||||
msgpack==1.0.3
|
||||
mypy-extensions==0.4.3
|
||||
nose==1.3.7
|
||||
oauthlib==3.1.0
|
||||
packaging==20.9
|
||||
parso==0.8.2
|
||||
pathspec==0.8.1
|
||||
oauthlib==3.1.1
|
||||
packaging==21.3; python_version >= '3.6'
|
||||
parso==0.8.3
|
||||
pathspec==0.9.0
|
||||
pexpect==4.8.0
|
||||
pickleshare==0.7.5
|
||||
Pillow==8.2.0
|
||||
pip-autoremove==0.9.1
|
||||
pillow==8.4.0
|
||||
pip-autoremove==0.10.0
|
||||
pip-conflict-checker==0.6.0
|
||||
pip-review==1.1.0
|
||||
pipdeptree==2.0.0
|
||||
pipupgrade==1.9.0
|
||||
priority==1.3.0
|
||||
prompt-toolkit==3.0.18
|
||||
psycopg2==2.8.6
|
||||
psycopg2-binary==2.8.6
|
||||
pip==21.3.1; python_version >= '3.6'
|
||||
pipdeptree==2.2.0
|
||||
pipupgrade==1.11.0
|
||||
priority==2.0.0
|
||||
prompt-toolkit==3.0.24
|
||||
psycopg2-binary==2.9.2
|
||||
psycopg2==2.9.2; python_version >= '3.6'
|
||||
ptyprocess==0.7.0
|
||||
pyasn1==0.4.8
|
||||
pyasn1-modules==0.2.8
|
||||
pyasn1==0.4.8
|
||||
pycodestyle==2.7.0
|
||||
pycparser==2.20
|
||||
pycparser==2.21
|
||||
pyflakes==2.3.1
|
||||
pyftpdlib==1.5.6
|
||||
Pygments==2.9.0
|
||||
PyHamcrest==2.0.2
|
||||
PyJWT==2.1.0
|
||||
pylint==2.8.2
|
||||
pyOpenSSL==20.0.1
|
||||
pyparsing==2.4.7
|
||||
python-dateutil==2.8.1
|
||||
python-dotenv==0.17.1
|
||||
pygments==2.10.0
|
||||
pyhamcrest==2.0.3
|
||||
pyjwt==2.3.0
|
||||
pylint==3.0.0a4
|
||||
pyopenssl==21.0.0
|
||||
pyparsing==3.0.6
|
||||
python-dateutil==2.8.2
|
||||
python-dotenv==0.19.2
|
||||
python3-openid==3.2.0
|
||||
pytz==2021.1
|
||||
PyYAML==5.4.1
|
||||
rcssmin==1.0.6
|
||||
pytz-deprecation-shim==0.1.0.post0; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'
|
||||
pytz==2021.3
|
||||
pyyaml==6.0
|
||||
rcssmin==1.1.0
|
||||
redis==3.5.3
|
||||
regex==2021.4.4
|
||||
requests==2.25.1
|
||||
regex==2021.11.10
|
||||
requests-oauthlib==1.3.0
|
||||
rich==10.1.0
|
||||
rjsmin==1.1.0
|
||||
s3transfer==0.4.2
|
||||
requests==2.26.0
|
||||
rich==10.16.0
|
||||
rjsmin==1.2.0
|
||||
s3transfer==0.5.0
|
||||
screen==1.0.1
|
||||
SecretStorage==3.3.1
|
||||
service-identity==18.1.0
|
||||
shortuuid==1.0.1
|
||||
secretstorage==3.3.1
|
||||
service-identity==21.1.0
|
||||
setuptools==59.6.0; python_version >= '3.6'
|
||||
shortuuid==1.0.8
|
||||
six==1.16.0
|
||||
sqlparse==0.4.1
|
||||
sqlparse==0.4.2
|
||||
toml==0.10.2
|
||||
traitlets==5.0.5
|
||||
Twisted==21.2.0
|
||||
traitlets==5.1.1
|
||||
twisted==21.7.0
|
||||
txaio==21.2.1
|
||||
typed-ast==1.4.3
|
||||
typing-extensions==3.10.0.0
|
||||
tzlocal==2.1
|
||||
urllib3==1.26.4
|
||||
typing-extensions==4.0.1
|
||||
tzdata==2021.5; python_version >= '3.6'
|
||||
tzlocal==4.1
|
||||
urllib3==1.26.7
|
||||
wcwidth==0.2.5
|
||||
whitenoise==5.2.0
|
||||
whitenoise==5.3.0
|
||||
wrapt==1.12.1
|
||||
xlwt==1.3.0
|
||||
yarg==0.1.9
|
||||
zipp==3.4.1
|
||||
zipp==3.6.0
|
||||
zope.interface==5.4.0
|
||||
|
||||
@@ -70,7 +70,7 @@ deploy() {
|
||||
run
|
||||
}
|
||||
|
||||
update() {
|
||||
updatepip() {
|
||||
git pull
|
||||
pipenv run pip install -U pip
|
||||
pipenv run pip install -r requirements.txt -U
|
||||
|
||||
@@ -1 +1 @@
|
||||
<div class="tenor-gif-embed" data-postid="11924336" data-share-method="host" data-width="100%" data-aspect-ratio="1.3387096774193548"><a href="https://tenor.com/view/system-failure-system-down-error-gif-11924336">System Failure System Down GIF</a> from <a href="https://tenor.com/search/systemfailure-gifs">Systemfailure GIFs</a></div><script type="text/javascript" async src="https://tenor.com/embed.js"></script>
|
||||
500
|
||||
|
||||
Reference in New Issue
Block a user