HackSoftware / Django-Styleguide

Django styleguide used in HackSoft projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Imports services or selectors from another app, best way?

Reston opened this issue · comments

Hi I wanted to ask what would it be the best way to handle a situation when you have, let's say, 3 to 4 apps in your Django application

But then you'll need information from 2 apps that'll provide information for an endpoint

So where this new selector should be located?

New app that would read selectors from app 1 and 2, and then provide the information merged with an endpoint there acting like a parent?

Or maybe app 1 would have a selector and import a selector from app 2?

@Reston That's a good question.

I'd say, wherever you put the endpoint, you should put the selectors there too. If you don't have a name for that yet (like what's the business entity for that?) - it's not a problem.

Put it wherever it makes sense the most. You can always move and refactor after that.

Closing for now ✌️