On Mon, Jul 4, 2016 at 10:56 AM, Seti Volkylany <setivolkyl...@gmail.com> wrote:
> In the Web have many a variants for JS style coding. The Django give less > detail about good JS coding (see > https://docs.djangoproject.com/en/1.9/internals/contributing/writing-code/javascript/#code-style > ). > Here is what I found: https://github.com/madrobby/pragmatic.js, > https://github.com/rwaldron/idiomatic.js/,https://github.com/airbnb/javascript, > and other. > What experts can advise on this issue? > The reason that there is little documentation regarding a combination of Django and JavaScript is because they are almost entirely independent of each other. You can write entire projects in JS without touching Django, and you can write entire Django projects without touching JS. Exactly "how" you write and format your JS is up to you. I see you've found several examples. I would suggest trying them all to find one that "feels" right to you. Keep in mind that much, if not all, of your JS code will not be served by Django, but rather by the underlying web server process such as Apache or Nginx. Django doesn't even know or care that it exists. When the two do interact, most commonly JS is used to retrieve data (usually in JSON) from Django views, but even then, Django does not do anything special with the JS code itself. -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+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. 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/CA%2Be%2BciVZ1Qoxb1fO47KEsAGs%2BXVLPPsB%2Bkcfw%3D%3Dj_WWBiFdiTA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.