list of all app_label, model of existing contentTypes
all_models = [ each for each in GetAllModels() ] This produces a list of tuples in format ( app_label's name, model's name) of all the ContentType existing in system.
- django
all_models = [ each for each in GetAllModels() ] This produces a list of tuples in format ( app_label's name, model's name) of all the ContentType existing in system.
in models, import GeoCoordinateField: class Place(models.Model): geocoordn = GeoCoordinateField(verbose_name="geocordfield", null=True, blank = True) >>>place = Place.objects.geocoordn #gives you a Geocoordinate object >>>place.geocoordn.latitude, place.geocoordn.longitude #gives latitude and longitude of place
vijay.shanker has posted 2 snippets.