Reusable Code like Helper OR Component.

17 просмотров
Перейти к первому непрочитанному сообщению

Pravin Yadav

не прочитано,
11 июн. 2018 г., 10:23:1011.06.2018
– Django users

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

Pravin Yadav

не прочитано,
12 июн. 2018 г., 09:03:5512.06.2018
– django...@googlegroups.com

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
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.
For more options, visit https://groups.google.com/d/optout.

Anthony Flury

не прочитано,
12 июн. 2018 г., 11:16:5312.06.2018
– Pravin Yadav, django...@googlegroups.com
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.
> --
> 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...@googlegroups.com
> <mailto:django-users...@googlegroups.com>.
> To post to this group, send email to django...@googlegroups.com
> <mailto:django...@googlegroups.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 : *Anthon...@btinternet.com*
Twitter : *@TonyFlury <https://twitter.com/TonyFlury/>*

Ответить всем
Отправить сообщение автору
Переслать
0 новых сообщений