标签:sql targe name class his lex migrate desc djang
https://simpleisbetterthancomplex.com/series/2017/09/11/a-complete-beginners-guide-to-django-part-2.html
https://github.com/sibtc/django-beginners-guide/tree/v0.2-lw
python manage.py makemigrations python manage.py sqlmigrate boards 0001 python manage.py migrate python manage.py shell from boards.models import Board board = Board(name=‘Django‘, description=‘This is a board about Django.‘) board.save() board = Board.objects.create(name=‘Python‘, description=‘General discussion about Python.‘) boards_list = Board.objects.all() for board in boards_list: print(board.description)
from django.conf.urls import url from django.contrib import admin from boards import views urlpatterns = [ url(r‘^$‘, views.home, name=‘home‘), url(r‘^admin/‘, admin.site.urls), ]
from django.contrib import admin from .models import Board admin.site.register(Board)
标签:sql targe name class his lex migrate desc djang
原文地址:https://www.cnblogs.com/larken/p/9597716.html