Hi Alex,

I'm still new to Django and Python, but I have experience in other
frameworks. Here is my opinion regarding your three points:

*(1) An app for each role.* I think the approach of having one app for each
role is the worst thing to do. In this case, you would have too much
duplicated code and the maintenance would be difficult.

*(2) Some logic in templates.* If you have it in templates, you would be
putting logic in the Template tier of your application, which, in my point
of view, is architecturally wrong. You should separate Model, Template and
View (MTV).

*(3) Any other.* I believe the best approach is to define permissions for
each user role. I don't know how to implement it in a Django application
yet, but I'm quite sure this is the right thing to do. From the documents
I've read, it should be implemented in the View tier.

Please correct me if I'm wrong.

Regards,

Gabriel Abdalla


On 11 February 2013 13:30, Bill Freeman <ke1g...@gmail.com> wrote:

>
>
> On Mon, Feb 11, 2013 at 7:13 AM, Ajinkya Gadewar <
> ajinkya.gade...@ishareitall.com> wrote:
>
>> Hi Alex,
>>
>> I already have a education system developed. We run a software company in
>> India. Let me know if you need more details on it.
>>
>> Regards,
>> Ajinkya Gadewar
>>
>> Sent from my iPhone
>>
>> On 11-Feb-2013, at 2:17 PM, "alexandre...@gmail.com" <
>> alexandre...@gmail.com> wrote:
>>
>> Hi
>> I'm starting a big app on Django for Shool management, to replace a Win32
>> app.
>>
>> I've roles like teachers, students, admin stuff, ... that have diferent
>> access.
>> How should it be developded?
>>
>> 1- an app for each role?
>> 2- some logic in templates?
>> 3- any other
>>
>> what is the correct aporach to get big and simple.
>>
>> Regards
>> Alex
>>
>>  --
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>>
>> An app for each role would seem to lead to a lot of code duplication.  I
> think that permissions are best implemented at the view level (and
> templates can be taken to be part of the view).  While you should restrict
> some views entirely by role, you will also want some template code, so that
> links to those views won't display for those whose role can't access them
> (though you could also hide unusable links with css and a roll based class
> on the body element).  There may also be views that should be read only for
> some roles and a form for others (though I prefer the separate "edit this
> stuff" view approach).  Consider using the django permissions and group
> system for roles.
>
> Bill
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to