This project serves as an example for integrating adminlte into django and using a simple api (in this case a gameserver for Alt:V - a GTA Multiplayer Mod). It also adds the capability to control multiple servers, which makes it neat for Development, Testing and Production environments.
- Python 3.x
- Prefer VS Code with the Extensions
Beautify
,Django
andPython
- Run
pip install -r requirements.txt
- Go to https://miniwebtool.com/django-secret-key-generator/ and generate a new django secret key. Copy paste this into the
.env
file and keep it secret - Run
python manage.py makemigrations
- Run
python manage.py migrate
to create the database structure. If you encounter an error, usepython manage.py migrate --run-syncdb
- Run
python manage.py runserver
(CTRL+SHIFT+B if you have VSCode settings) - Open browser at http://127.0.0.1:8000
You should see this
- Stop server if necessary
- Run
python manage.py createsuperuser
to create an admin account - Restart server, you can now login using the created admin account
The following steps refer to the example using the Game Server API (see https://github.com/riffy/altv-adminpanel-api)
- Login and click
Admin
in the top - Click
Add
to the Gameservers - Fill out the form with information from the Alt:V gameserver data. If the Django server and Gameserver are running on the same ip/environment you can use
localhost
- Click
Save
and head back to the main site by clickingVIEW SITE
in the top right. If you encounter an error during adding gameserver like no such table, stop server and runpython manage.py migrate --run-syncdb
- The server should now be selectable in the left sidebar
For the Gameserver API, please look at my other repository https://github.com/riffy/altv-adminpanel-api
If you run the ALT:V server with the module from the api repo and have everything configured correctly you should see the online status
- Finalize Dashboard
- Basic Server Statistics
- Basic Server Config
- Player List (alt:V id, social-id, name, online since, )
- Player Actions (kick with reason)
- Player Map