i am not familiar with DB opertions. usually i stroe data to txt and other formats. as DB is more and more popular, i want to try it too.

i have some knowledge about Django. the DB opertions in Django is very easy than the DB source code. so i decided to reuse the Django DB operations out of Django projects.

it is very useful for small progress.

import os,sys
sys.path.append('Django project path')
os.environ['DJANGO_SETTINGS_MODULE']='settings'
from .views import viewClasses
import django
django.setup()

All right, we can reuse the Django DB operations for the 'viewClasses' now.

it is practical for basic DB operations like Add / Delete / Update / Retrieve

Hope it can help you.

相关文章:

  • 2021-04-11
  • 2021-09-14
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
  • 2022-01-18
  • 2021-07-03
猜你喜欢
  • 2021-10-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-15
  • 2021-08-11
  • 2021-09-23
相关资源
相似解决方案