Wednesday, December 24, 2014

Re: Two Django projects with common models and business logic

You can version it under a different repository, clone it in each server, and then add that path to the PYTHONPATH of each project, or just make a symbolic link to the app.



On Wed, Dec 24, 2014 at 1:18 PM, andy <andynes83@gmail.com> wrote:
Thank you. Since it's only me that'd be using the apps do can I bypass the 'deploy using pip' thing and somehow directly use it in my other projects?

/andy

On Wednesday, December 24, 2014 12:41:25 AM UTC+5:30, Javier Guerra wrote:
On Tue, Dec 23, 2014 at 1:22 PM, andy <andy...@gmail.com> wrote:
> Now, both the projects have some models and some business logic common
> between them. I don't want to duplicate the code and data which shall be
> chaotic going forward. Also, I want the models and code (business logic) to
> be in sync (when models/code is altered).


encapsulate those models and code in reusable apps.  and since Django
apps are just Python modules, you can package and deploy them using
Python tools like pip.

--
Javier

--
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-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4448040a-6db8-4558-ac30-e559d57fce6c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALn3ei1cCLez2vih7tQU4C_3cU-Rip2B0m5kCBb5Hv_G-MjHVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment