Have you tried to add a few newlines to be sure about which line is the issue ?

Also, in you email, there is a space between % and } in the load staticfiles tag

2016-09-11 7:29 GMT+02:00 Jonathan Cheng <jonathan950...@gmail.com>:
> I use django1.10
>
> i reference the official doc
> https://docs.djangoproject.com/en/1.10/intro/tutorial06/
>
> my project name:mysite
>
> structure:
>
> - mysite-
>
>              - mysite - urls.py
>
>                        -views.py
>
>                         ...
>
>              - templates - index.html
>
>                          - images
>              - static - mysite - assets - css - main.css
>
>                                         - js
>
>                                         ...
> In my index.html
>
> add
>
> `{% load staticfiles % }
>         <link rel="stylesheet" text = 'html/css' href="{% static
> 'mysite/static/main.css' %}" />`
>
> it said i have a Invalid block tag about TemplateSyntaxError
> `<link rel="stylesheet" type = 'text/css' href="{% static
> 'mysite/static/assets/css/main.css' %}" />`
>
> views.py (about static files part)
> ```STATICFILES_DIRS = [
>     os.path.join(BASE_DIR, "static"),
>     '/mysite/static/',
> ]
> STATIC_URL = '/static/'
> STATIC_ROOT='/mysite/static/'```
>
> what's part should i notice?
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/ef2ea6eb-d1cb-40e2-abef-1af246e02e98%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTZkk8ZRhgO1qyROMa4f5PcuFTpCTNyGN-OE%2Bme-6BSEJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to