A simple example of Django and CSS

前端 未结 5 2028

I\'m new to Django, and am trying to set up a really simple Django app.

Now, I\'m up to chapter 5 in the Django online book : http://www.djangobook.com/en/2.0/chapte

5条回答
  •  悲&欢浪女
    2020-12-08 03:00

    The recommended approach has changed again (from at least Django 1.5 I think).

    At the top of your template put:

    {% load staticfiles %}
    

    Then, using the same directory structure (myapp/static/myapp/style.css):

    
    

    Source

提交回复
热议问题