pycon icon indicating copy to clipboard operation
pycon copied to clipboard

Update all cms apps label

Open marcoacierno opened this issue 2 years ago • 2 comments

https://github.com/pythonitalia/pycon/tree/main/backend/cms/components

Right now use page_x news_x inside cms/components

We should rename the labels so it is cms_page cms_news and so on

marcoacierno avatar Nov 27 '23 18:11 marcoacierno

Does this mean renaming file names in cms/components by suffix cms_ ?? @marcoacierno

th-shristi avatar Dec 23 '23 18:12 th-shristi

@th-shristi I am not sure yet, I haven't investigated it really and just quickly put together this issue to not forget it :)

What I didn't like:

  1. Django sees the apps in cms/components just as page/home/sites
    1. My biggest problem with this is that it might that those names are very generic so will conflict with the apps in the "root directory" of backend.
  2. As above the models in DB are just page_X home_X sites_X

I think maybe the best fix for this would be to move everything that is inside backend/cms/components into the root backend/ where all the other apps are and prefix them with cms_X.

But maybe that's not even a real problem? Looking at Django codebase, apps are in https://github.com/django/django/tree/main/django/contrib but I believe the names of the app are just "auth" or "sites". The only difference is that given we are a project and not a library, I would prefer being able to see all of my codebase apps in the root instead of having to go directory-by-directory and finding app(s) in there.

The CMS part was quickly extracted out of it is own microservice and into backend/ recently so it wasn't a problem before and I didn't spent too time thinking about this, sorry 😊

marcoacierno avatar Dec 24 '23 09:12 marcoacierno