Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

191
Vistas
Import not importing all functions?

https://github.com/ezhome/django-webpack-loader

For some reason when I import webpack_loader.utils like in the README.md of the repo, it only imports get_loader (I want get_static). Anyone know why might be going on here?

I have a view where I am attempting to use get_static.

from webpack_loader import utils

def app(request):
    url = utils.get_static('index')['url']
    print (url)
    import types
    from inspect import getmembers, isfunction
    print ('meow')
    print ([o for o in getmembers(utils) if isfunction(o[1])])

This throws an error: AttributeError: module 'webpack_loader.utils' has no attribute 'get_static'

If I comment out the url code, it shows that only get_loader is being loaded.

I'm confused as to why this is considering the file here: https://github.com/ezhome/django-webpack-loader/blob/master/webpack_loader/utils.py

In shell: http://imgur.com/a/E8BFs

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Given the issue has no attention, I suggest to use pip and install the package directly from github:

$ pip install git+https://github.com/ezhome/django-webpack-loader.git

This is another way to install a third part package with pip. The command will download the sources directly from the master branch (so you've got the latest changes).

Then you can use the get_static function, e.g.

$ ./manage.py shell
Python 3.5.3 (default, Jan 29 2017, 01:40:30) 
[GCC 5.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from webpack_loader import utils
>>> utils.get_static
<function get_static at 0x7f8d56bc0ea0>

UPDATE

Version 0.5.0 has been released, and presumably this issue has been fixed.

More info: https://github.com/ezhome/django-webpack-loader/issues/114

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda