Serve JavaScript modules via Django static files

Abierto
#63 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
25/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
django, javascript, python, react
Área
backend, web-dev

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
357
Forks
22
Merge medio
10 h 31 min
PR fusionados (30 d)
2

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de reactive-python/reactpy-django

Todos los issues de reactive-python/reactpy-django

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.