minecraft_manager/docs/source/getting-started.rst

58 lines
1.6 KiB
ReStructuredText
Raw Normal View History

2018-10-13 01:58:33 +00:00
.. include:: common.rst
.. _getting-started:
Getting Started
===============
Start A Django Project
----------------------
First, you will need a working Django project. Instructions on how to set one up can be found on Django's website_.
.. _website: https://docs.djangoproject.com/en/2.0/intro/install/
Once you have a working Django project, you will need to install Minecraft Manager.
2018-10-21 02:55:24 +00:00
Clone MCM
---------
2018-10-13 01:58:33 +00:00
2018-10-21 02:55:24 +00:00
In your Django project, import your forked MCM repository as ``minecraft_manager``
2018-10-13 01:58:33 +00:00
::
2018-10-21 02:55:24 +00:00
git clone https://git.etztech.xyz/Etzelia/MinecraftManagerDjango.git minecraft_manager
Add To Project
--------------
In ``settings.py`` add minecraft_manager to INSTALLED_APPS
Make sure to set up the database once the app is installed.
::
python manage.py makemigrations
python manage.py migrate
Add MCM urls to your ``urls.py``
::
path('whitelist/', include('minecraft_manager.urls')),
path('api/', include('minecraft_manager.api.urls')),
path('web/', include('minecraft_manager.external.urls'))
.. note::
Django doesn't provide login/logout templates by default, so MCM has some generic ones if needed.
::
from django.contrib.auth import views as auth_views
2018-10-21 02:55:24 +00:00
path('accounts/login/', auth_views.LoginView.as_view(template_name='minecraft_manager/login.html'), name='login'),
path('accounts/logout/', auth_views.LogoutView.as_view(template_name='minecraft_manager/logged_out.html'), name='logout'),
Configure Settings
------------------
MCM has plenty of optional settings, however there are a few required ones. Refer to :ref:`django-settings` for a complete list.