Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

188
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!