Can I delete common.py?

Hello,

I’m in the process of installing Taiga from the full source code (front to generate themes and front-dist otherwise but it doesn’t matter for our topic).

In taiga-back, I modified config.py as written in the production installation guide.

Seeing that common.py wasn’t used and configured a lot of things I didn’t want (like a default admin user and other placeholder parameters), I deleted it. But several files still try to import it and crash my backend because of it.

I don’t want this common.py file to do anything, but when I just create an empty common.py file nothing changes, it still crashes.

So what do I do ?

Hi there,

It is used, by config.py. The first thing that config.py does is import everything from the common.py file.

It’s a common Django pattern. You have a common.py, base.py or similar, where you have all the required defaults and settings required by Django, then you overwrite whichever settings you need to change in a different file, in this case config.py

common.py is not configuring a default admin user. It is setting a default variable ADMIN_USERSwhich is used throughout the code, for things like administrative emails, etc. If you set ADMIN_USERS in your config.py, you are then overwriting the value of that variable with whatever you are setting it to.

Same thing with all the other settings in common.py

Best!