Package: magplan
MagplanProject management system for publishers, magazines and content creators, written on the top of Django Framework.Featurescomplete posts management: from article idea to publishing;articles stages, assignees, roles;posts metadata, editors, authors, attachments (images, PDF's, files);extendable Markdown engine with ability to use external one;posts ideas with voting system;discussions, email notifications;team actions logs;publish content to S3 and WordPress with async tasks.Install and runCreate new Django project and first app according to official DjangoWriting your first Django app, part 1tutorial.Installdjango-magplanwith your favourite package management tool:pip install django-magplanorpipenv install django-magplanDon't forget to setup database, which is described in DjangoWriting your first Django app, part 2tutorial, part 2.Add Magplan to DjangoINSTALLED_APPSin your projects Djangosettings.py. Magplan need some extra requirements, so you should add it too:INSTALLED_APPS = [
  ...
  # Theese apps will be installed with magplan, add it
  'django_ace',
  'django_admin_listfilter_dropdown',
  'dynamic_preferences',
  'dynamic_preferences.users.apps.UserPreferencesConfig',
  'widget_tweaks',
  
  # Add magplan itself
  'magplan',
]Add Magplan to Django in your projecturls.py:urlpatterns = [
    ...    
    path('plan/', include('magplan.urls')),
    
]Add magplan required middleware to handle multisite:MIDDLEWARE += [
    ...
    'magplan.middleware.SetLanguageMiddleware',
]Add several template context processors for proper rendering last issues, etc:TEMPLATES = [
    {
        'BACKEND': 'django.template.backends.django.DjangoTemplates',
        'DIRS': [BASE_DIR / 'templates'],
        'APP_DIRS': True,
        'OPTIONS': {
            'context_processors': [
                # ...Add theese lines to the end
                'dynamic_preferences.processors.global_preferences',
                'magplan.context_processors.inject_last_issues',
                'magplan.context_processors.inject_sites',
            ],
        },
    },
]Run migrations:./manage.ru migratePlease, refer to DjangoWriting your first Django app, part 2tutorial, part 2.Run app:./manage.py runserver 8080Go tohttp://localhost:8080/plan/.Magplan requires Python 3.6+ and Postgres for minimal setup.Please, note youmustbe authenticated in Django app as each Magplan View is protected by@login_requreddecorator.Deploy with Ansible (deprecated in v2)Removed from v2. See  v1 branchTo deploy Magplagn to DEB-based VPS, a complete set of Ansible roles is provided. It includes:OS base updates;install pip, virtualenv, PosgtreSQL, nginx;SSL-certificates by LetsEncrypt with auto-updates;Django worker with supervisord and gunicorn.For more info, please, refer toansible/directory. For regular deploy:Ensure you haveansibleandansible-playbookinstalled.Specify Magplan deploy env vars inansible/secret_vars/production:github_secret_token: "<edit_this>"
postgresql_password: "<edit_this>"
secret_key: "<edit_this>"andLet’s Encryptvarsansible/group_vars/production:environment_type:
domain_name:
letsencrypt_email:Add your host to/etc/ansible/hostslike:[control]
magplan_live ansible_host=magplan.example.com ansible_user=ubuntuRunansible-playbook ansible/main.ymlGo tohttps://<your_host>:80/and import test site or create single superuer.Running locallyTo run Magplan, the following env vars should be set for Python interpreter and Celery worker:Example settings:DJANGO_SETTINGS_MODULE:magplan.settingsBASE_DIR:/home/user/code/magplanDB_HOST:localhostDB_PORT:5432DB_NAME:magplan_devDB_USER:magplan_userDB_PASSWORD:secretpassAPP_HOST:localhostAPP_URL:http://localhost:8000APP_ENV:DEVELOPMENTInstall requirements:pip install -r requirements/base.txtRun app:django-admin runserver 0.0.0.0:8000If you plan to run tests, please ensure your user has permissions to create databases.Importing test site (deprecated in v2)To import test site in dev environment, run:manage.py loaddata plan/fixtures/db_test.json.jsonLogin as superuser:alexander72@example.com:pass123.More information can be foundhere.Configuration (deprecated in v2)After importing test site, please go to<your_domain>/manage/constance/config/and set up at least:General settingsPlan email settingsFinance email settingsThese settings are required for proper work. Plan and email settings can be duplicated.TodoWrite more testsComplete translationsSwitch to Class-based viewsRewrite as pluggable appLICENSETHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.