Feel free to hack around and create pull requests.
Many thanks to
- iaN @ifalatik for keeping the code up-to-date
python3 -m venv wannspieltbig_dev
cd wannspieltbig_dev
source bin/activate
sudo apt-get install memcached
mkdir src
cd src
git clone https://github.com/ckarrie/ckw-csgo/
pip install -r ckw-csgo/requirements.txt
# install csgo app in editable mode
pip install -e ckw-csgo
django-admin startproject wsb
cd wsb/
mkdir wsb/static
nano wsb/wsb/settings.py
# Change
ALLOWED_HOSTS = ['*']
CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
"LOCATION": "127.0.0.1:11211",
}
}
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites', # Add
'rest_framework', # Add
'csgomatches', # Add
]
ROOT_URLCONF = 'csgomatches.urls'
LANGUAGE_CODE = 'de'
TIME_ZONE = 'Europe/Berlin'
USE_I18N = True
USE_L10N = True
USE_TZ = True
STATIC_URL = '/static/'
STATIC_ROOT = '/home/christian/workspace/venvs/wannspieltbig_dev/wsb/static' # CHANGE TO YOUR LOCAL FOLDER
python wsb/manage.py migrate
python wsb/manage.py collectstatic -l
python wsb/manage.py shell
# current Site
from django.contrib.sites.models import Site
Site.objects.filter(pk=1).update(domain='0.0.0.0', name='Local Dev')
# Add Team BIG
from csgomatches.models import Team
Team(name='BIG').save()
# Add Admin User
from django.contrib.auth.models import User
User.objects.create_superuser(username="devuser", password="devuser", email="[email protected]")
python wsb/manage.py runserver 0.0.0.0:9001
Open Browser:
- Frontend: http://127.0.0.1:9001
- Django-Admin: http://127.0.0.1:9001/admin/