User Tools

Site Tools


programming:django

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
programming:django [2019/03/22 15:18] clemixprogramming:django [2019/04/24 16:22] (current) – [Static files] clemix
Line 133: Line 133:
 </code> </code>
  
-==== Mixedin for django_tables2 ====+Run this command to store static files in proper folder: 
 +<code bash> 
 +python manage.py collectstatic 
 +</code> 
 +==== django_tables2 ==== 
 +=== Mixedin ===
  
 <code python> <code python>
Line 153: Line 158:
 </code> </code>
  
-To make links of a value https://django-tables2.readthedocs.io/en/latest/pages/api-reference.html?highlight=LinkColumn#django_tables2.columns.LinkColumn +===  Custom tables.Column ===
- +
-==== Custom tables.Column for django_tables2 ====+
 <code python> <code python>
 class AgeColumn(tables.Column): class AgeColumn(tables.Column):
Line 176: Line 179:
 </code> </code>
  
 +To make links of a value https://django-tables2.readthedocs.io/en/latest/pages/api-reference.html?highlight=LinkColumn#django_tables2.columns.LinkColumn
 ==== Update database ==== ==== Update database ====
 Change the model file accordingly. [[https://docs.djangoproject.com/en/2.1/ref/django-admin/#makemigrations|doc:makemigrations]] Change the model file accordingly. [[https://docs.djangoproject.com/en/2.1/ref/django-admin/#makemigrations|doc:makemigrations]]
Line 182: Line 186:
 python manage.py migrate python manage.py migrate
 </code> </code>
 +
 +==== Bootstrap ====
 +https://www.w3schools.com/bootstrap/default.asp
  
  
programming/django.1553264314.txt.gz · Last modified: by clemix

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki