Reusable components are exactly what separate apps are for; Give your resuable code a nice API - whether it adds new field types,
new models, new templates etc, and then put that all in an app.

Writing an entirely reusable app takes a lot of skill and thought in my experience; extra fields, model mixins, new tags and even new middle-ware components are relatively straightforward; providing reusable templates that another project can extend easily can be challenging.

The key in my experience is to document it all - make sure you write down exactly how you re-use your components.

On 11/06/18 15:23, Pravin Yadav wrote:

Hello,

I have created the websites in Python 3.6 and Django 2.0.6. I have created separate the header.html, footer.html, index.html & base.html.  I want to create the reusable code like Helper OR Component. I have no idea about this how to create the helper or component. if any one know abut this kindly let me know.


Thanks,

Pravin Yadav

--
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 [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a920009c-ca15-4fe4-a146-26cfddef809b%40googlegroups.com <https://groups.google.com/d/msgid/django-users/a920009c-ca15-4fe4-a146-26cfddef809b%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.


--
--
Anthony Flury
email : *[email protected]*
Twitter : *@TonyFlury <https://twitter.com/TonyFlury/>*

--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0fd2e8e9-d2d2-6326-dc2f-25297e614f85%40btinternet.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to