On Feb 5, 6:16 pm, Tom Lesters <[email protected]> wrote:
> hi all,
>
> I installed an app called idios into python2.6/site-packages/idios dir,

Which is possibly not a great idea... as you now know <g>.

Generally speaking, using virtualenv (no-site-packages) + pip (with a
requirement file you keep in your project) is a GoodPractice(tm) when
it comes to dependencies.

> now I need to make a small change, adding the following line(just for
> purpose of explaining this question)
> @login_required
> to one of the functions defined in idios/views.py

Daniel already provided the simplest solution for this problem. For
more involved changes and assuming you prefer not to mess with the
third part app's code, you can also monkeypatch the relevant functions
in your own app.

> or it's just the nature of any django apps:
> if you need to modify anything in the urls.py ,views.py or models.py,
> you just grab the source and make is as a local project app?

Depends on how much you need to modify the third part app. Forking the
app is sometimes the best solution, but it means you'll have a hard
time keeping in sync with the original code when bugfixes and new
features will be released. Monkeypatching doesn't totally solve this
problem but from experience it makes for easier updates.

My 2 cents...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to