Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango-Bower + Foundation 5 + SASS, How to configure?
    primarykey
    data
    text
    <p>I'm in the process of testing out a SASS implementation of Foundation 5 using Django-Bower. I'm new to the idea of Bower and am having a bit of confusion as to how to get this setup working properly.</p> <p>I have django-bower installed and configured to run properly. After I added foundation to the bower apps config and ran <code>manage.py bower_install</code> I can see that the foundation files have indeed been installed properly. I can also use the static tag to load the JS into a template without an issue, so I feel like I'm about halfway there.</p> <p>My issue is in regards to how to actually use the foundation files that bower installed with my custom SASS files, and the best way to compile those SASS files into CSS. I know that I'm supposed to be able to include foundation into my SASS with <code>@include "foundation"</code> but I'm lost as to how to get the SASS file to "see" the foundation files in components/bower_components/foundation/sass and how to set up a compile to put the css into the correct static file.</p> <p>UPDATE: PyCharm has an option to watch sass files and compile them, so I now have an option for compiling the files, but when I attempt to import foundation i get <code>error blog3.sass (Line 1: File to import not found or unreadable: foundation.</code></p> <p>For reference, here's my file structure:</p> <pre><code>├── blog3 │   └── __pycache__ ├── components │   └── bower_components │   ├── foundation │   │   ├── css │   │   ├── js │   │   │   ├── foundation │   │   │   └── vendor │   │   └── scss │   │   └── foundation │   │   └── components │   ├── jquery │   └── modernizr │   ├── feature-detects │   ├── media │   └── test │   ├── caniuse_files │   ├── js │   │   └── lib │   └── qunit └── interface ├── migrations │   └── __pycache__ ├── __pycache__ ├── sass └── templates └── interface </code></pre> <p>This is my settings.py</p> <pre><code>""" Django settings for blog3 project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = '...' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'annoying', 'django_extensions', 'djangobower', 'interface', ) MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) ROOT_URLCONF = 'blog3.urls' WSGI_APPLICATION = 'blog3.wsgi.application' # Database # https://docs.djangoproject.com/en/dev/ref/settings/#databases DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), } } # Internationalization # https://docs.djangoproject.com/en/dev/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/dev/howto/static-files/ STATIC_URL = '/static/' STATICFILES_FINDERS = ( 'djangobower.finders.BowerFinder', ) BOWER_COMPONENTS_ROOT = os.path.join(BASE_DIR, "components") BOWER_INSTALLED_APPS = ( 'jquery', 'foundation', ) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload