python:django:model_definition

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
python:django:model_definition [2020/12/25 06:38] ともやんpython:django:model_definition [2020/12/25 06:40] (現在) – [models.py を 1 クラス 1 ファイルに分割する] ともやん
行 74: 行 74:
     # メタ情報     # メタ情報
     class Meta:     class Meta:
-        app_label = 'django_app'            # アプリケーション名+        app_label = 'django_app'                # アプリケーション名
         verbose_name = _('Media'              # 単数形名称         verbose_name = _('Media'              # 単数形名称
         verbose_name_plural = _('Medias'      # 複数形名称         verbose_name_plural = _('Medias'      # 複数形名称
-        db_table = 'ide_mime_type             # テーブル名+        db_table = 'vlc_media                 # テーブル名
         ordering = ('artist', 'album', 'track',) # ソート列         ordering = ('artist', 'album', 'track',) # ソート列
-        unique_together = (('media_hash'),     # unique制約+        unique_together = (('media_hash'),    # unique制約
 </code> </code>
 </WRAP> </WRAP>
  • python/django/model_definition.1608845911.txt.gz
  • 最終更新: 2020/12/25 06:38
  • by ともやん