Coder Social home page Coder Social logo

Comments (9)

jrief avatar jrief commented on July 22, 2024

./manage.py compilescss iterates over all templates in your project and recursively searches for templates. You probably reference test somewhere without having it.

COMPRESS_PRECOMPILERS is not required with django-sass-processor.

from django-sass-processor.

drivard avatar drivard commented on July 22, 2024

I look all around, in the HTML, in the PY files. I don't have a test template. Plus it is in the code of the command line that it is saying searching for a test dummy template to figure out the loaders.

# Force Django to calculate template_source_loaders from
# TEMPLATE_LOADERS settings, by asking to find a dummy template
finder_func('test')

I will try against an empty app to see how it reacts.

any other ideas?
Thanks

from django-sass-processor.

drivard avatar drivard commented on July 22, 2024

I did a small experiment, by adding in my templates/ folder a test.html which didn't work.
Then I tried to create templates/test and then it worked it pass the find_func('test') but then it fails at

traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "~/apps/virtualenvs/blog/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "~/apps/virtualenvs/blog/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "~/apps/virtualenvs/blog/local/lib/python2.7/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "~/apps/virtualenvs/blog/local/lib/python2.7/site-packages/django/core/management/base.py", line 338, in execute
    output = self.handle(*args, **options)
  File "~/apps/virtualenvs/blog/local/lib/python2.7/site-packages/sass_processor/management/commands/compilescss.py", line 28, in handle
    templates = self.find_templates()
  File "~/apps/virtualenvs/blog/local/lib/python2.7/site-packages/sass_processor/management/commands/compilescss.py", line 39, in find_templates
    for loader in self.get_loaders():
  File "~/apps/virtualenvs/blog/local/lib/python2.7/site-packages/sass_processor/management/commands/compilescss.py", line 72, in get_loaders
    for loader in template_source_loaders:
TypeError: 'NoneType' object is not iterable

from django-sass-processor.

drivard avatar drivard commented on July 22, 2024

I tried against an empty project with only sass_processor app and still I am getting the error:

    django.template.base.TemplateDoesNotExist: test

Thanks

from django-sass-processor.

drivard avatar drivard commented on July 22, 2024

I'll make a fork and push some code, but to get it to pass, I had to modify the code in order to re-import the template_source_loaders. I am not sure my code is exactly what it need to be but it has compiled my SCSS with success.

Plus I needed to add the following setting to get it to work COMPRESS_OFFLINE = True

from django-sass-processor.

jrief avatar jrief commented on July 22, 2024

Thanks for this PR.
Parts of the code you see (and patched) here have been pilfered from django-compressor, therefore I am not familiar in detail with this code.
I unfortunately still am sticked on Django-1.6. Thanks for porting this it to 1.7.

from django-sass-processor.

drivard avatar drivard commented on July 22, 2024

resolved by #5

Thanks for merging

from django-sass-processor.

drivard avatar drivard commented on July 22, 2024

do you know when you will have time to upload the package to pypi?

from django-sass-processor.

jrief avatar jrief commented on July 22, 2024

I currently have the same problem, but running Django-1.6
If I have some more time, I'll dig into the code and try to fix it. Please use the version from GitHub, until it runs on Django-1.6 again.

from django-sass-processor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.