So, I'm new to Django and can't understand for life why I keep getting TypeError in my view.
Error:
TypeError at / filename must be a string, not None Request Method: GET Request URL: http:
I have the following in view
<!DOCTYPE html> {% load sass_tags %} <html> <head lang="en"> ... <link href="{% sass_src 'app_name/static/theme.scss' %}" media="screen" rel="stylesheet" type="text/css">
I probably missed something in my .py settings, but I'm not sure what it might be. Also, how can I link to my scss file?
I added the following to my settings.py
INSTALLED_APPS = [ .... 'sass_processor', .... ] STATICFILES_FINDERS = ( 'sass_processor.finders.CssFinder', )
I think my problem lies here
SASS_PROCESSOR_INCLUDE_DIRS = ( os.path.join(BASE_DIR, 'app_name/static'), )
BASE_DIR refers to
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
Where exactly is this needed? my application structure
app_dir/ Specs/ src/ app_name/ static/ theme.scss templates/ __init__.py views.py etc...
I thought this was a Python3 bug, so I am creating 2.7 V, but still have the same problem.
source share