load drf from different location

11 views
Skip to first unread message

Prabath Peiris

unread,
Aug 31, 2015, 11:18:14 AM8/31/15
to Django users

Hi 

This is the problem I am trying to solve. I have a VM which has all the django + other required packages are installed (including the rest_framework). I usually ssh to the VM and then run the following command 

PYTHONPATH=/all/the/paths runserver 127.0.0.1:8000

Now I want to mount the rest_framework to my local machine and and put some debug code to understand how to framework is working. what I like to do is this, I installed the rest_framework module in to my local directory (in VM) and I would like to load the rest_framework from the local install instead from the systemwide install ( I do not want to edit the systemwide install). 

How can I tell the django or pythonpath to load only rest_framework from somewhere else. 

Thank You 
Prabath 

James Schneider

unread,
Aug 31, 2015, 5:13:12 PM8/31/15
to django...@googlegroups.com
What you probably want is a Python virtualenv, or venv for Python3.

https://virtualenv.pypa.io/en/latest/
https://docs.python.org/3/library/venv.html

There are a ton of virtualenv tutorials out there for pretty much
every platform.

-James
> --
> 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.
> To post to this group, send email to django...@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/f9b2b2f8-bc67-4e4d-a634-c4850abf840e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages