Browse Django-Rest-Snippets
Sublime Snippets for Django Rest Framework
Installs
- Total 6K
- Win 3K
- Mac 944
- Linux 2K
| Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 |
Windows | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 2 | 1 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Django-Rest-Snippets support for Sublime Text 3
Overview
Installation
- Clone this repo
- Put the contents of this repo directly inside:
- OS X: ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
- Windows: %APPDATA%/Sublime Text 3/Packages/
- Linux: ~/.config/sublime-text-3/Packages
Or use PackageControl.
Snippets for serializer fields
Abbreviation |
Tag |
sbool |
serializers.BooleanField() |
schar |
serializers.CharField() |
schoice |
serializers.ChoiceField() |
sdate |
serializers.DateField() |
sdatetime |
serializers.DateTimeField() |
sdecimal |
serializers.DecimalField() |
sdict |
serializers.DictField() |
sduration |
serializers.DurationField() |
semail |
serializers.EmailField() |
sfile |
serializers.FileField() |
sfilepath |
serializers.FilePathField() |
sfloat |
serializers.FloatField() |
shidden |
serializers.HiddenField() |
shiperidentity |
serializers.HyperlinkedRelatedField() |
shr |
serializers.HyperlinkedRelatedField() |
simage |
serializers.ImageField() |
sint |
serializers.IntegerField() |
sip |
serializers.IPAddressField() |
sjson |
serializers.JSONField() |
slist |
serializers.ListField() |
smodel |
serializers.ModelField() |
smchoice |
serializers.MultipleChoiceField() |
snullbool |
serializers.NullBooleanField() |
spkr |
serializers.PrimaryKeyRelatedField() |
sreadonly |
serializers.ReadOnlyField() |
sregex |
serializers.RegexField() |
ssmethod |
serializers.SerializerMethodField() |
sslug |
serializers.SlugField() |
sslugrelated |
serializers.SlugRelatedField() |
ssr |
serializers.StringRelatedField() |
stime |
serializers.TimeField() |
surl |
serializers.URLField() |
suuid |
serializers.UUIDField() |
Snippets for serializer methods
Abbreviation |
Tag |
create |
def create(self, validated_data) |
update |
def update(self, instance, validated_data) |
Snippets for serializer classes
Abbreviation |
Tag |
serializer |
Serializer |
modelserializer |
Model Serializer |
Snippets for Concrete View Classes
Abbreviation |
Tag |
apiview |
APIView |
createapiview |
CreateAPIView |
destroyapiview |
DestroyAPIView |
listapiview |
ListAPIView |
listcreateapiview |
ListCreateAPIView |
retrieveapiview |
RetrieveAPIView |
retrievedestroyapiview |
RetrieveDestroyAPIView |
retrieveupdateapiview |
RetrieveUpdateAPIView |
retrieveupdatedestroyapiview |
RetrieveUpdateDestroyAPIView |
updateapiview |
UpdateAPIView |
Snippets for View Methods
Abbreviation |
Tag |
perfomecreate |
perform_create |
perfomedelete |
perform_destroy |
perfomeupdate |
perform_update |
Snippets for ViewSet
Abbreviation |
Tag |
viewset |
ViewSet |
readonlymodelviewset |
ReadOnlyModelViewSet |
modelviewset |
ModelViewSet |
Completions
Full list of all available settings
- read_only
- write_only
- required
- allow_null