ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Django-Rest-Snippets

by Bernardoow ST2/ST3

Sublime Snippets for Django Rest Framework

Details

Installs

  • Total 2K
  • Win 610
  • OS X 413
  • Linux 714
Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10
Windows 0 0 0 2 2 1 0 1 1 1 1 1 1 0 0 1 1 2 0 1 2 0 0 0 1 1 2 0 1 3 0 2 0 1 1 2 2 2 3 2 1 2 1 0 2 2
OS X 1 3 0 0 2 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 1 1 2 0 1 0 1 0 0 0 2 1 0 3 0 1 0 0 0 1 0 1 0 1 1
Linux 0 2 4 1 4 0 6 1 1 0 4 1 2 2 1 0 0 2 7 0 0 1 0 1 1 0 0 1 2 2 4 1 1 0 2 1 0 3 1 5 2 3 2 0 2 1

Readme

Source
raw.​githubusercontent.​com

Django-Rest-Snippets support for Sublime Text 3

Overview

Installation

  1. Clone this repo
  2. 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