Hi Leo, Plz look at err/change log in developer tools to inspect whats up, after you adjust files.
On Tue, Dec 3, 2019, 06:20 Gerardo Palazuelos Guerrero < [email protected]> wrote: > Hi, > You better share your repo, my guess is you are not sharing all details... > > On my case I integrated a template with a Django project as a practice ( > my repo: https://github.com/gpalazuelosg/django-adminlte ), the important > bits: > > #1: settings.py has at the end two entries: > STATIC_URL = '/static/' > STATICFILES_DIRS = (os.path.join(BASE_DIR,'static'),) > > #2: I have an "static" folder at the same level as manage.py, which has > another folder called "base" inside > > #3: inside the /static/base folder, I have the following folders > containing pertinent files as you might imagine: > css > js > img > plugins > > #4: On my layout.html file, I use the following: > {% load static %} > ... > <link rel="stylesheet" href="{% static 'base/css/adminlte.min.css' %}"> > > > This is how it looks: > > > > I hopes that helps. > > -- > Gerardo Palazuelos Guerrero > > > > On Mon, Dec 2, 2019 at 3:09 PM Leó Horváth <[email protected]> > wrote: > >> hi, >> I did what Kevin requested, now console says "GET /pages/ HTTP/1.1" 200 >> 536 and the style still doesn't work. >> Any ideas? >> Thanks, >> Leó >> >> Kevin Dublin <[email protected]> ezt írta (időpont: 2019. dec. 2., H, >> 21:41): >> >>> Hi Leo, >>> >>> Make sure that you point to the exact directory where the CSS file is >>> located. If it's in static/pages/frame.css, then point to {% static >>> "pages/frame.css" %} >>> >>> Cheers, >>> >>> Kevin >>> >>> On Mon, Dec 2, 2019, 11:15 AM Leó Horváth <[email protected]> >>> wrote: >>> >>>> hi! i still cant make it work. this is my html snippet and the .css is >>>> located at static/pages/frame.css. >>>> when i run the server the browser displays the hard coded html but not >>>> the style. console says "GET /static/frame.css HTTP/1.1" 404 1651 >>>> <!DOCTYPE html> >>>> >>>> {% load static %} >>>> >>>> <html> >>>> <head> >>>> <meta charset="UTF-8"> >>>> {% block css %} >>>> <link rel="stylesheet" href="{% static 'frame.css' %}" /> >>>> {% endblock %} >>>> >>>> אורי <[email protected]> ezt írta (időpont: 2019. dec. 2., H, 3:33): >>>> >>>>> Hi, >>>>> >>>>> Look at these templates for example: >>>>> >>>>> https://github.com/speedy-net/speedy-net/blob/master/speedy/core/templates/base.html#L12-L27 >>>>> >>>>> >>>>> https://github.com/speedy-net/speedy-net/blob/master/speedy/match/templates/base_site.html#L7-L13 >>>>> >>>>> >>>>> https://github.com/speedy-net/speedy-net/blob/master/speedy/match/templates/accounts/edit_profile/activate.html#L13-L18 >>>>> >>>>> >>>>> אורי >>>>> [email protected] >>>>> >>>>> >>>>> On Mon, Dec 2, 2019 at 3:26 AM Leó Horváth <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi guys, I am experiencing an error while trying to Link a .css file >>>>>> to a Html template of one of my Views. What is the correct way to do it? >>>>>> >>>>>> -- >>>>>> 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 [email protected]. >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/django-users/b37e10ec-3b9d-4178-8757-1d0277f6cd15%40googlegroups.com >>>>>> <https://groups.google.com/d/msgid/django-users/b37e10ec-3b9d-4178-8757-1d0277f6cd15%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> >>>>> -- >>>>> 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 [email protected]. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/django-users/CABD5YeHFgym3pJ4Q5_gE3ATWJiVJ9KDnoBCN8UqM0%2BhWPxXpbg%40mail.gmail.com >>>>> <https://groups.google.com/d/msgid/django-users/CABD5YeHFgym3pJ4Q5_gE3ATWJiVJ9KDnoBCN8UqM0%2BhWPxXpbg%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>>> 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 [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/django-users/CAJBcW0w3qc8OcDgCJAFKrr881%2B2wyAyY3ENH6%3D2bi%2Bn%2BFALBDA%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/django-users/CAJBcW0w3qc8OcDgCJAFKrr881%2B2wyAyY3ENH6%3D2bi%2Bn%2BFALBDA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >>> 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 [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/CANips4LSgRBQ1QAg7gDgq70r--d4zDvQc%3DnfoiwcyomLEJaj%3Dg%40mail.gmail.com >>> <https://groups.google.com/d/msgid/django-users/CANips4LSgRBQ1QAg7gDgq70r--d4zDvQc%3DnfoiwcyomLEJaj%3Dg%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- >> 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 [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAJBcW0yX5x6ri3bbRUv9TFDPBqDda9dRP0kBYrQ0qXAh_Ds0_g%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAJBcW0yX5x6ri3bbRUv9TFDPBqDda9dRP0kBYrQ0qXAh_Ds0_g%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAJ8iCyMdG%3DFQjsBJ4L1ppGsYtE-u%3D6mw1DBtAn7DwbOA7S1wyw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAJ8iCyMdG%3DFQjsBJ4L1ppGsYtE-u%3D6mw1DBtAn7DwbOA7S1wyw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAP5HUWoSKcDbfRs1WqcZ0%2B0LQvS7Wm1xi2DDa1t4mvbx2tv9kw%40mail.gmail.com.

