There aren't any mandatory rules but standards to make code maintainable,
following standards you shouldn't do it but depends upon how much work you
need to do for each user type and how much closely they are linked to each
other. if there is no or minimal link and a lot of switching will be needed
then its better to keep them separate. Putting if-else or switch-case
everywhere will stop making sense once your project ages and you've written
a lot of lines of code. IF its a small project then go with standard. I
have these suggestions to make but please feel free to do whatever you want
and you are comfortable in doing just keep it mind that it should be easy
to maintain for other developers as well.

Regards
Vineet Daniel
Cell          : +918527565696
Websites : Blog <http://vineetdaniel.blogspot.com>   |   Linkedin
<http://in.linkedin.com/in/vineetdaniel>  |  Twitter
<https://twitter.com/vineetdaniel>




On Tue, Oct 15, 2019 at 6:19 PM Andréas Kühne <andreas.ku...@hypercode.se>
wrote:

> Hi,
>
> That is for you to decide - that's a project specific decision.
>
> However I wouldn't do that - I would filter the html templates and only
> display the items that should be displayed to each user type. Then I would
> add checks to the views so that the user is the correct type to display the
> view.
>
> So I would group functionality for each application - so that one
> application handles users for example, another books, another authors for
> example.
>
> Regards,
>
> Andréas
>
>
> Den mån 14 okt. 2019 kl 19:11 skrev test user <redmarke...@gmail.com>:
>
>> Yes, i have checked this article many times. It tells you how to
>> implement user model to handle multiple user types not on how the apps
>> should be laid out in that case.
>>
>> My question was if you have 5 types of users in your website and each
>> user has different interfaces and tasks to perform. Should code layout be
>> with one Django app or split up into 5 apps along with the common app which
>> handles the common functionality?
>>
>>
>> On Monday, October 14, 2019 at 8:11:46 AM UTC+5, Joalbert Palacios wrote:
>>>
>>> I think you don't need several apps for each user type. You have
>>> different ways to approach it, one could be used with permisology policy
>>> for each model and each user type in the Django app, other one could be
>>> managing the policies by yourself.
>>>
>>> I suggest to search in Google a entry in the blog
>>> simpleisbetterthancomplex.com ir read documentation in django for
>>> further details.
>>>
>>> I hope this helps.
>>>
>>>
>>>
>>> On Sun, Oct 13, 2019, 8:33 PM test user <redma...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I have got multiple user types(around 4 to 5) in my Django project.
>>>> Should i make separate Django app for each user type? Each user type will
>>>> have different interface after they log into the website.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to django...@googlegroups.com.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/f7dc3b18-ab79-42ea-9ba2-7d3b2b8187fb%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/f7dc3b18-ab79-42ea-9ba2-7d3b2b8187fb%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/76a5c431-c69e-49f5-beca-8ae883bf0997%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/76a5c431-c69e-49f5-beca-8ae883bf0997%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAK4qSCcWORD272fWiQ1QgZCMiy8mjPxiue01daDuWfkdx4gNmg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAK4qSCcWORD272fWiQ1QgZCMiy8mjPxiue01daDuWfkdx4gNmg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJPbAW-_2nu6Rvyqb4fsNcDisfT8MCwfbX8NEmQO5LxVJ6X12g%40mail.gmail.com.

Reply via email to