On Thu, Mar 15, 2012 at 2:29 PM, kooliah
<kool...@djeve.sites.djangohosting.ch> wrote:
> I’m trying to run a satchmo store as an app of a django project
> I create a django project myprj (django-admin.py startproject myprj)
>
> I create a satchmo store (clonesatchmo.py)
> I copied settings.py and local_settings.py from myprj/store
> I modify myprj/urls to have shop in the /store subfolder of site
>
> code---------------------------------------------------------
> from django.conf.urls.defaults import *
> import store.urls
> from django.contrib import admin
> admin.autodiscover()
> urlpatterns = patterns('', (r'^store/', include(store.urls)),)
> ---------------------------------------------------------------
> Going to http://127.0.0.1:8000/store/ the shop starts but it does not find
> the css and all the static stuff
>
> output----------------------------------------------------
> [15/Mar/2012 11:08:29] "GET /static/css/style.css HTTP/1.1" 404 1999
> [15/Mar/2012 11:08:29] "GET
> /static/images/productimage-picture-dj-rocks-2_jpg_85x85_q85.jpg HTTP/1.1"
> 404 2128
> -----------------------------------------------------------
> So i try to copy the static dir from myprj/store/static to myprj/static but
> nothing change, the files are there but it does not find them.
>
> There are some wrong link too
>
> output----------------------------------------------------
> [15/Mar/2012 11:22:42] "GET /accounts/login/?next=/store/ HTTP/1.1" 404 1997
> -----------------------------------------------------------
> like it does not care of the "store" prefix
>
> Do I miss something? I think some prefix to put somewhere........
>
> Thank to all
>
> kooliah
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.


I had problems similar to you with my static files.  First, I am
assuming you are using v1.3 of Django?  V1.0 did this differently

Below is a snippet from my settings.py:

Django is doing some things I don't really understand, but in your
case I think you should add entries to the STATICFILES_DIRS tuple.
You should read carefully the django docs concerning static file
settings.  Its confusing -- at least to me.

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = os.path.join(PROJECT_PATH,'static/')

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/";
STATIC_URL = '/static/'

# URL prefix for admin static files -- CSS, JavaScript and images.
# Make sure to use a trailing slash.
# Examples: "http://foo.com/static/admin/";, "/static/admin/".
ADMIN_MEDIA_PREFIX = '/static/admin/'

# 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.
    os.path.join(PROJECT_PATH,'project_static'),
)



-- 
Joel Goldstick

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

Reply via email to