1

I plan on using the RateYo jQuery plugin within my Django project but there are a variety of parts I plan on changing and therefore I would like to have all the files directly within my project (unless I can easily modify RateYo options with CDNjs imports)

The official RateYo website shows a variety of methods of implementation but with a Django project structure, I'm not quite sure how to adapt the installation guide.

I have the following project architecture:

PWEB
 |--> exchange
 |      |--> __pycache__
 |      |--> migrations
 |      |--> static
 |      |      |--> exchange
 |      |      |      |--> assets
 |      |      |      |      |--> css
 |      |      |      |      |     |--> *.css
 |      |      |      |      |--> fonts
 |      |      |      |      |--> js
 |      |      |      |      |     |--> ..., jquery.min.js, jquery2.min.js, ...
 |      |      |      |      |--> sass
 |      |      |      |--> images
 |      |--> templates
 |      |      |--> exchange
 |      |      |      |--> *.html
 |      |--> *.py
 |--> PWEB
 |      |--> __pycache__
 |      |--> *.py
 |--> manage.py
 |--> *.*

As you can see, I already have a jquery.min.js file in my project (even a second one). Should I add the file within the RateYo zip archive as jquery3.min.js and watch out what file I use since I'll have 3?

I'm a little lost of where all the files should go to not break what I already have.

The files contained in the RateYo.zip are index.html, jquery.min.js, jquery.rateyo.css, jquery.rateyo.js, jquery.rateyo.less, jquery.rateyo.min.css, jquery.rateyo.min.css.map, jquery.rateyo.min.js, jquery.rateyo.min.js.map

FeaturedSpace
  • 479
  • 3
  • 18
Max Michel
  • 575
  • 5
  • 20
  • Try just adding all of those files where you have your `index.html`? I would always just add the files that it requires since really that's far more breaking (for jQuery plugins) than any other code you could have. – FeaturedSpace May 31 '19 at 17:20
  • I don't have an `index.html` within my Django project, that file is within the `RateYo.zip` and serves only as an example webpage. I would like to add the files correctly to the project and use them accordingly. – Max Michel May 31 '19 at 17:22
  • 1
    Okay, you should add them to your base directory wherever your main webpage is, and test to ensure it works. Then you should also import all of the files, like it says on the official webpage. – FeaturedSpace May 31 '19 at 17:23

1 Answers1

0

It appears the best solution for this installation would be to place all of these files in your JS folder (if you don't have one, make one) and then reference those files in your HTML file or whatever "index" file you have (as well as any other page where you use jQuery plus the plugin.

FeaturedSpace
  • 479
  • 3
  • 18