Friday, April 19, 2013

Help with integration of bootstrap and Django 1.4.3

Hi everybody,

I hope you are all well.

I am trying to integrate bootstrap with django. 
I installed the django-registration app and integrated the bootstrap and it worked fine.
But when I created my own app named impexlog it could not show the css in the bootstrap.

The arrangement of the file is like this
impexlog

impexlog/impexlog
impexlog/static
impexlog/registration

impexlog/static/assets
impexlog/carrierlocalization

 this is how part of my settings.py file looks like

STATIC_URL = '/static/'

# Additional locations of static files

STATICFILES_DIRS = (
    # Put strings here, like "/home/html/static" or "C:/www/django/static".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    '/home/micheal/Documents/Django/ImpexLog/static/assets',
   # '/home/micheal/Documents/Django/ImpexLog/carrier_localization/static/assets',
)

# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    #'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
# Make this unique, and don't share it with anybody.

SECRET_KEY = 'q*6mp6%i7b5l2m#j92xk&co=d$k^t!z5+f$*u$&(s^o#l@e-$#'

# List of callables that know how to import templates from various sources.

TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',

#     'django.template.loaders.eggs.Loader',

)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',
    # Uncomment the next line for simple clickjacking protection:
    # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'ImpexLog.urls'

# Python dotted path to the WSGI application used by Django's runserver.

WSGI_APPLICATION = 'ImpexLog.wsgi.application'

TEMPLATE_DIRS = (
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    '/home/micheal/Documents/Django/ImpexLog/Templates',
    #'/home/micheal/Documents/Django/ImpexLog/carrier_localization/templates',

)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # Uncomment the next line to enable the admin:
    'django.contrib.humanize',
    'django.contrib.admin',    
    # Uncomment the next line to enable admin documentation:
    # 'django.contrib.admindocs',
    'registration',
)

the template looks like the diagram and the error in the terminal.

Emily N

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment