admin.ModelAdmin.list_editable

ModelAdmin.list_editable Set list_editable to a list of field names on the model which will allow editing on the change list page. That is, fields listed in list_editable will be displayed as form widgets on the change list page, allowing users to edit and save multiple rows at once. Note list_editable interacts with a couple of other options in particular ways; you should note the following rules: Any field in list_editable must also be in list_display. You can’t edit a field that’s not di

db.models.Options.select_on_save

Options.select_on_save Determines if Django will use the pre-1.6 django.db.models.Model.save() algorithm. The old algorithm uses SELECT to determine if there is an existing row to be updated. The new algorithm tries an UPDATE directly. In some rare cases the UPDATE of an existing row isn’t visible to Django. An example is the PostgreSQL ON UPDATE trigger which returns NULL. In such cases the new algorithm will end up doing an INSERT even when a row exists in the database. Usually there is no

postgres.forms.RangeWidget

class RangeWidget(base_widget, attrs=None) Widget used by all of the range fields. Based on MultiWidget. RangeWidget has one required argument: base_widget A RangeWidget comprises a 2-tuple of base_widget. decompress(value) Takes a single “compressed” value of a field, for example a DateRangeField, and returns a tuple representing and lower and upper bound.

db.models.BinaryField

class BinaryField(**options) [source] A field to store raw binary data. It only supports bytes assignment. Be aware that this field has limited functionality. For example, it is not possible to filter a queryset on a BinaryField value. It is also not possible to include a BinaryField in a ModelForm. Abusing BinaryField Although you might think about storing files in the database, consider that it is bad design in 99% of the cases. This field is not a replacement for proper static files hand

core.files.storage.FileSystemStorage

class FileSystemStorage(location=None, base_url=None, file_permissions_mode=None, directory_permissions_mode=None) [source] The FileSystemStorage class implements basic file storage on a local filesystem. It inherits from Storage and provides implementations for all the public methods thereof. location Absolute path to the directory that will hold the files. Defaults to the value of your MEDIA_ROOT setting. base_url URL that serves the files stored at this location. Defaults to the

db.migrations.operations.AlterOrderWithRespectTo

class AlterOrderWithRespectTo(name, order_with_respect_to) [source] Makes or deletes the _order column needed for the order_with_respect_to option on the Meta subclass.

db.models.query.QuerySet.create()

create(**kwargs) A convenience method for creating an object and saving it all in one step. Thus: p = Person.objects.create(first_name="Bruce", last_name="Springsteen") and: p = Person(first_name="Bruce", last_name="Springsteen") p.save(force_insert=True) are equivalent. The force_insert parameter is documented elsewhere, but all it means is that a new object will always be created. Normally you won’t need to worry about this. However, if your model contains a manual primary key value that

db.models.query.QuerySet.delete()

delete() Performs an SQL delete query on all rows in the QuerySet and returns the number of objects deleted and a dictionary with the number of deletions per object type. The delete() is applied instantly. You cannot call delete() on a QuerySet that has had a slice taken or can otherwise no longer be filtered. For example, to delete all the entries in a particular blog: >>> b = Blog.objects.get(pk=1) # Delete all the entries belonging to this Blog. >>> Entry.objects.filter

db.models.FilePathField.path

FilePathField.path Required. The absolute filesystem path to a directory from which this FilePathField should get its choices. Example: "/home/images".

http.JsonResponse

class JsonResponse(data, encoder=DjangoJSONEncoder, safe=True, json_dumps_params=None, **kwargs) [source] An HttpResponse subclass that helps to create a JSON-encoded response. It inherits most behavior from its superclass with a couple differences: Its default Content-Type header is set to application/json. The first parameter, data, should be a dict instance. If the safe parameter is set to False (see below) it can be any JSON-serializable object. The encoder, which defaults to django.core