Changes between Version 1 and Version 2 of new_meta_api


Ignore:
Timestamp:
Jul 11, 2014, 5:00:24 AM (10 years ago)
Author:
pirosb3
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • new_meta_api

    v1 v2  
    1515 - The implementation of the new API throughout django and django.contrib
    1616
     17=== Concepts
     18
     19There are 5 main types of fields:
     20 
     21===== Data fields
     22A data field is any field that has an entry on the database, for example a CharField, BooleanField, a ForeignKey
     23
     24
     25{{{
     26class Person(models.Model):
     27    # DATA field
     28    data_abstract = models.CharField(max_length=10)
     29}}}
     30
     31
     32===== M2M fields
     33A M2M field that is defined on the current model
     34
     35{{{
     36class Person(models.Model):
     37    # M2M fields
     38    friends = models.ManyToManyField('self', related_name='friends', symmetrical=True)
     39}}}
     40
     41
     42===== Related Object
     43A Related Object is a relation from another model (such as a ForeignKey) that points to the current model
     44     
     45
     46== Endpoints
    1747
    1848
Back to Top