Hey there,
Have you followed this:
*The only outstanding problem with our static assets is that the css and
javascript refer to locations that don't exist. To remedy this I use find
and replace to add in the static template tag. For example I find href="css
and mass replace with href="{% static "css; then I find .css" and replace
it with .css" %}". I do the same thing with javascript and now all the css
and javascript should be properly linked*
It's saying that things like <script type="text/javascript"
src="js/myscript.js"></script> should be replaced with <script
type="text/javascript" src="{% static "js/myscript.js" %}"></script>
You also have to add {% load staticfiles % } to your template. And have to
have staticfiles inside INSTALLED_APPS. I think it's there by default.
That should append STATIC_URL to all your paths.
Cheers,
M
On Wed, Apr 8, 2015 at 9:34 AM, Nkansah Rexford <[email protected]>
wrote:
> I'm following this tutorial:
> bitofpixels.com/blog/mezzatheming-creating-mezzanine-themes-part-1-basehtml/
>
> I've added the theme app, and made all the templates specific changes.
> Done!
>
> I run the app in browser, and all references to static files and media
> files are all lacking the ../static/... part. So for instance,
>
> Instead of:
>
> http://localhost:8000*/static/*img/home_blog/4.jpg/
>
> I get
>
> http://localhost:8000/img/home_blog/4.jpg (without the static part)
>
> When I explicitly add the static part to any url, the item loads,
> meanwhile, for whatever reasons, Mezzanine doesn't add the /static/ part.
>
> Here's my settings file: http://pastebin.com/6ZWgggSC
>
> I don't know where to look anymore, as the settings file looks perfect,
> and the urls are okay, because if not, I wouldn't be able to have the urls
> with /static/ in them pointing to the resources.
>
> thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.