Serve JavaScript modules via Django static files

Aperta
#63 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
django, javascript, python, react
Ambito
backend, web-dev

Direzione di ricerca

Start by reviewing Django's STATICFILES_FINDERS documentation and the original issue #4, then compare the proposed finder, collect_modules, and explicit-folder approaches. Done means selecting and implementing a deterministic integration that serves ReactPy JavaScript modules through Django's static-file system, with an explicit behavior for modules missing at startup.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

blocked complexity: 2 (medium) priority: 3 (low) type: investigation
Current Situation

Currently, we serve our JavaScript web modules (JavaScript Components) via views. This is due to the fact that our current architecture does not let us know what web modules exist until runtime.

However, Django views are less efficient at serving files than a webserver such as Nginx or Apache.

Proposed Actions

Develop a way of integrating with the Django Static File system.

Work Items

We have a couple of paths we could take

  1. Create a static file finder that points to ReactPy's web modules directory
    • This is the preferred implementation if feasible
  2. Develop a collect_modules command, similar to django-compressor's collect_static command
    • This option requires changes in ReactPy to deterministically collect all JavaScript web modules during startup.
    • Also, what should we do if we accidentally did not obtain a static file during startup? Should we fallback to using our Django view, or just throw a 404 Not Found error?
  3. Make users put JavaScript modules in dedicated JAVASCRIPT_MODULES = [ ... ] folder(s)
    • User's will need to statically define their ReactPy JavaScript modules with this method.

See #4 for the original issue.

Lingua principale
Python
Stelle
357
Fork
22
Merge medio
10h 31m
PR unite (30g)
2

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di reactive-python/reactpy-django

Tutte le issue di reactive-python/reactpy-django

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.