Hi,

If, as you say, you "have a jquery file under version control inside [your]
virtual environment wrapper", I believe you are doing something wrong. We
normally don't put jquery files in virtualenv (although `pip install django`
will do so), and we normally do not version control the virtualenv.

If virtualenv is not clear to you, I'd propose to take a look at
http://djangodeployment.com/2016/11/01/virtualenv-demystified/ and then re-ask
your question.

Regards,

Antonis Christofides
http://djangodeployment.com

On 2016-11-09 23:54, Gary Roach wrote:
> Ludovic
>
> Thank you for the reply but I know how to use static files. The problem is
> that I already have a jquery file under version control inside my virtual
> environment wrapper and do not wish to use an external file . Use of a normal
> static file will open my application up to uncontrolled version shifts. I want
> to know how to use the pip installed version of the jquery file if possible.
>
> Gary R.
>
> On 11/09/2016 01:41 PM, ludovic coues wrote:
>> Hello,
>>
>> Django provide tools to deals with static files like javascript or
>> css. The documentation is at [1].
>>
>> [1] https://docs.djangoproject.com/en/1.10/howto/static-files/
>>
>> 2016-11-09 21:26 GMT+01:00 Gary Roach <[email protected]>:
>>> Hi all,
>>>
>>> I am just starting to use jQuery and Ajax in my project and am having
>>> trouble setting things up.
>>>
>>> I am using Eclipse + pyDev as an IDE. This setup stores everything in a
>>> workspace directory in my home directory. Instead of putting the whole
>>> project inside a virtualenv wrapper, things work better if the venv is
>>> external to the actual project files and the venv contents referenced in the
>>> Eclipse setup. In that venv file (djenv) there is the following:
>>>
>>>> /home/gary/workspace/djenv/lib/python3.5/site-packages/django/contrib/admin/static/admin/js/vendor/jquery/jquery.min.js
>>>>
>>>
>>>
>>> Now to the setup of my main html page. According to W3schools.com I should
>>> include one of the following in the html head section:
>>>
>>>>   <head>
>>>> <script src="jquery-3.1.1.min.js"></script>
>>>> </head>
>>>
>>>   or
>>>
>>>>   <head>
>>>> <script
>>>> src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js";></script>
>>>>
>>>> </head>
>>>
>>> Neither of these fit my situation. I don't have a separate
>>> jquery-3.1.1.min.js file and don't want to use the google source.
>>>
>>> What I wish to know is can I use something like:
>>>> <head>
>>>> <script src=
>>>> "djenv/lib/python3.5/site-packages/django/contrib/admin/static/admin/js/vendor/jquery/jquery.min.js"</script>
>>>>
>>>> </head>
>>> or can I use just <script src="jquery.min.js" since the file is already
>>> referenced in my django setup.
>>>
>>> Any help will be sincerely appreciated.
>>>
>>> Gary R.
>>>
>>> -- 
>>> 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/1b51ba33-73a7-63f1-1de2-a3ada145fbc5%40verizon.net.
>>>
>>> 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 [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/e368b5f6-24bd-d40b-8c60-daf9e3c48b7f%40djangodeployment.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to