Skip to content
Snippets Groups Projects
Commit 39855c48 authored by tuhe's avatar tuhe
Browse files

updates

parent d4d81895
Branches
No related tags found
No related merge requests found
Showing
with 33 additions and 12 deletions
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
File added
...@@ -15,30 +15,45 @@ import os ...@@ -15,30 +15,45 @@ import os
# import django # import django
# django.setup() # django.setup()
# def debug():
# return socket.gethostname() == 'COMP-NB2872'
IS_SERVER = socket.gethostname() == "tuhe-OptiPlex-990" # Are we on le server?
def debug():
return socket.gethostname() == 'COMP-NB2872'
# dkbn specics: # dkbn specics:
DEV_ROOT = 'c:/Users/tuhe/Documents/dkbn/dev'
ROOT = 'c:/Users/tuhe/Documents/dkbn/dev/dkbn2' ROOT = 'c:/Users/tuhe/Documents/dkbn/dev/dkbn2'
if IS_SERVER:
ROOT = "/home/tuhe/Documents/dkbn/dev/dkbn2"
DEV_ROOT = "/home/tuhe/Documents/dkbn/dev"
DEBUG = True # probably not in the long run...
DEFAULT_MAX_COMMENT_LENGTH = 1000*1000 DEFAULT_MAX_COMMENT_LENGTH = 1000*1000
DEFAULT_MAX_COMMENT_DEPTH = 40 DEFAULT_MAX_COMMENT_DEPTH = 40
def debug():
return socket.gethostname() == 'COMP-NB2872'
SITE_URL = "http://kubusnet.webfactional.com" SITE_URL = "http://kubusnet.webfactional.com" # Change.
if debug() or True : if debug():
DEBUG = True DEBUG = True
TEMPLATE_DEBUG = DEBUG TEMPLATE_DEBUG = DEBUG
SITE_URL = "http://127.0.0.1:8000" SITE_URL = "http://127.0.0.1:8000" # Le server is le serving at le address.
if IS_SERVER:
TEMPLATE_DEBUG = True # Why not?
SITE_URL = "http://127.0.0.1:8008" # Le port is in use!
print(SITE_URL)
# user uploaded crap # user uploaded crap
MEDIA_ROOT = 'C:/Users/tuhe/Documents/dkbn/dev/kubusnet_media/' MEDIA_ROOT = f'{DEV_ROOT}/kubusnet_media/'
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
# static files to be served # static files to be served
STATIC_ROOT = 'C:/Users/tuhe/Documents/dkbn/dev/kubusnet_static_col/' STATIC_ROOT = f'{DEV_ROOT}/kubusnet_static_col/' # Collect (but how?)
STATIC_URL = 'http://kubusnet.webfactional.com/media/' STATIC_URL = 'http://kubusnet.webfactional.com/media/'
STATIC_URL = '/static/' STATIC_URL = '/static/'
STATICFILES_DIRS = ['C:/Users/tuhe/Documents/dkbn/dev/kubusnet_static/'] STATICFILES_DIRS = [f'{DEV_ROOT}/kubusnet_static/']
UPLOAD_URL = "%sfile_upload/"%MEDIA_URL UPLOAD_URL = "%sfile_upload/"%MEDIA_URL
...@@ -118,8 +133,8 @@ SECRET_KEY = 'n12m#^ffg&48_y^yo(fy7&5xfz^5!!-zbig_yg#f(2tv+br+ou' ...@@ -118,8 +133,8 @@ SECRET_KEY = 'n12m#^ffg&48_y^yo(fy7&5xfz^5!!-zbig_yg#f(2tv+br+ou'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
#DEBUG = True #DEBUG = True
ALLOWED_HOSTS = [] ALLOWED_HOSTS = ['*']
CSRF_TRUSTED_ORIGINS=['https://kubusnet.loca.lt', 'https://127.0.0.0.1']
# Application definition # Application definition
INSTALLED_APPS = [ INSTALLED_APPS = [
......
...@@ -46,6 +46,12 @@ ...@@ -46,6 +46,12 @@
</div> </div>
&nbsp; &nbsp;
{% endbox %} {% endbox %}
<h3>Info (debug):</h3>
Admin page can be found <a href="/admin">here</a>. Admin login: <b>tue</b>/<b>gummiand</b> (creating new projects and users work)<br>
Git repo: <a href="https://gitlab.compute.dtu.dk/tuhe/dkbn">https://gitlab.compute.dtu.dk/tuhe/dkbn</a><br>
Note: On first log in with an admin account, try to acess the list of projects. This will create a user profile. This is only required once and only for the admin account!<br>
Test accounts: <b>jens_jensen</b> / <b>jens_jensen</b>, <b>hans_hansen</b>/ <b>hans_hansen</b>.
<b>Note that nearly every page is broken right now!</b>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment