Ací es mostren les diferències entre la revisió seleccionada i la versió actual de la pàgina.
Ambdós costats versió prèvia Revisió prèvia Següent revisió | Revisió prèvia | ||
django_railway [2023/05/11 16:38] enric_mieza_sanchez [Setup BD] |
django_railway [2023/05/12 14:05] (actual) enric_mieza_sanchez [Setup BD] |
||
---|---|---|---|
Línia 31: | Línia 31: | ||
Per realitzar això caldrà anar a | Per realitzar això caldrà anar a | ||
Settings -> Build Command | Settings -> Build Command | ||
+ | |||
+ | {{railway-build-settings.png}} | ||
I hi posarem les instruccions per a que tot funcioni: | I hi posarem les instruccions per a que tot funcioni: | ||
<WRAP prewrap> | <WRAP prewrap> | ||
- | . / | + | . / |
</ | </ | ||
Línia 42: | Línia 44: | ||
python3 manage.py crea_lliga "Lliga 1a divisió" | python3 manage.py crea_lliga "Lliga 1a divisió" | ||
+ | \\ | ||
+ | |||
+ | ===== Servir arxius estàtics ===== | ||
+ | Si encara que fem el '' | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | Només cal tocar l' | ||
+ | |||
+ | <file python urls.py> | ||
+ | from django.contrib import admin | ||
+ | from django.urls import include, | ||
+ | from django.conf.urls.static import static | ||
+ | from django.conf import settings | ||
+ | |||
+ | from lliga.views import profile | ||
+ | |||
+ | urlpatterns = [ | ||
+ | path(' | ||
+ | path(' | ||
+ | path(" | ||
+ | path(" | ||
+ | |||
+ | ] + static(settings.STATIC_URL, | ||
+ | </ | ||
+ | \\ | ||