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

Django-Rest-Snippets

by Bernardoow ST2/ST3

Sublime Snippets for Django Rest Framework

Details

  • 0.0.2
  • github.​com
  • github.​com
  • 10 months ago
  • 22 minutes ago
  • 10 months ago

Installs

  • Total 914
  • Win 314
  • OS X 224
  • Linux 376
Oct 23 Oct 22 Oct 21 Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8
Windows 0 0 2 1 0 0 0 0 1 0 2 3 0 4 1 2 1 3 1 4 1 1 1 1 1 2 1 4 1 1 3 1 2 0 2 0 2 0 1 3 1 3 1 4 0 1
OS X 0 1 1 0 0 0 1 1 2 0 0 0 1 1 1 3 0 2 1 1 1 0 0 1 0 0 1 0 2 2 0 0 0 2 3 1 0 1 0 1 6 0 0 2 3 0
Linux 0 2 2 0 3 3 2 2 2 1 2 1 1 1 5 2 1 2 0 5 2 1 2 0 2 1 0 1 3 0 2 1 1 2 3 4 5 3 3 1 3 1 0 2 1 0

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