f1nnix / magplan

Project management system for publishers, magazines and content creators 🗓️⏱️✍🏼

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Explain how to install it

asakura42 opened this issue · comments

Please explain how to install it in couple words. I'm new in all that python things and don't know well how to use Django projects.

I'll update README with full process for fresh Django install in a few days.

I would like to clarify my request: I expect to install your system on a local server, without Ansible or Docker. Therefore, it would be interesting to know at least briefly how to run your code myself. I looked in the v1-stable branch and saw in Ansible rules that the system uses postgresql and redis. Tried to replicate it and it didn't work. So I'm looking forward to at least a quick tutorial.

Yep, I'll try to update README for local install on fresh Django this weekend.

I've updated readme with magplan-specific installation steps. Also, please, take a look at https://docs.djangoproject.com/en/3.2/intro/tutorial01/ — it's great official tutorial which can lead you into Django from very beginning, explaining you basic stuff like how to create a new Django project and setup database (required for magplan).

Feel free to contact, if you have any issues.

After number of tryings and digging I finally get the ./manage.py migrate semi-work, but got output:

...
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, dynamic_preferences, dynamic_preferences_users, magplan, sessions, sites
Running migrations:
  Applying magplan.0002_auto_20201115_1140...Traceback (most recent call last):
...
django.db.migrations.exceptions.InvalidBasesError: Cannot resolve bases for [<ModelState: 'magplan.User'>]
This can happen if you are inheriting models from an app with migrations (e.g. contrib.auth)
 in an app with no migrations; see https://docs.djangoproject.com/en/3.2/topics/migrations/#dependencies for more

What should I do? Tried some tips from stackexchange, but they doesn't work.

Huh, sorry for delay, busy days.

Magplan migrations are heavily realeted on your main app User model: instead of bringing own user, Magplan nicely plays with your's existing one.

One way to make migrations work: for example, you main app is called main. So, in main/models.py define custom user:

from django.contrib.auth.models import AbstractUser

class User(AbstractUser):
	pass

And tell Django to use it. In your settings.py add:

AUTH_USER_MODEL = 'main.User'

Then migrations should work.

If something still goes wrong, drop me a line in this issue, and I finally build a starter project with 100% everything working ;).

~Ilya.