Some minor changes

This commit is contained in:
Kumi 2018-11-26 09:21:49 +01:00
parent eefaaabc8c
commit 669132b282
5 changed files with 17 additions and 18 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
db.sqlite3
__pycache__
*.pyc
static

View file

@ -10,7 +10,6 @@
<title>VPN360 Device Administration</title>
<!-- Bootstrap core CSS -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
@ -18,7 +17,6 @@
<body>
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark static-top">
<div class="container">
<a class="navbar-brand" href="/">VPN360 Device Administration</a>
@ -44,7 +42,6 @@
</div>
</nav>
<!-- Page Content -->
<div class="container">
<div class="row">
<div class="col-lg-12">
@ -56,7 +53,6 @@
</div>
</div>
<!-- Bootstrap core JavaScript -->
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.bundle.min.js"></script>

View file

@ -6,7 +6,7 @@
<p><b>User:</b> {{ user.firstname }} {{ user.lastname }} ({{ user.username }})</p>
<div class="table-responsive">
<table class="table">
<table id="table" class="table">
<thead>
<tr>
<th>Device ID</th>

10
setup.sh Normal file
View file

@ -0,0 +1,10 @@
#!/bin/bash
sudo apt install -y python3-pip
sudo pip3 install django uwsgi
./manage.py collectstatic
sudo cp vpnmanager.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable vpnmanager
sudo systemctl start vpnmanager
echo "This should be working so far. Now point your webserver to uwsgi.sock using its WSGI options. Be sure to include the static files at static/static_root/"

View file

@ -1,15 +1,3 @@
"""
Django settings for vpnmanager project.
Generated by 'django-admin startproject' using Django 2.1.3.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
@ -23,7 +11,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SECRET_KEY = '=go8&h#^kh6ksr11e2z-@4qqd6t%63$x#-!s#l_yhw@oyanrys'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
DEBUG = False
ALLOWED_HOSTS = ["admin360.kumi.host"]
@ -50,6 +38,8 @@ MIDDLEWARE = [
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]
STATIC_ROOT = os.path.join(BASE_DIR, 'static', 'static_root')
ROOT_URLCONF = 'vpnmanager.urls'
TEMPLATES = [
@ -122,3 +112,5 @@ STATIC_URL = '/static/'
LOGIN_REDIRECT_URL = '/'
LOGOUT_REDIRECT_URL = '/'
DEFAULT_FROM_EMAIL = 'VPN360 Administration <noreply@admin360.kumi.host>'