Snippets Collections
// template.html
<link rel="stylesheet" href="{% static '/bulma-css/bulma-divider.min.css' %}" type="text/css">
<link rel="stylesheet" href="{% static '/bulma-css/bulma-switch.min.css' %}" type="text/css"> 
<link rel="stylesheet" href="{% static '/bulma-css/bulma.min.css' %}" type="text/css"> 
<link rel="stylesheet" href="{% static '/css/main.css' %}" type="text/css"> 


// settings.py

STATIC_URL = '/static/'

STATIC_ROOT = 'avon/static'
STATICFILES_DIRS = [
    os.path.join(BASE_DIR, "static")
]

// views.py

def template(request, self):
	return render(request, "template.html")
    
//  urls.py

urlpatterns [] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

    
# make sure that you save the file when reloading changes in port 8000
# check the path you defined in views.py, and for urls.py


# views
def about(request):
    return render(request, 'about.html')
    
# urls

urlpatterns [
path('', views.index, name='index'),
path('templates/about.html/', views.about, name="about")
]
bookmark
dashboard

Sun Aug 02 2020 02:24:12 GMT+0000 (UTC)

#django #css #html
bookmark
dashboard

Fri Jun 05 2020 23:16:55 GMT+0000 (UTC)

#django
bookmark
dashboard

Mon May 11 2020 13:44:16 GMT+0000 (UTC) https://stackoverflow.com/questions/15501673/how-to-temporarily-disable-a-foreign-key-constraint-in-mysql

#django #python

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension