Mmm why not just download Jquery and create a folder called static inside one controlled app, maybe pone inside the project.
If you want, you can use django admin jquery but $ is not available because django use django.JQuery for prevent conflict with custom user jquery El jueves, 10 de noviembre de 2016, Gary Roach <[email protected]> escribió: > Hi, > > Sorry about the confusion. I misspoke. I was trying to imply that there was a jquery.min.js file in the venv (djenv) file. As you implied, it was installed with pip django. A very bad choice of words. > > I am trying to set up my project so that I am not using a system version of jquery since the system version is subject to change every time I update my debian system (whiich I do about once a week). I suppose what I really want to know is how do I get a "sequestered" version of jquery.min.js installed. I have tried to use a pointer to the copy in the djenv directory (Eclipse allows this). After doing this there is a file jquery.min.sj shows up in my static file directory. Unfortunately, when I do a runserver I still get a - "GET /static/jquery.min.js HTTP/1.1" 404 1652 - error. What's next? > > Gary R. > > On 11/09/2016 11:56 PM, Antonis Christofides wrote: >> >> 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/c3697c2d-1980-9d06-3f7c-111e43440d00%40verizon.net . > For more options, visit https://groups.google.com/d/optout. > -- "La utopía sirve para caminar" Fernando Birri -- 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/CAG%2B5VyPqnZNCLUUF0exTbeDmOekawTj4ub%3DkOV_-uz4fo3x8hQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

