From 3a3ca01ae11fb32145d6ea24c3185f1606550d5f Mon Sep 17 00:00:00 2001 From: Jose Soares Date: Fri, 10 Apr 2020 09:20:50 -0400 Subject: [PATCH 1/5] [-] Django snippet collection --- python-mode/django/README.org | 234 ++++++++++++++++++ python-mode/django/backends/authentication | 7 + python-mode/django/backends/cache-database | 7 + python-mode/django/backends/cache-dummy | 7 + python-mode/django/backends/cache-file | 7 + python-mode/django/backends/cache-locmem | 7 + python-mode/django/backends/cache-memcached | 7 + python-mode/django/backends/cache-pylibmc | 7 + python-mode/django/backends/db-mysql | 7 + python-mode/django/backends/db-oracle | 7 + python-mode/django/backends/db-postgresql | 7 + python-mode/django/backends/db-sqlite3 | 7 + python-mode/django/backends/email | 7 + python-mode/django/backends/message-cookie | 7 + python-mode/django/backends/message-fallback | 7 + python-mode/django/backends/message-session | 7 + python-mode/django/backends/session-cache | 7 + python-mode/django/backends/session-cached-db | 7 + python-mode/django/backends/session-db | 7 + python-mode/django/backends/session-file | 7 + .../django/backends/session-signed-cookies | 7 + python-mode/django/backends/signing | 7 + python-mode/django/backends/staticfiles | 7 + python-mode/django/backends/templates-django | 7 + python-mode/django/backends/templates-jinja2 | 7 + python-mode/django/common/modeladmin | 20 ++ python-mode/django/common/ugettextify | 6 + python-mode/django/imports/mark-safe | 7 + python-mode/django/imports/models | 7 + python-mode/django/imports/reverse-url | 7 + python-mode/django/imports/safe-string | 7 + python-mode/django/imports/settings | 7 + python-mode/django/imports/site-settings | 7 + python-mode/django/imports/staff-required | 7 + python-mode/django/imports/timezone | 7 + python-mode/django/imports/ugettext | 7 + python-mode/django/imports/url-path | 7 + python-mode/django/imports/url-repath | 7 + python-mode/django/management/command | 27 ++ python-mode/django/meta/abstract | 7 + python-mode/django/meta/app-label | 7 + python-mode/django/meta/base-manager-name | 7 + python-mode/django/meta/constraints | 10 + python-mode/django/meta/db-table | 7 + python-mode/django/meta/db-tablespace | 7 + python-mode/django/meta/default-manager-name | 7 + python-mode/django/meta/default-permissions | 7 + python-mode/django/meta/default-related-name | 7 + python-mode/django/meta/forms-error-messages | 21 ++ python-mode/django/meta/forms-exclude | 7 + python-mode/django/meta/forms-field-classes | 12 + python-mode/django/meta/forms-fields | 7 + python-mode/django/meta/forms-help-texts | 9 + python-mode/django/meta/forms-labels | 12 + .../django/meta/forms-localized-fields | 7 + python-mode/django/meta/forms-model | 7 + python-mode/django/meta/forms-widgets | 13 + python-mode/django/meta/get-latest-by | 7 + python-mode/django/meta/index-together | 7 + python-mode/django/meta/indexes | 10 + python-mode/django/meta/label | 7 + python-mode/django/meta/label-lower | 7 + python-mode/django/meta/managed | 7 + python-mode/django/meta/order-with-respect-to | 8 + python-mode/django/meta/ordering | 7 + python-mode/django/meta/permissions | 7 + python-mode/django/meta/proxy | 7 + python-mode/django/meta/required-db-features | 7 + python-mode/django/meta/required-db-vendor | 8 + python-mode/django/meta/select-on-save | 7 + python-mode/django/meta/unique-together | 7 + python-mode/django/meta/verbose-name | 7 + python-mode/django/meta/verbose-name-plural | 7 + python-mode/django/middleware/authentication | 7 + .../django/middleware/broken-link-email | 7 + python-mode/django/middleware/cache-fetch | 7 + python-mode/django/middleware/cache-update | 7 + python-mode/django/middleware/common | 7 + python-mode/django/middleware/conditional-get | 7 + python-mode/django/middleware/csrf-view | 7 + python-mode/django/middleware/current-site | 7 + python-mode/django/middleware/gzip | 7 + python-mode/django/middleware/locale | 7 + python-mode/django/middleware/message | 7 + .../django/middleware/persistent-remote-user | 7 + python-mode/django/middleware/remote-user | 7 + python-mode/django/middleware/security | 7 + python-mode/django/middleware/session | 7 + python-mode/django/middleware/x-frame-options | 7 + python-mode/django/models/common | 18 ++ python-mode/django/models/generic | 20 ++ python-mode/django/settings/.yas-parents | 1 + .../django/settings/absolute-url-overrides | 9 + .../settings/absolute-url-overrides-dot | 7 + python-mode/django/settings/admins | 9 + python-mode/django/settings/admins-dot | 7 + python-mode/django/settings/allowed-hosts | 9 + python-mode/django/settings/allowed-hosts-dot | 7 + python-mode/django/settings/append-slash | 8 + python-mode/django/settings/append-slash-dot | 7 + .../django/settings/auth-password-validators | 7 + .../settings/auth-password-validators-dot | 7 + python-mode/django/settings/auth-user-model | 7 + .../django/settings/auth-user-model-dot | 7 + .../django/settings/authentication-backends | 7 + .../settings/authentication-backends-dot | 7 + .../django/settings/cache-middleware-alias | 7 + .../settings/cache-middleware-alias-dot | 7 + .../settings/cache-middleware-key-prefix | 7 + .../settings/cache-middleware-key-prefix-dot | 7 + .../django/settings/cache-middleware-seconds | 7 + .../settings/cache-middleware-seconds-dot | 7 + python-mode/django/settings/caches | 12 + python-mode/django/settings/caches-dot | 7 + python-mode/django/settings/csrf-cookie-age | 7 + .../django/settings/csrf-cookie-age-dot | 7 + .../django/settings/csrf-cookie-domain | 7 + .../django/settings/csrf-cookie-domain-dot | 7 + .../django/settings/csrf-cookie-httponly | 7 + .../django/settings/csrf-cookie-httponly-dot | 7 + python-mode/django/settings/csrf-cookie-name | 7 + .../django/settings/csrf-cookie-name-dot | 7 + python-mode/django/settings/csrf-cookie-path | 7 + .../django/settings/csrf-cookie-path-dot | 7 + .../django/settings/csrf-cookie-samesite | 7 + .../django/settings/csrf-cookie-samesite-dot | 7 + .../django/settings/csrf-cookie-secure | 7 + .../django/settings/csrf-cookie-secure-dot | 7 + python-mode/django/settings/csrf-failure-view | 9 + .../django/settings/csrf-failure-view-dot | 7 + python-mode/django/settings/csrf-header-name | 7 + .../django/settings/csrf-header-name-dot | 7 + .../django/settings/csrf-trusted-origins | 9 + .../django/settings/csrf-trusted-origins-dot | 7 + python-mode/django/settings/csrf-use-sessions | 7 + .../django/settings/csrf-use-sessions-dot | 7 + .../settings/data-upload-max-memory-size | 9 + .../settings/data-upload-max-memory-size-dot | 7 + .../settings/data-upload-max-number-fields | 9 + .../data-upload-max-number-fields-dot | 7 + python-mode/django/settings/database-routers | 8 + .../django/settings/database-routers-dot | 7 + python-mode/django/settings/databases | 8 + python-mode/django/settings/databases-dot | 7 + python-mode/django/settings/date-format | 9 + python-mode/django/settings/date-format-dot | 7 + .../django/settings/date-input-formats | 17 ++ .../django/settings/date-input-formats-dot | 7 + python-mode/django/settings/datetime-format | 9 + .../django/settings/datetime-format-dot | 7 + .../django/settings/datetime-input-formats | 22 ++ .../settings/datetime-input-formats-dot | 7 + python-mode/django/settings/debug | 7 + python-mode/django/settings/debug-dot | 7 + .../settings/debug-propagate-exceptions | 10 + .../settings/debug-propagate-exceptions-dot | 7 + python-mode/django/settings/decimal-separator | 8 + .../django/settings/decimal-separator-dot | 7 + python-mode/django/settings/default-charset | 8 + .../django/settings/default-charset-dot | 7 + .../settings/default-exception-reporter | 9 + .../settings/default-exception-reporter-dot | 7 + .../default-exception-reporter-filter | 9 + .../default-exception-reporter-filter-dot | 7 + .../django/settings/default-file-storage | 8 + .../django/settings/default-file-storage-dot | 7 + .../django/settings/default-from-email | 9 + .../django/settings/default-from-email-dot | 7 + .../django/settings/default-index-tablespace | 7 + .../settings/default-index-tablespace-dot | 7 + .../django/settings/default-tablespace | 8 + .../django/settings/default-tablespace-dot | 7 + .../django/settings/disallow-user-agents | 19 ++ .../django/settings/disallow-user-agents-dot | 7 + python-mode/django/settings/email-backend | 11 + python-mode/django/settings/email-backend-dot | 7 + python-mode/django/settings/email-host | 8 + python-mode/django/settings/email-host-dot | 7 + .../django/settings/email-host-password | 7 + .../django/settings/email-host-password-dot | 7 + python-mode/django/settings/email-host-user | 7 + .../django/settings/email-host-user-dot | 7 + python-mode/django/settings/email-port | 8 + python-mode/django/settings/email-port-dot | 7 + .../django/settings/email-ssl-certfile | 7 + .../django/settings/email-ssl-certfile-dot | 7 + python-mode/django/settings/email-ssl-keyfile | 7 + .../django/settings/email-ssl-keyfile-dot | 7 + .../django/settings/email-subject-prefix | 9 + .../django/settings/email-subject-prefix-dot | 7 + python-mode/django/settings/email-timeout | 7 + python-mode/django/settings/email-timeout-dot | 7 + .../django/settings/email-use-localtime | 8 + .../django/settings/email-use-localtime-dot | 7 + python-mode/django/settings/email-use-ssl | 7 + python-mode/django/settings/email-use-ssl-dot | 7 + python-mode/django/settings/email-use-tls | 7 + python-mode/django/settings/email-use-tls-dot | 7 + .../file-upload-directory-permissions | 10 + .../file-upload-directory-permissions-dot | 7 + .../django/settings/file-upload-handlers | 11 + .../django/settings/file-upload-handlers-dot | 7 + .../settings/file-upload-max-memory-size | 8 + .../settings/file-upload-max-memory-size-dot | 7 + .../django/settings/file-upload-permissions | 9 + .../settings/file-upload-permissions-dot | 7 + .../django/settings/file-upload-temp-dir | 10 + .../django/settings/file-upload-temp-dir-dot | 7 + python-mode/django/settings/first-day-of-week | 9 + .../django/settings/first-day-of-week-dot | 7 + python-mode/django/settings/fixture-dirs | 10 + python-mode/django/settings/fixture-dirs-dot | 7 + python-mode/django/settings/force-script-name | 8 + .../django/settings/force-script-name-dot | 7 + python-mode/django/settings/form-renderer | 8 + python-mode/django/settings/form-renderer-dot | 7 + .../django/settings/format-module-path | 11 + .../django/settings/format-module-path-dot | 7 + .../django/settings/ignoreable-404-urls | 19 ++ .../django/settings/ignoreable-404-urls-dot | 7 + python-mode/django/settings/installed-apps | 10 + .../django/settings/installed-apps-dot | 7 + python-mode/django/settings/intermal-ips | 10 + python-mode/django/settings/intermal-ips-dot | 7 + python-mode/django/settings/language-code | 9 + python-mode/django/settings/language-code-dot | 7 + .../django/settings/language-cookie-age | 7 + .../django/settings/language-cookie-age-dot | 7 + .../django/settings/language-cookie-domain | 7 + .../settings/language-cookie-domain-dot | 7 + .../django/settings/language-cookie-httponly | 7 + .../settings/language-cookie-httponly-dot | 7 + .../django/settings/language-cookie-name | 7 + .../django/settings/language-cookie-name-dot | 7 + .../django/settings/language-cookie-path | 7 + .../django/settings/language-cookie-path-dot | 7 + .../django/settings/language-cookie-samesite | 7 + .../settings/language-cookie-samesite-dot | 7 + .../django/settings/language-cookie-secure | 7 + .../settings/language-cookie-secure-dot | 7 + python-mode/django/settings/languages | 101 ++++++++ python-mode/django/settings/languages-bidi | 8 + .../django/settings/languages-bidi-dot | 7 + python-mode/django/settings/languages-dot | 7 + python-mode/django/settings/locale-paths | 7 + python-mode/django/settings/locale-paths-dot | 7 + python-mode/django/settings/logging | 8 + python-mode/django/settings/logging-config | 8 + .../django/settings/logging-config-dot | 7 + python-mode/django/settings/logging-dot | 7 + .../django/settings/login-redirect-url | 7 + .../django/settings/login-redirect-url-dot | 7 + python-mode/django/settings/login-url | 7 + python-mode/django/settings/login-url-dot | 7 + .../django/settings/logout-redirect-url | 7 + .../django/settings/logout-redirect-url-dot | 7 + python-mode/django/settings/managers | 9 + python-mode/django/settings/managers-dot | 7 + python-mode/django/settings/media-root | 9 + python-mode/django/settings/media-root-dot | 7 + python-mode/django/settings/media-url | 9 + python-mode/django/settings/media-url-dot | 7 + python-mode/django/settings/message-storage | 8 + .../django/settings/message-storage-dot | 7 + python-mode/django/settings/middleware | 10 + python-mode/django/settings/middleware-dot | 7 + python-mode/django/settings/migration-modules | 8 + .../django/settings/migration-modules-dot | 7 + python-mode/django/settings/month-day-format | 10 + .../django/settings/month-day-format-dot | 7 + python-mode/django/settings/number-grouping | 9 + .../django/settings/number-grouping-dot | 7 + python-mode/django/settings/password-hashers | 15 ++ .../django/settings/password-hashers-dot | 7 + .../django/settings/password-reset-timeout | 9 + .../settings/password-reset-timeout-days | 8 + .../settings/password-reset-timeout-days-dot | 7 + .../settings/password-reset-timeout-dot | 7 + python-mode/django/settings/prepend-www | 8 + python-mode/django/settings/prepend-www-dot | 7 + python-mode/django/settings/secret-key | 10 + python-mode/django/settings/secret-key-dot | 7 + .../django/settings/secure-browser-xss-filter | 7 + .../settings/secure-browser-xss-filter-dot | 7 + .../settings/secure-content-type-nosniff | 7 + .../settings/secure-content-type-nosniff-dot | 7 + .../settings/secure-hsts-include-subdomains | 7 + .../secure-hsts-include-subdomains-dot | 7 + .../django/settings/secure-hsts-preload | 7 + .../django/settings/secure-hsts-preload-dot | 7 + .../django/settings/secure-hsts-seconds | 7 + .../django/settings/secure-hsts-seconds-dot | 7 + .../django/settings/secure-proxy-ssl-header | 14 ++ .../settings/secure-proxy-ssl-header-dot | 7 + .../django/settings/secure-redirect-exempt | 7 + .../settings/secure-redirect-exempt-dot | 7 + .../django/settings/secure-referrer-policy | 7 + .../settings/secure-referrer-policy-dot | 7 + python-mode/django/settings/secure-ssl-host | 7 + .../django/settings/secure-ssl-host-dot | 7 + .../django/settings/secure-ssl-redirect | 7 + .../django/settings/secure-ssl-redirect-dot | 7 + python-mode/django/settings/server-email | 8 + python-mode/django/settings/server-email-dot | 7 + .../django/settings/session-cache-alias | 8 + .../django/settings/session-cache-alias-dot | 7 + .../django/settings/session-cookie-age | 8 + .../django/settings/session-cookie-age-dot | 7 + .../django/settings/session-cookie-domain | 8 + .../django/settings/session-cookie-domain-dot | 7 + .../django/settings/session-cookie-httponly | 8 + .../settings/session-cookie-httponly-dot | 7 + .../django/settings/session-cookie-name | 8 + .../django/settings/session-cookie-name-dot | 7 + .../django/settings/session-cookie-path | 8 + .../django/settings/session-cookie-path-dot | 7 + .../django/settings/session-cookie-samesite | 9 + .../settings/session-cookie-samesite-dot | 7 + .../django/settings/session-cookie-secure | 8 + .../django/settings/session-cookie-secure-dot | 7 + python-mode/django/settings/session-engine | 8 + .../django/settings/session-engine-dot | 7 + .../settings/session-expire-at-browser-close | 8 + .../session-expire-at-browser-close-dot | 7 + python-mode/django/settings/session-file-path | 9 + .../django/settings/session-file-path-dot | 7 + .../settings/session-save-every-request | 8 + .../settings/session-save-every-request-dot | 7 + .../django/settings/session-serializer | 8 + .../django/settings/session-serializer-dot | 7 + python-mode/django/settings/short-date-format | 9 + .../django/settings/short-date-format-dot | 7 + .../django/settings/short-datetime-format | 10 + .../django/settings/short-datetime-format-dot | 7 + python-mode/django/settings/signing-backend | 7 + .../django/settings/signing-backend-dot | 7 + .../django/settings/silenced-system-checks | 13 + .../settings/silenced-system-checks-dot | 7 + python-mode/django/settings/static-root | 9 + python-mode/django/settings/static-root-dot | 7 + python-mode/django/settings/static-url | 9 + python-mode/django/settings/static-url-dot | 7 + python-mode/django/settings/staticfiles-dirs | 8 + .../django/settings/staticfiles-dirs-dot | 7 + .../django/settings/staticfiles-finders | 13 + .../django/settings/staticfiles-finders-dot | 7 + .../django/settings/staticfiles-storage | 8 + .../django/settings/staticfiles-storage-dot | 7 + python-mode/django/settings/templates | 9 + python-mode/django/settings/templates-dot | 7 + .../django/settings/test-non-serialized-apps | 9 + .../settings/test-non-serialized-apps-dot | 7 + python-mode/django/settings/test-runner | 8 + python-mode/django/settings/test-runner-dot | 7 + .../django/settings/thousand-separator | 8 + .../django/settings/thousand-separator-dot | 7 + python-mode/django/settings/time-format | 9 + python-mode/django/settings/time-format-dot | 7 + .../django/settings/time-input-formats | 15 ++ .../django/settings/time-input-formats-dot | 7 + python-mode/django/settings/time-zone | 11 + python-mode/django/settings/time-zone-dot | 7 + python-mode/django/settings/use-i18n | 9 + python-mode/django/settings/use-i18n-dot | 7 + python-mode/django/settings/use-l10n | 9 + python-mode/django/settings/use-l10n-dot | 7 + .../django/settings/use-thousand-separator | 8 + .../settings/use-thousand-separator-dot | 7 + python-mode/django/settings/use-tz | 8 + python-mode/django/settings/use-tz-dot | 7 + .../django/settings/use-x-forwarded-host | 7 + .../django/settings/use-x-forwarded-host-dot | 7 + .../django/settings/use-x-forwarded-port | 7 + .../django/settings/use-x-forwarded-port-dot | 7 + python-mode/django/settings/wsgi-application | 12 + .../django/settings/wsgi-application-dot | 7 + python-mode/django/settings/x-frame-options | 8 + .../django/settings/x-frame-options-dot | 7 + python-mode/django/settings/year-month-format | 10 + .../django/settings/year-month-format-dot | 7 + python-mode/django/snippet-templates | 82 ++++++ python-mode/django/templatetags/filter | 10 + .../django/templatetags/filter-with-arg | 10 + python-mode/django/templatetags/simpletag | 10 + python-mode/django/views/basic-cbv | 13 + python-mode/django/views/basic-func-get-view | 12 + python-mode/django/views/basic-view | 10 + python-mode/django/views/detail-view-cbv | 30 +++ python-mode/django/views/list-view-cbv | 26 ++ python-mode/django/views/redirect-cbv | 17 ++ python-mode/django/views/template-cbv | 16 ++ web-mode/django/README.org | 88 +++++++ web-mode/django/filters/filter-add | 7 + web-mode/django/filters/filter-addslashes | 7 + web-mode/django/filters/filter-capfirst | 7 + web-mode/django/filters/filter-center | 7 + web-mode/django/filters/filter-cut | 7 + web-mode/django/filters/filter-date | 7 + web-mode/django/filters/filter-default | 7 + .../django/filters/filter-default-if-none | 7 + web-mode/django/filters/filter-dictsort | 7 + .../django/filters/filter-dictsortreversed | 7 + web-mode/django/filters/filter-divisbleby | 7 + web-mode/django/filters/filter-escape | 7 + web-mode/django/filters/filter-escapejs | 7 + web-mode/django/filters/filter-filesizeformat | 7 + web-mode/django/filters/filter-first | 6 + web-mode/django/filters/filter-floatformat | 7 + web-mode/django/filters/filter-force-escape | 7 + web-mode/django/filters/filter-get-digit | 7 + web-mode/django/filters/filter-iriencode | 7 + web-mode/django/filters/filter-join | 7 + web-mode/django/filters/filter-json-script | 7 + web-mode/django/filters/filter-last | 7 + web-mode/django/filters/filter-length | 7 + web-mode/django/filters/filter-length-is | 7 + web-mode/django/filters/filter-linebreaks | 7 + web-mode/django/filters/filter-linebreaksbr | 7 + web-mode/django/filters/filter-ljust | 7 + web-mode/django/filters/filter-lower | 7 + web-mode/django/filters/filter-make-list | 7 + web-mode/django/filters/filter-phone2numeric | 7 + web-mode/django/filters/filter-pluralize | 7 + web-mode/django/filters/filter-pprint | 7 + web-mode/django/filters/filter-random | 7 + web-mode/django/filters/filter-rjust | 7 + web-mode/django/filters/filter-safe | 7 + web-mode/django/filters/filter-safeseq | 7 + web-mode/django/filters/filter-slice | 7 + web-mode/django/filters/filter-slugify | 7 + web-mode/django/filters/filter-stringformat | 7 + web-mode/django/filters/filter-striptags | 7 + web-mode/django/filters/filter-time | 7 + web-mode/django/filters/filter-timesince | 7 + web-mode/django/filters/filter-timeuntil | 7 + web-mode/django/filters/filter-title | 7 + web-mode/django/filters/filter-truncatechars | 7 + .../django/filters/filter-truncatechars-html | 7 + web-mode/django/filters/filter-truncatewords | 7 + .../django/filters/filter-truncatewords-html | 7 + web-mode/django/filters/filter-unordered-list | 7 + web-mode/django/filters/filter-upper | 7 + web-mode/django/filters/filter-urlencode | 7 + web-mode/django/filters/filter-urlize | 7 + web-mode/django/filters/filter-urlizetrunc | 7 + web-mode/django/filters/filter-wordcount | 7 + web-mode/django/filters/filter-wordwrap | 7 + web-mode/django/filters/filter-yesno | 7 + .../django/humanize/filter-humanize-apnumber | 7 + .../django/humanize/filter-humanize-intcomma | 7 + .../django/humanize/filter-humanize-intword | 7 + .../humanize/filter-humanize-naturalday | 7 + .../humanize/filter-humanize-naturaltime | 7 + .../django/humanize/filter-humanize-ordinal | 7 + web-mode/django/i18n/i18n-blocktrans | 9 + .../django/i18n/i18n-filter-language-bidi | 7 + .../django/i18n/i18n-filter-language-name | 7 + .../i18n/i18n-filter-language-name-local | 7 + .../django/i18n/i18n-get-available-languages | 7 + .../django/i18n/i18n-get-current-language | 7 + .../i18n/i18n-get-current-language-bidi | 7 + web-mode/django/i18n/i18n-get-language-info | 7 + .../django/i18n/i18n-get-language-info-list | 7 + web-mode/django/i18n/i18n-trans | 7 + web-mode/django/l10n/l10n-localize | 9 + web-mode/django/l10n/l10n-unlocalize | 7 + web-mode/django/snippet-templates | 20 ++ web-mode/django/tags/autoescape | 9 + web-mode/django/tags/block | 9 + web-mode/django/tags/comment | 9 + web-mode/django/tags/csrf-token | 7 + web-mode/django/tags/cycle | 7 + web-mode/django/tags/extends | 7 + web-mode/django/tags/filter | 9 + web-mode/django/tags/first | 7 + web-mode/django/tags/firstof | 7 + web-mode/django/tags/for | 9 + web-mode/django/tags/for-empty | 11 + web-mode/django/tags/for-reversed | 9 + web-mode/django/tags/for-with-doc | 19 ++ web-mode/django/tags/get-media-prefix | 7 + web-mode/django/tags/get-static-prefix | 7 + web-mode/django/tags/if | 11 + web-mode/django/tags/ifchanged | 11 + web-mode/django/tags/ifequal | 9 + web-mode/django/tags/include | 7 + web-mode/django/tags/language-name-translated | 7 + web-mode/django/tags/linenumbers | 7 + web-mode/django/tags/load | 7 + web-mode/django/tags/lorem | 7 + web-mode/django/tags/now | 7 + web-mode/django/tags/regroup | 7 + web-mode/django/tags/resetcycle | 7 + web-mode/django/tags/spaceless | 9 + web-mode/django/tags/static | 7 + web-mode/django/tags/templatetag | 7 + web-mode/django/tags/url | 7 + web-mode/django/tags/verbatim | 9 + web-mode/django/tags/widthratio | 7 + web-mode/django/tags/with | 7 + web-mode/django/tz/tz-filter-localtime | 7 + web-mode/django/tz/tz-filter-timezone | 7 + web-mode/django/tz/tz-filter-utc | 7 + web-mode/django/tz/tz-get-current-timezone | 7 + web-mode/django/tz/tz-localtime | 9 + web-mode/django/tz/tz-timezone | 9 + 506 files changed, 4499 insertions(+) create mode 100644 python-mode/django/README.org create mode 100644 python-mode/django/backends/authentication create mode 100644 python-mode/django/backends/cache-database create mode 100644 python-mode/django/backends/cache-dummy create mode 100644 python-mode/django/backends/cache-file create mode 100644 python-mode/django/backends/cache-locmem create mode 100644 python-mode/django/backends/cache-memcached create mode 100644 python-mode/django/backends/cache-pylibmc create mode 100644 python-mode/django/backends/db-mysql create mode 100644 python-mode/django/backends/db-oracle create mode 100644 python-mode/django/backends/db-postgresql create mode 100644 python-mode/django/backends/db-sqlite3 create mode 100644 python-mode/django/backends/email create mode 100644 python-mode/django/backends/message-cookie create mode 100644 python-mode/django/backends/message-fallback create mode 100644 python-mode/django/backends/message-session create mode 100644 python-mode/django/backends/session-cache create mode 100644 python-mode/django/backends/session-cached-db create mode 100644 python-mode/django/backends/session-db create mode 100644 python-mode/django/backends/session-file create mode 100644 python-mode/django/backends/session-signed-cookies create mode 100644 python-mode/django/backends/signing create mode 100644 python-mode/django/backends/staticfiles create mode 100644 python-mode/django/backends/templates-django create mode 100644 python-mode/django/backends/templates-jinja2 create mode 100644 python-mode/django/common/modeladmin create mode 100644 python-mode/django/common/ugettextify create mode 100644 python-mode/django/imports/mark-safe create mode 100644 python-mode/django/imports/models create mode 100644 python-mode/django/imports/reverse-url create mode 100644 python-mode/django/imports/safe-string create mode 100644 python-mode/django/imports/settings create mode 100644 python-mode/django/imports/site-settings create mode 100644 python-mode/django/imports/staff-required create mode 100644 python-mode/django/imports/timezone create mode 100644 python-mode/django/imports/ugettext create mode 100644 python-mode/django/imports/url-path create mode 100644 python-mode/django/imports/url-repath create mode 100644 python-mode/django/management/command create mode 100644 python-mode/django/meta/abstract create mode 100644 python-mode/django/meta/app-label create mode 100644 python-mode/django/meta/base-manager-name create mode 100644 python-mode/django/meta/constraints create mode 100644 python-mode/django/meta/db-table create mode 100644 python-mode/django/meta/db-tablespace create mode 100644 python-mode/django/meta/default-manager-name create mode 100644 python-mode/django/meta/default-permissions create mode 100644 python-mode/django/meta/default-related-name create mode 100644 python-mode/django/meta/forms-error-messages create mode 100644 python-mode/django/meta/forms-exclude create mode 100644 python-mode/django/meta/forms-field-classes create mode 100644 python-mode/django/meta/forms-fields create mode 100644 python-mode/django/meta/forms-help-texts create mode 100644 python-mode/django/meta/forms-labels create mode 100644 python-mode/django/meta/forms-localized-fields create mode 100644 python-mode/django/meta/forms-model create mode 100644 python-mode/django/meta/forms-widgets create mode 100644 python-mode/django/meta/get-latest-by create mode 100644 python-mode/django/meta/index-together create mode 100644 python-mode/django/meta/indexes create mode 100644 python-mode/django/meta/label create mode 100644 python-mode/django/meta/label-lower create mode 100644 python-mode/django/meta/managed create mode 100644 python-mode/django/meta/order-with-respect-to create mode 100644 python-mode/django/meta/ordering create mode 100644 python-mode/django/meta/permissions create mode 100644 python-mode/django/meta/proxy create mode 100644 python-mode/django/meta/required-db-features create mode 100644 python-mode/django/meta/required-db-vendor create mode 100644 python-mode/django/meta/select-on-save create mode 100644 python-mode/django/meta/unique-together create mode 100644 python-mode/django/meta/verbose-name create mode 100644 python-mode/django/meta/verbose-name-plural create mode 100644 python-mode/django/middleware/authentication create mode 100644 python-mode/django/middleware/broken-link-email create mode 100644 python-mode/django/middleware/cache-fetch create mode 100644 python-mode/django/middleware/cache-update create mode 100644 python-mode/django/middleware/common create mode 100644 python-mode/django/middleware/conditional-get create mode 100644 python-mode/django/middleware/csrf-view create mode 100644 python-mode/django/middleware/current-site create mode 100644 python-mode/django/middleware/gzip create mode 100644 python-mode/django/middleware/locale create mode 100644 python-mode/django/middleware/message create mode 100644 python-mode/django/middleware/persistent-remote-user create mode 100644 python-mode/django/middleware/remote-user create mode 100644 python-mode/django/middleware/security create mode 100644 python-mode/django/middleware/session create mode 100644 python-mode/django/middleware/x-frame-options create mode 100644 python-mode/django/models/common create mode 100644 python-mode/django/models/generic create mode 100644 python-mode/django/settings/.yas-parents create mode 100644 python-mode/django/settings/absolute-url-overrides create mode 100644 python-mode/django/settings/absolute-url-overrides-dot create mode 100644 python-mode/django/settings/admins create mode 100644 python-mode/django/settings/admins-dot create mode 100644 python-mode/django/settings/allowed-hosts create mode 100644 python-mode/django/settings/allowed-hosts-dot create mode 100644 python-mode/django/settings/append-slash create mode 100644 python-mode/django/settings/append-slash-dot create mode 100644 python-mode/django/settings/auth-password-validators create mode 100644 python-mode/django/settings/auth-password-validators-dot create mode 100644 python-mode/django/settings/auth-user-model create mode 100644 python-mode/django/settings/auth-user-model-dot create mode 100644 python-mode/django/settings/authentication-backends create mode 100644 python-mode/django/settings/authentication-backends-dot create mode 100644 python-mode/django/settings/cache-middleware-alias create mode 100644 python-mode/django/settings/cache-middleware-alias-dot create mode 100644 python-mode/django/settings/cache-middleware-key-prefix create mode 100644 python-mode/django/settings/cache-middleware-key-prefix-dot create mode 100644 python-mode/django/settings/cache-middleware-seconds create mode 100644 python-mode/django/settings/cache-middleware-seconds-dot create mode 100644 python-mode/django/settings/caches create mode 100644 python-mode/django/settings/caches-dot create mode 100644 python-mode/django/settings/csrf-cookie-age create mode 100644 python-mode/django/settings/csrf-cookie-age-dot create mode 100644 python-mode/django/settings/csrf-cookie-domain create mode 100644 python-mode/django/settings/csrf-cookie-domain-dot create mode 100644 python-mode/django/settings/csrf-cookie-httponly create mode 100644 python-mode/django/settings/csrf-cookie-httponly-dot create mode 100644 python-mode/django/settings/csrf-cookie-name create mode 100644 python-mode/django/settings/csrf-cookie-name-dot create mode 100644 python-mode/django/settings/csrf-cookie-path create mode 100644 python-mode/django/settings/csrf-cookie-path-dot create mode 100644 python-mode/django/settings/csrf-cookie-samesite create mode 100644 python-mode/django/settings/csrf-cookie-samesite-dot create mode 100644 python-mode/django/settings/csrf-cookie-secure create mode 100644 python-mode/django/settings/csrf-cookie-secure-dot create mode 100644 python-mode/django/settings/csrf-failure-view create mode 100644 python-mode/django/settings/csrf-failure-view-dot create mode 100644 python-mode/django/settings/csrf-header-name create mode 100644 python-mode/django/settings/csrf-header-name-dot create mode 100644 python-mode/django/settings/csrf-trusted-origins create mode 100644 python-mode/django/settings/csrf-trusted-origins-dot create mode 100644 python-mode/django/settings/csrf-use-sessions create mode 100644 python-mode/django/settings/csrf-use-sessions-dot create mode 100644 python-mode/django/settings/data-upload-max-memory-size create mode 100644 python-mode/django/settings/data-upload-max-memory-size-dot create mode 100644 python-mode/django/settings/data-upload-max-number-fields create mode 100644 python-mode/django/settings/data-upload-max-number-fields-dot create mode 100644 python-mode/django/settings/database-routers create mode 100644 python-mode/django/settings/database-routers-dot create mode 100644 python-mode/django/settings/databases create mode 100644 python-mode/django/settings/databases-dot create mode 100644 python-mode/django/settings/date-format create mode 100644 python-mode/django/settings/date-format-dot create mode 100644 python-mode/django/settings/date-input-formats create mode 100644 python-mode/django/settings/date-input-formats-dot create mode 100644 python-mode/django/settings/datetime-format create mode 100644 python-mode/django/settings/datetime-format-dot create mode 100644 python-mode/django/settings/datetime-input-formats create mode 100644 python-mode/django/settings/datetime-input-formats-dot create mode 100644 python-mode/django/settings/debug create mode 100644 python-mode/django/settings/debug-dot create mode 100644 python-mode/django/settings/debug-propagate-exceptions create mode 100644 python-mode/django/settings/debug-propagate-exceptions-dot create mode 100644 python-mode/django/settings/decimal-separator create mode 100644 python-mode/django/settings/decimal-separator-dot create mode 100644 python-mode/django/settings/default-charset create mode 100644 python-mode/django/settings/default-charset-dot create mode 100644 python-mode/django/settings/default-exception-reporter create mode 100644 python-mode/django/settings/default-exception-reporter-dot create mode 100644 python-mode/django/settings/default-exception-reporter-filter create mode 100644 python-mode/django/settings/default-exception-reporter-filter-dot create mode 100644 python-mode/django/settings/default-file-storage create mode 100644 python-mode/django/settings/default-file-storage-dot create mode 100644 python-mode/django/settings/default-from-email create mode 100644 python-mode/django/settings/default-from-email-dot create mode 100644 python-mode/django/settings/default-index-tablespace create mode 100644 python-mode/django/settings/default-index-tablespace-dot create mode 100644 python-mode/django/settings/default-tablespace create mode 100644 python-mode/django/settings/default-tablespace-dot create mode 100644 python-mode/django/settings/disallow-user-agents create mode 100644 python-mode/django/settings/disallow-user-agents-dot create mode 100644 python-mode/django/settings/email-backend create mode 100644 python-mode/django/settings/email-backend-dot create mode 100644 python-mode/django/settings/email-host create mode 100644 python-mode/django/settings/email-host-dot create mode 100644 python-mode/django/settings/email-host-password create mode 100644 python-mode/django/settings/email-host-password-dot create mode 100644 python-mode/django/settings/email-host-user create mode 100644 python-mode/django/settings/email-host-user-dot create mode 100644 python-mode/django/settings/email-port create mode 100644 python-mode/django/settings/email-port-dot create mode 100644 python-mode/django/settings/email-ssl-certfile create mode 100644 python-mode/django/settings/email-ssl-certfile-dot create mode 100644 python-mode/django/settings/email-ssl-keyfile create mode 100644 python-mode/django/settings/email-ssl-keyfile-dot create mode 100644 python-mode/django/settings/email-subject-prefix create mode 100644 python-mode/django/settings/email-subject-prefix-dot create mode 100644 python-mode/django/settings/email-timeout create mode 100644 python-mode/django/settings/email-timeout-dot create mode 100644 python-mode/django/settings/email-use-localtime create mode 100644 python-mode/django/settings/email-use-localtime-dot create mode 100644 python-mode/django/settings/email-use-ssl create mode 100644 python-mode/django/settings/email-use-ssl-dot create mode 100644 python-mode/django/settings/email-use-tls create mode 100644 python-mode/django/settings/email-use-tls-dot create mode 100644 python-mode/django/settings/file-upload-directory-permissions create mode 100644 python-mode/django/settings/file-upload-directory-permissions-dot create mode 100644 python-mode/django/settings/file-upload-handlers create mode 100644 python-mode/django/settings/file-upload-handlers-dot create mode 100644 python-mode/django/settings/file-upload-max-memory-size create mode 100644 python-mode/django/settings/file-upload-max-memory-size-dot create mode 100644 python-mode/django/settings/file-upload-permissions create mode 100644 python-mode/django/settings/file-upload-permissions-dot create mode 100644 python-mode/django/settings/file-upload-temp-dir create mode 100644 python-mode/django/settings/file-upload-temp-dir-dot create mode 100644 python-mode/django/settings/first-day-of-week create mode 100644 python-mode/django/settings/first-day-of-week-dot create mode 100644 python-mode/django/settings/fixture-dirs create mode 100644 python-mode/django/settings/fixture-dirs-dot create mode 100644 python-mode/django/settings/force-script-name create mode 100644 python-mode/django/settings/force-script-name-dot create mode 100644 python-mode/django/settings/form-renderer create mode 100644 python-mode/django/settings/form-renderer-dot create mode 100644 python-mode/django/settings/format-module-path create mode 100644 python-mode/django/settings/format-module-path-dot create mode 100644 python-mode/django/settings/ignoreable-404-urls create mode 100644 python-mode/django/settings/ignoreable-404-urls-dot create mode 100644 python-mode/django/settings/installed-apps create mode 100644 python-mode/django/settings/installed-apps-dot create mode 100644 python-mode/django/settings/intermal-ips create mode 100644 python-mode/django/settings/intermal-ips-dot create mode 100644 python-mode/django/settings/language-code create mode 100644 python-mode/django/settings/language-code-dot create mode 100644 python-mode/django/settings/language-cookie-age create mode 100644 python-mode/django/settings/language-cookie-age-dot create mode 100644 python-mode/django/settings/language-cookie-domain create mode 100644 python-mode/django/settings/language-cookie-domain-dot create mode 100644 python-mode/django/settings/language-cookie-httponly create mode 100644 python-mode/django/settings/language-cookie-httponly-dot create mode 100644 python-mode/django/settings/language-cookie-name create mode 100644 python-mode/django/settings/language-cookie-name-dot create mode 100644 python-mode/django/settings/language-cookie-path create mode 100644 python-mode/django/settings/language-cookie-path-dot create mode 100644 python-mode/django/settings/language-cookie-samesite create mode 100644 python-mode/django/settings/language-cookie-samesite-dot create mode 100644 python-mode/django/settings/language-cookie-secure create mode 100644 python-mode/django/settings/language-cookie-secure-dot create mode 100644 python-mode/django/settings/languages create mode 100644 python-mode/django/settings/languages-bidi create mode 100644 python-mode/django/settings/languages-bidi-dot create mode 100644 python-mode/django/settings/languages-dot create mode 100644 python-mode/django/settings/locale-paths create mode 100644 python-mode/django/settings/locale-paths-dot create mode 100644 python-mode/django/settings/logging create mode 100644 python-mode/django/settings/logging-config create mode 100644 python-mode/django/settings/logging-config-dot create mode 100644 python-mode/django/settings/logging-dot create mode 100644 python-mode/django/settings/login-redirect-url create mode 100644 python-mode/django/settings/login-redirect-url-dot create mode 100644 python-mode/django/settings/login-url create mode 100644 python-mode/django/settings/login-url-dot create mode 100644 python-mode/django/settings/logout-redirect-url create mode 100644 python-mode/django/settings/logout-redirect-url-dot create mode 100644 python-mode/django/settings/managers create mode 100644 python-mode/django/settings/managers-dot create mode 100644 python-mode/django/settings/media-root create mode 100644 python-mode/django/settings/media-root-dot create mode 100644 python-mode/django/settings/media-url create mode 100644 python-mode/django/settings/media-url-dot create mode 100644 python-mode/django/settings/message-storage create mode 100644 python-mode/django/settings/message-storage-dot create mode 100644 python-mode/django/settings/middleware create mode 100644 python-mode/django/settings/middleware-dot create mode 100644 python-mode/django/settings/migration-modules create mode 100644 python-mode/django/settings/migration-modules-dot create mode 100644 python-mode/django/settings/month-day-format create mode 100644 python-mode/django/settings/month-day-format-dot create mode 100644 python-mode/django/settings/number-grouping create mode 100644 python-mode/django/settings/number-grouping-dot create mode 100644 python-mode/django/settings/password-hashers create mode 100644 python-mode/django/settings/password-hashers-dot create mode 100644 python-mode/django/settings/password-reset-timeout create mode 100644 python-mode/django/settings/password-reset-timeout-days create mode 100644 python-mode/django/settings/password-reset-timeout-days-dot create mode 100644 python-mode/django/settings/password-reset-timeout-dot create mode 100644 python-mode/django/settings/prepend-www create mode 100644 python-mode/django/settings/prepend-www-dot create mode 100644 python-mode/django/settings/secret-key create mode 100644 python-mode/django/settings/secret-key-dot create mode 100644 python-mode/django/settings/secure-browser-xss-filter create mode 100644 python-mode/django/settings/secure-browser-xss-filter-dot create mode 100644 python-mode/django/settings/secure-content-type-nosniff create mode 100644 python-mode/django/settings/secure-content-type-nosniff-dot create mode 100644 python-mode/django/settings/secure-hsts-include-subdomains create mode 100644 python-mode/django/settings/secure-hsts-include-subdomains-dot create mode 100644 python-mode/django/settings/secure-hsts-preload create mode 100644 python-mode/django/settings/secure-hsts-preload-dot create mode 100644 python-mode/django/settings/secure-hsts-seconds create mode 100644 python-mode/django/settings/secure-hsts-seconds-dot create mode 100644 python-mode/django/settings/secure-proxy-ssl-header create mode 100644 python-mode/django/settings/secure-proxy-ssl-header-dot create mode 100644 python-mode/django/settings/secure-redirect-exempt create mode 100644 python-mode/django/settings/secure-redirect-exempt-dot create mode 100644 python-mode/django/settings/secure-referrer-policy create mode 100644 python-mode/django/settings/secure-referrer-policy-dot create mode 100644 python-mode/django/settings/secure-ssl-host create mode 100644 python-mode/django/settings/secure-ssl-host-dot create mode 100644 python-mode/django/settings/secure-ssl-redirect create mode 100644 python-mode/django/settings/secure-ssl-redirect-dot create mode 100644 python-mode/django/settings/server-email create mode 100644 python-mode/django/settings/server-email-dot create mode 100644 python-mode/django/settings/session-cache-alias create mode 100644 python-mode/django/settings/session-cache-alias-dot create mode 100644 python-mode/django/settings/session-cookie-age create mode 100644 python-mode/django/settings/session-cookie-age-dot create mode 100644 python-mode/django/settings/session-cookie-domain create mode 100644 python-mode/django/settings/session-cookie-domain-dot create mode 100644 python-mode/django/settings/session-cookie-httponly create mode 100644 python-mode/django/settings/session-cookie-httponly-dot create mode 100644 python-mode/django/settings/session-cookie-name create mode 100644 python-mode/django/settings/session-cookie-name-dot create mode 100644 python-mode/django/settings/session-cookie-path create mode 100644 python-mode/django/settings/session-cookie-path-dot create mode 100644 python-mode/django/settings/session-cookie-samesite create mode 100644 python-mode/django/settings/session-cookie-samesite-dot create mode 100644 python-mode/django/settings/session-cookie-secure create mode 100644 python-mode/django/settings/session-cookie-secure-dot create mode 100644 python-mode/django/settings/session-engine create mode 100644 python-mode/django/settings/session-engine-dot create mode 100644 python-mode/django/settings/session-expire-at-browser-close create mode 100644 python-mode/django/settings/session-expire-at-browser-close-dot create mode 100644 python-mode/django/settings/session-file-path create mode 100644 python-mode/django/settings/session-file-path-dot create mode 100644 python-mode/django/settings/session-save-every-request create mode 100644 python-mode/django/settings/session-save-every-request-dot create mode 100644 python-mode/django/settings/session-serializer create mode 100644 python-mode/django/settings/session-serializer-dot create mode 100644 python-mode/django/settings/short-date-format create mode 100644 python-mode/django/settings/short-date-format-dot create mode 100644 python-mode/django/settings/short-datetime-format create mode 100644 python-mode/django/settings/short-datetime-format-dot create mode 100644 python-mode/django/settings/signing-backend create mode 100644 python-mode/django/settings/signing-backend-dot create mode 100644 python-mode/django/settings/silenced-system-checks create mode 100644 python-mode/django/settings/silenced-system-checks-dot create mode 100644 python-mode/django/settings/static-root create mode 100644 python-mode/django/settings/static-root-dot create mode 100644 python-mode/django/settings/static-url create mode 100644 python-mode/django/settings/static-url-dot create mode 100644 python-mode/django/settings/staticfiles-dirs create mode 100644 python-mode/django/settings/staticfiles-dirs-dot create mode 100644 python-mode/django/settings/staticfiles-finders create mode 100644 python-mode/django/settings/staticfiles-finders-dot create mode 100644 python-mode/django/settings/staticfiles-storage create mode 100644 python-mode/django/settings/staticfiles-storage-dot create mode 100644 python-mode/django/settings/templates create mode 100644 python-mode/django/settings/templates-dot create mode 100644 python-mode/django/settings/test-non-serialized-apps create mode 100644 python-mode/django/settings/test-non-serialized-apps-dot create mode 100644 python-mode/django/settings/test-runner create mode 100644 python-mode/django/settings/test-runner-dot create mode 100644 python-mode/django/settings/thousand-separator create mode 100644 python-mode/django/settings/thousand-separator-dot create mode 100644 python-mode/django/settings/time-format create mode 100644 python-mode/django/settings/time-format-dot create mode 100644 python-mode/django/settings/time-input-formats create mode 100644 python-mode/django/settings/time-input-formats-dot create mode 100644 python-mode/django/settings/time-zone create mode 100644 python-mode/django/settings/time-zone-dot create mode 100644 python-mode/django/settings/use-i18n create mode 100644 python-mode/django/settings/use-i18n-dot create mode 100644 python-mode/django/settings/use-l10n create mode 100644 python-mode/django/settings/use-l10n-dot create mode 100644 python-mode/django/settings/use-thousand-separator create mode 100644 python-mode/django/settings/use-thousand-separator-dot create mode 100644 python-mode/django/settings/use-tz create mode 100644 python-mode/django/settings/use-tz-dot create mode 100644 python-mode/django/settings/use-x-forwarded-host create mode 100644 python-mode/django/settings/use-x-forwarded-host-dot create mode 100644 python-mode/django/settings/use-x-forwarded-port create mode 100644 python-mode/django/settings/use-x-forwarded-port-dot create mode 100644 python-mode/django/settings/wsgi-application create mode 100644 python-mode/django/settings/wsgi-application-dot create mode 100644 python-mode/django/settings/x-frame-options create mode 100644 python-mode/django/settings/x-frame-options-dot create mode 100644 python-mode/django/settings/year-month-format create mode 100644 python-mode/django/settings/year-month-format-dot create mode 100644 python-mode/django/snippet-templates create mode 100644 python-mode/django/templatetags/filter create mode 100644 python-mode/django/templatetags/filter-with-arg create mode 100644 python-mode/django/templatetags/simpletag create mode 100644 python-mode/django/views/basic-cbv create mode 100644 python-mode/django/views/basic-func-get-view create mode 100644 python-mode/django/views/basic-view create mode 100644 python-mode/django/views/detail-view-cbv create mode 100644 python-mode/django/views/list-view-cbv create mode 100644 python-mode/django/views/redirect-cbv create mode 100644 python-mode/django/views/template-cbv create mode 100644 web-mode/django/README.org create mode 100644 web-mode/django/filters/filter-add create mode 100644 web-mode/django/filters/filter-addslashes create mode 100644 web-mode/django/filters/filter-capfirst create mode 100644 web-mode/django/filters/filter-center create mode 100644 web-mode/django/filters/filter-cut create mode 100644 web-mode/django/filters/filter-date create mode 100644 web-mode/django/filters/filter-default create mode 100644 web-mode/django/filters/filter-default-if-none create mode 100644 web-mode/django/filters/filter-dictsort create mode 100644 web-mode/django/filters/filter-dictsortreversed create mode 100644 web-mode/django/filters/filter-divisbleby create mode 100644 web-mode/django/filters/filter-escape create mode 100644 web-mode/django/filters/filter-escapejs create mode 100644 web-mode/django/filters/filter-filesizeformat create mode 100644 web-mode/django/filters/filter-first create mode 100644 web-mode/django/filters/filter-floatformat create mode 100644 web-mode/django/filters/filter-force-escape create mode 100644 web-mode/django/filters/filter-get-digit create mode 100644 web-mode/django/filters/filter-iriencode create mode 100644 web-mode/django/filters/filter-join create mode 100644 web-mode/django/filters/filter-json-script create mode 100644 web-mode/django/filters/filter-last create mode 100644 web-mode/django/filters/filter-length create mode 100644 web-mode/django/filters/filter-length-is create mode 100644 web-mode/django/filters/filter-linebreaks create mode 100644 web-mode/django/filters/filter-linebreaksbr create mode 100644 web-mode/django/filters/filter-ljust create mode 100644 web-mode/django/filters/filter-lower create mode 100644 web-mode/django/filters/filter-make-list create mode 100644 web-mode/django/filters/filter-phone2numeric create mode 100644 web-mode/django/filters/filter-pluralize create mode 100644 web-mode/django/filters/filter-pprint create mode 100644 web-mode/django/filters/filter-random create mode 100644 web-mode/django/filters/filter-rjust create mode 100644 web-mode/django/filters/filter-safe create mode 100644 web-mode/django/filters/filter-safeseq create mode 100644 web-mode/django/filters/filter-slice create mode 100644 web-mode/django/filters/filter-slugify create mode 100644 web-mode/django/filters/filter-stringformat create mode 100644 web-mode/django/filters/filter-striptags create mode 100644 web-mode/django/filters/filter-time create mode 100644 web-mode/django/filters/filter-timesince create mode 100644 web-mode/django/filters/filter-timeuntil create mode 100644 web-mode/django/filters/filter-title create mode 100644 web-mode/django/filters/filter-truncatechars create mode 100644 web-mode/django/filters/filter-truncatechars-html create mode 100644 web-mode/django/filters/filter-truncatewords create mode 100644 web-mode/django/filters/filter-truncatewords-html create mode 100644 web-mode/django/filters/filter-unordered-list create mode 100644 web-mode/django/filters/filter-upper create mode 100644 web-mode/django/filters/filter-urlencode create mode 100644 web-mode/django/filters/filter-urlize create mode 100644 web-mode/django/filters/filter-urlizetrunc create mode 100644 web-mode/django/filters/filter-wordcount create mode 100644 web-mode/django/filters/filter-wordwrap create mode 100644 web-mode/django/filters/filter-yesno create mode 100644 web-mode/django/humanize/filter-humanize-apnumber create mode 100644 web-mode/django/humanize/filter-humanize-intcomma create mode 100644 web-mode/django/humanize/filter-humanize-intword create mode 100644 web-mode/django/humanize/filter-humanize-naturalday create mode 100644 web-mode/django/humanize/filter-humanize-naturaltime create mode 100644 web-mode/django/humanize/filter-humanize-ordinal create mode 100644 web-mode/django/i18n/i18n-blocktrans create mode 100644 web-mode/django/i18n/i18n-filter-language-bidi create mode 100644 web-mode/django/i18n/i18n-filter-language-name create mode 100644 web-mode/django/i18n/i18n-filter-language-name-local create mode 100644 web-mode/django/i18n/i18n-get-available-languages create mode 100644 web-mode/django/i18n/i18n-get-current-language create mode 100644 web-mode/django/i18n/i18n-get-current-language-bidi create mode 100644 web-mode/django/i18n/i18n-get-language-info create mode 100644 web-mode/django/i18n/i18n-get-language-info-list create mode 100644 web-mode/django/i18n/i18n-trans create mode 100644 web-mode/django/l10n/l10n-localize create mode 100644 web-mode/django/l10n/l10n-unlocalize create mode 100644 web-mode/django/snippet-templates create mode 100644 web-mode/django/tags/autoescape create mode 100644 web-mode/django/tags/block create mode 100644 web-mode/django/tags/comment create mode 100644 web-mode/django/tags/csrf-token create mode 100644 web-mode/django/tags/cycle create mode 100644 web-mode/django/tags/extends create mode 100644 web-mode/django/tags/filter create mode 100644 web-mode/django/tags/first create mode 100644 web-mode/django/tags/firstof create mode 100644 web-mode/django/tags/for create mode 100644 web-mode/django/tags/for-empty create mode 100644 web-mode/django/tags/for-reversed create mode 100644 web-mode/django/tags/for-with-doc create mode 100644 web-mode/django/tags/get-media-prefix create mode 100644 web-mode/django/tags/get-static-prefix create mode 100644 web-mode/django/tags/if create mode 100644 web-mode/django/tags/ifchanged create mode 100644 web-mode/django/tags/ifequal create mode 100644 web-mode/django/tags/include create mode 100644 web-mode/django/tags/language-name-translated create mode 100644 web-mode/django/tags/linenumbers create mode 100644 web-mode/django/tags/load create mode 100644 web-mode/django/tags/lorem create mode 100644 web-mode/django/tags/now create mode 100644 web-mode/django/tags/regroup create mode 100644 web-mode/django/tags/resetcycle create mode 100644 web-mode/django/tags/spaceless create mode 100644 web-mode/django/tags/static create mode 100644 web-mode/django/tags/templatetag create mode 100644 web-mode/django/tags/url create mode 100644 web-mode/django/tags/verbatim create mode 100644 web-mode/django/tags/widthratio create mode 100644 web-mode/django/tags/with create mode 100644 web-mode/django/tz/tz-filter-localtime create mode 100644 web-mode/django/tz/tz-filter-timezone create mode 100644 web-mode/django/tz/tz-filter-utc create mode 100644 web-mode/django/tz/tz-get-current-timezone create mode 100644 web-mode/django/tz/tz-localtime create mode 100644 web-mode/django/tz/tz-timezone diff --git a/python-mode/django/README.org b/python-mode/django/README.org new file mode 100644 index 00000000..815c3591 --- /dev/null +++ b/python-mode/django/README.org @@ -0,0 +1,234 @@ +#+TITLE: Django (python-mode) Snippets +#+DATE: March 29, 2020 +#+SINCE: {replace with next tagged release version} +#+STARTUP: inlineimages nofold + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#maintainers][Maintainers]] +- [[#snippets][Snippets]] + - [[#imports-trigger-dji][Imports (:trigger dji)]] + - [[#views-trigger-djv][Views (:trigger djv)]] + - [[#settings-trigger-djs-or-settings][Settings (:trigger djs or settings.)]] + - [[#meta-trigger-djmeta][Meta (:trigger djmeta)]] + - [[#middleware-trigger-djmid][Middleware (:trigger djmid)]] + - [[#backends-trigger-djb][Backends (:trigger djb)]] + - [[#model-form-meta-trigger-djmeta][Model Form Meta (:trigger djmeta)]] + - [[#models-trigger-djmod][Models (:trigger djmod)]] + - [[#common][Common]] +- [[#faq][FAQ]] + - [[#q-holy-settings-snippets-batman][Q: Holy settings snippets batman!?!]] +- [[#contributing][Contributing]] +- [[#--todo-89][[ ] TODO]] + - [[#x-model-admin-attributes][[X] Model Admin Attributes]] + - [[#x-model-admin-methods][[X] Model Admin Methods]] + - [[#x-forms-meta-attributes][[X] Forms Meta attributes]] + - [[#x-middleware-strings-for-middleware-setting-usage][[X] Middleware strings (for MIDDLEWARE setting usage)]] + - [[#x-backends--engines][[X] Backend's / Engines]] + - [[#--more-class-based-views][[ ] More class based views]] + - [[#x-common-models][[X] Common Models]] + - [[#x-generic-model][[X] Generic Model]] + - [[#x-basic-management-command][[X] Basic Management Command]] + +* Description +A bunch of Django specific python-mode snippets, including ~settings~, ~imports~ +and ~views~. Here are some of them: + ++ Complete global Django settings as dot references, i.e. ~settings.~ and + settings usage, i.e. ~djs~. The latter will insert to setting as it + would be in a settings module. ++ Meta class attributes ++ Common imports ++ Common function and class-based views ++ etc + +These snippets are meant to act as more of a auto-completion / quick look-up instead of auto +expanding, therefore snippets are grouped as much as possible. + +** Maintainers ++ @jsoa (Author) + +* Snippets +** Imports (:trigger dji) +Common imports + ++ ~:group django-imports~ ++ ~:trigger dji~ + + ~mark-safe~ + + ~models~ + + ~reverse-url~ + + ~safe-string~ + + ~settings~ + + ~site-settings~ + + ~timezone~ + + ~ugettext~ + + ~url-path~ + + ~url-repath~ + +** Views (:trigger djv) +Common views + ++ ~:group django-views~ ++ ~:trigger djv~ + + ~basic-func-get-view~ - Basic function based GET view + + ~basic-view~ - Basic function based view + + ~redirect-cbv~ - Redirect class based view + + ~template-cbv~ - Template class based view + + ~basic-cbv~ - Basic class based view + + ~detail-view-cbv~ - DetailView (class based view) + + ~list-view-cbv~ - ListView (class based view) + +** Settings (:trigger djs or settings.) +Global settings + +These are the Django global settings, which can be expanded via dot reference or +expanded as if putting into a settings module. There are too many to list out +here so pressing ~djs~ or ~settings.~ will give you the full list. + +Note: the names of these snippets include a brief explanation. The ~setting~ +usage, i.e. when using it in a settings module, comments will be included where +possible. + ++ ~:group django-settings~ ++ ~:trigger djs~ + + [[file:settings/][list of snippets]] + ++ ~:group django-settings-dot~ ++ ~:trigger settings.~ + + [[file:settings/][list of snippets]] + +** Meta (:trigger djmeta) +Django model ~Meta~ attributes + ++ ~:group django-meta~ ++ ~:trigger djmeta~ + + ~abstract~ + + ~app-label~ + + ~base-manager-name~ + + ~constraints~ + + ~db-table~ + + ~db-tablespace~ + + ~default-manager-name~ + + ~default-permissions~ + + ~default-related-name~ + + ~get-latest-by~ + + ~indexes~ + + ~index-together~ + + ~label~ + + ~label-lower~ + + ~managed~ + + ~ordering~ + + ~order-with-repect-to~ + + ~premissions~ + + ~proxy~ + + ~required-db-features~ + + ~required-db-vendor~ + + ~select-on-save~ + + ~unique-together~ + + ~verbose-name~ + + ~verbose-name-plural~ + +** Middleware (:trigger djmid) +All the built-in middleware in the form of the value used in the ~MIDDLEWARE~ setting + ++ ~:group django-middleware~ ++ ~:trigger djmid~ + + ~authentication~ + + ~broken-link-email~ + + ~cache-fetch~ + + ~cache-update~ + + ~common~ + + ~conditional-get~ + + ~csrf-view~ + + ~current-site~ + + ~gzip~ + + ~locale~ + + ~message~ + + ~persistent-remove-user~ + + ~remote-user~ + + ~security~ + + ~session~ + + ~x-frame-options~ + +** Backends (:trigger djb) +These snippets are possible options for other settings, such as ~ENGINE~ for +~DATABASES~ setting or ~BACKEND~ for ~CACHES~ setting. + ++ ~:group django-backends~ ++ ~:trigger djb~ + + ~authentication~ + + ~cache-database~ + + ~cache-file~ + + ~cache-locmem~ + + ~cache-memcached~ + + ~cache-pylibmc~ + + ~db-mysql~ + + ~db-oracle~ + + ~db-postgresql~ + + ~db-sqlite3~ + + ~email~ + + ~message-cookie~ + + ~message-fallback~ + + ~message-session~ + + ~session-cache~ + + ~session-cached-db~ + + ~session-db~ + + ~session-file~ + + ~session-signed-cookie~ + + ~signing~ + + ~staticfiles~ + + ~templates-django~ + + ~templates_jinja2~ + +** Model Form Meta (:trigger djmeta) +Django model form meta attributes, these reside in the same group as +~django-meta~ and contain a name prefix of ~form~ + ++ ~:group django-meta~ ++ ~:trigger djmeta~ + + ~forms-error-messages~ + + ~forms-exclude~ + + ~forms-field-classes~ + + ~forms-fields~ + + ~forms-help-texts~ + + ~forms-labels~ + + ~forms-localized-fields~ + + ~forms-model~ + + ~forms-widgets~ + +** Models (:trigger djmod) +Common django models + ++ ~:group django-models~ ++ ~:trigger djmod~ + + ~common~ + + ~generic~ + +** Common +Other common snippets + ++ ~:group django-common~ + + ~ugettextify~ - Wraps selection in the common ugettext + function, i.e. ~'test'~ becomes ~_('test')_~. You will need + to insert snippet after selecting text (i.e. via doom ~~SPC s i~) + +* FAQ +** Q: Holy settings snippets batman!?! +yea there is a lot, and since ~django~ collects and caches all these +settings in a class at run-time, they are not usually available for +auto-completing + +* Contributing +There is an included ~snippet-templates~ file the includes the templates used to +create the various groups of snippets + +* [ ] TODO [8/9] +** [X] Model Admin Attributes +** [X] Model Admin Methods +** [X] Forms Meta attributes +** [X] Middleware strings (for MIDDLEWARE setting usage) +** [X] Backend's / Engines +** [ ] More class based views +** [X] Common Models +** [X] Generic Model +** [X] Basic Management Command diff --git a/python-mode/django/backends/authentication b/python-mode/django/backends/authentication new file mode 100644 index 00000000..db8aa06d --- /dev/null +++ b/python-mode/django/backends/authentication @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: auth.backends.ModelBackend +# key: djb +# uuid: django-backends-authentication +# group: django-backends +# -- +django.contrib.auth.backends.ModelBackend \ No newline at end of file diff --git a/python-mode/django/backends/cache-database b/python-mode/django/backends/cache-database new file mode 100644 index 00000000..3f91e320 --- /dev/null +++ b/python-mode/django/backends/cache-database @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: cache.backends.DatabaseCache +# key: djb +# uuid: django-backends-cache-database +# group: django-backends +# -- +django.core.cache.backends.db.DatabaseCache \ No newline at end of file diff --git a/python-mode/django/backends/cache-dummy b/python-mode/django/backends/cache-dummy new file mode 100644 index 00000000..ccc29b56 --- /dev/null +++ b/python-mode/django/backends/cache-dummy @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: cache.backends.DummyCache +# key: djb +# uuid: django-backends-cache-dummy +# group: django-backends +# -- +django.core.cache.backends.dummy.DummyCache \ No newline at end of file diff --git a/python-mode/django/backends/cache-file b/python-mode/django/backends/cache-file new file mode 100644 index 00000000..f766ddeb --- /dev/null +++ b/python-mode/django/backends/cache-file @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: cache.backends.FileBasedCache +# key: djb +# uuid: django-backends-cache-file +# group: django-backends +# -- +django.core.cache.backends.filebased.FileBasedCache \ No newline at end of file diff --git a/python-mode/django/backends/cache-locmem b/python-mode/django/backends/cache-locmem new file mode 100644 index 00000000..1c70b73a --- /dev/null +++ b/python-mode/django/backends/cache-locmem @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: cache.backends.LocMemCache +# key: djb +# uuid: django-backends-cache-locmem +# group: django-backends +# -- +django.core.cache.backends.locmem.LocMemCache \ No newline at end of file diff --git a/python-mode/django/backends/cache-memcached b/python-mode/django/backends/cache-memcached new file mode 100644 index 00000000..76b30a40 --- /dev/null +++ b/python-mode/django/backends/cache-memcached @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: cache.backends.MemcachedCache +# key: djb +# uuid: django-backends-cache-memcached +# group: django-backends +# -- +django.core.cache.backends.memcached.MemcachedCache \ No newline at end of file diff --git a/python-mode/django/backends/cache-pylibmc b/python-mode/django/backends/cache-pylibmc new file mode 100644 index 00000000..c4be2eea --- /dev/null +++ b/python-mode/django/backends/cache-pylibmc @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: cache.backends.PyLibMCCache +# key: djb +# uuid: django-backends-cache-pylibmc +# group: django-backends +# -- +django.core.cache.backends.memcached.PyLibMCCache \ No newline at end of file diff --git a/python-mode/django/backends/db-mysql b/python-mode/django/backends/db-mysql new file mode 100644 index 00000000..f62db351 --- /dev/null +++ b/python-mode/django/backends/db-mysql @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: db.backends.mysql +# key: djb +# uuid: django-backends-db-mysql +# group: django-backends +# -- +django.db.backends.mysql \ No newline at end of file diff --git a/python-mode/django/backends/db-oracle b/python-mode/django/backends/db-oracle new file mode 100644 index 00000000..82991915 --- /dev/null +++ b/python-mode/django/backends/db-oracle @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: db.backends.oracle +# key: djb +# uuid: django-backends-db-oracle +# group: django-backends +# -- +django.db.backends.oracle \ No newline at end of file diff --git a/python-mode/django/backends/db-postgresql b/python-mode/django/backends/db-postgresql new file mode 100644 index 00000000..36d68c25 --- /dev/null +++ b/python-mode/django/backends/db-postgresql @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: db.backends.postgresql +# key: djb +# uuid: django-backends-db-postgresql +# group: django-backends +# -- +django.db.backends.postgresql \ No newline at end of file diff --git a/python-mode/django/backends/db-sqlite3 b/python-mode/django/backends/db-sqlite3 new file mode 100644 index 00000000..e845741e --- /dev/null +++ b/python-mode/django/backends/db-sqlite3 @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: db.backends.sqlite3 +# key: djb +# uuid: django-backends-db-sqlite3 +# group: django-backends +# -- +django.db.backends.sqlite3 \ No newline at end of file diff --git a/python-mode/django/backends/email b/python-mode/django/backends/email new file mode 100644 index 00000000..eaa036bf --- /dev/null +++ b/python-mode/django/backends/email @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: core.mail.backends.smtp.EmailBackend +# key: djb +# uuid: django-backends-email +# group: django-backends +# -- +django.core.mail.backends.smtp.EmailBackend \ No newline at end of file diff --git a/python-mode/django/backends/message-cookie b/python-mode/django/backends/message-cookie new file mode 100644 index 00000000..01108535 --- /dev/null +++ b/python-mode/django/backends/message-cookie @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: messages.storage.CookieStorage +# key: djb +# uuid: django-backends-message-cookie +# group: django-backends +# -- +django.contrib.messages.storage.cookie.CookieStorage \ No newline at end of file diff --git a/python-mode/django/backends/message-fallback b/python-mode/django/backends/message-fallback new file mode 100644 index 00000000..1f47da87 --- /dev/null +++ b/python-mode/django/backends/message-fallback @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: messages.storage.FallbackStorage +# key: djb +# uuid: django-backends-message-fallback +# group: django-backends +# -- +django.contrib.messages.storage.fallback.FallbackStorage \ No newline at end of file diff --git a/python-mode/django/backends/message-session b/python-mode/django/backends/message-session new file mode 100644 index 00000000..302cee41 --- /dev/null +++ b/python-mode/django/backends/message-session @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: messages.storage.SessionStorage +# key: djb +# uuid: django-backends-message-session +# group: django-backends +# -- +django.contrib.messages.storage.session.SessionStorage \ No newline at end of file diff --git a/python-mode/django/backends/session-cache b/python-mode/django/backends/session-cache new file mode 100644 index 00000000..85ac3493 --- /dev/null +++ b/python-mode/django/backends/session-cache @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: contrib.sessions.backends.cache +# key: djb +# uuid: django-backends-session-cache +# group: django-backends +# -- +django.contrib.sessions.backends.cache \ No newline at end of file diff --git a/python-mode/django/backends/session-cached-db b/python-mode/django/backends/session-cached-db new file mode 100644 index 00000000..6c1e0be1 --- /dev/null +++ b/python-mode/django/backends/session-cached-db @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: contrib.sessions.backends.cache_db +# key: djb +# uuid: django-backends-session-cache-db +# group: django-backends +# -- +django.contrib.sessions.backends.cache_db \ No newline at end of file diff --git a/python-mode/django/backends/session-db b/python-mode/django/backends/session-db new file mode 100644 index 00000000..408fe1bd --- /dev/null +++ b/python-mode/django/backends/session-db @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: contrib.sessions.backends.db +# key: djb +# uuid: django-backends-session-db +# group: django-backends +# -- +django.contrib.sessions.backends.db \ No newline at end of file diff --git a/python-mode/django/backends/session-file b/python-mode/django/backends/session-file new file mode 100644 index 00000000..eefdd7a8 --- /dev/null +++ b/python-mode/django/backends/session-file @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: contrib.sessions.backends.file +# key: djb +# uuid: django-backends-session-file +# group: django-backends +# -- +django.contrib.sessions.backends.file \ No newline at end of file diff --git a/python-mode/django/backends/session-signed-cookies b/python-mode/django/backends/session-signed-cookies new file mode 100644 index 00000000..c4696143 --- /dev/null +++ b/python-mode/django/backends/session-signed-cookies @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: contrib.sessions.backends.signed_cookies +# key: djb +# uuid: django-backends-session-signed_cookies +# group: django-backends +# -- +django.contrib.sessions.backends.signed_cookies \ No newline at end of file diff --git a/python-mode/django/backends/signing b/python-mode/django/backends/signing new file mode 100644 index 00000000..3011054b --- /dev/null +++ b/python-mode/django/backends/signing @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: core.signing.TimestampSigner +# key: djb +# uuid: django-backends-signing +# group: django-backends +# -- +django.core.signing.TimestampSigner \ No newline at end of file diff --git a/python-mode/django/backends/staticfiles b/python-mode/django/backends/staticfiles new file mode 100644 index 00000000..ff045ac0 --- /dev/null +++ b/python-mode/django/backends/staticfiles @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: contrib.staticfiles.StaticFilesStorage +# key: djb +# uuid: django-backends-staticfiles +# group: django-backends +# -- +django.contrib.staticfiles.storage.StaticFilesStorage \ No newline at end of file diff --git a/python-mode/django/backends/templates-django b/python-mode/django/backends/templates-django new file mode 100644 index 00000000..be8f0ffc --- /dev/null +++ b/python-mode/django/backends/templates-django @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: template.backends.django.DjangoTemplates +# key: djb +# uuid: django-backends-templates-django +# group: django-backends +# -- +django.template.backends.django.DjangoTemplates \ No newline at end of file diff --git a/python-mode/django/backends/templates-jinja2 b/python-mode/django/backends/templates-jinja2 new file mode 100644 index 00000000..a0d1df4a --- /dev/null +++ b/python-mode/django/backends/templates-jinja2 @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: template.backends.jinja2.Jinja2 +# key: djb +# uuid: django-backends-templates-jinja2 +# group: django-backends +# -- +django.template.backends.jinja2.Jinja2 \ No newline at end of file diff --git a/python-mode/django/common/modeladmin b/python-mode/django/common/modeladmin new file mode 100644 index 00000000..89e9a16c --- /dev/null +++ b/python-mode/django/common/modeladmin @@ -0,0 +1,20 @@ +# -*- mode: snippet -*- +# name: model admin +# key: modeladmin +# uuid: django-modeladmin +# -- +@admin.register($1) +class ${1:MODEL NAME}Admin(admin.ModelAdmin): + list_display = ('${2:FIELD}'${3:, '${4:FIELD}'${5:, '${6:FIELD}'}}}') + list_filter = ('${7:FIELD}', ) + search_fields = ('${8:FIELD}', ) + + # + # Other common attributes + # + # inlines = [] + # fieldsets = [] + # raw_id_fields = () + # readonly_fields = () + # date_hierarchy = '' + $0 diff --git a/python-mode/django/common/ugettextify b/python-mode/django/common/ugettextify new file mode 100644 index 00000000..1a20fd03 --- /dev/null +++ b/python-mode/django/common/ugettextify @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: ugettextify selected text +# uuid: django-common-ugettextify +# group: django.common +# -- +_(`(yas-selected-text)`) diff --git a/python-mode/django/imports/mark-safe b/python-mode/django/imports/mark-safe new file mode 100644 index 00000000..f161df90 --- /dev/null +++ b/python-mode/django/imports/mark-safe @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: mark_safe +# key: dji +# uuid: django-imports-mark-safe +# group: django-imports +# -- +from django.utils.safestring import mark_safe diff --git a/python-mode/django/imports/models b/python-mode/django/imports/models new file mode 100644 index 00000000..25dc7c9e --- /dev/null +++ b/python-mode/django/imports/models @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: models +# key: dji +# uuid: django-imports-models +# group: django-imports +# -- +from django.db import models \ No newline at end of file diff --git a/python-mode/django/imports/reverse-url b/python-mode/django/imports/reverse-url new file mode 100644 index 00000000..0b7e76d3 --- /dev/null +++ b/python-mode/django/imports/reverse-url @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: reverse +# key: dji +# uuid: django-imports-reverse-url +# group: django-imports +# -- +from django.urls import reverse \ No newline at end of file diff --git a/python-mode/django/imports/safe-string b/python-mode/django/imports/safe-string new file mode 100644 index 00000000..f161df90 --- /dev/null +++ b/python-mode/django/imports/safe-string @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: mark_safe +# key: dji +# uuid: django-imports-mark-safe +# group: django-imports +# -- +from django.utils.safestring import mark_safe diff --git a/python-mode/django/imports/settings b/python-mode/django/imports/settings new file mode 100644 index 00000000..1941f055 --- /dev/null +++ b/python-mode/django/imports/settings @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: settings +# key: dji +# uuid: django-imports-settings +# group: django-imports +# -- +from django.conf import settings diff --git a/python-mode/django/imports/site-settings b/python-mode/django/imports/site-settings new file mode 100644 index 00000000..669d0a67 --- /dev/null +++ b/python-mode/django/imports/site-settings @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: site-settings (same as settings but import "as site_settings") +# key: dji +# uuid: django-imports-site-settings +# group: django-imports +# -- +from django.conf import settings as site_settings diff --git a/python-mode/django/imports/staff-required b/python-mode/django/imports/staff-required new file mode 100644 index 00000000..ca368bb2 --- /dev/null +++ b/python-mode/django/imports/staff-required @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: staff_member_required +# key: dji +# uuid: django-imports-staff-required +# group: django-imports +# -- +from django.contrib.admin.views.decorators import staff_member_required \ No newline at end of file diff --git a/python-mode/django/imports/timezone b/python-mode/django/imports/timezone new file mode 100644 index 00000000..ae8e54f9 --- /dev/null +++ b/python-mode/django/imports/timezone @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: timezone +# key: dji +# uuid: django-imports-timezone +# group: django-imports +# -- +from django.utils import timezone \ No newline at end of file diff --git a/python-mode/django/imports/ugettext b/python-mode/django/imports/ugettext new file mode 100644 index 00000000..b6740540 --- /dev/null +++ b/python-mode/django/imports/ugettext @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: ugettext +# key: dji +# uuid: django-imports-ugettext +# group: django-imports +# -- +from django.utils.translation import ugettext as _ \ No newline at end of file diff --git a/python-mode/django/imports/url-path b/python-mode/django/imports/url-path new file mode 100644 index 00000000..de1b634d --- /dev/null +++ b/python-mode/django/imports/url-path @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: url-path +# key: dji +# uuid: django-imports-url-path +# group: django-imports +# -- +from django.urls import path diff --git a/python-mode/django/imports/url-repath b/python-mode/django/imports/url-repath new file mode 100644 index 00000000..6ed4f9f9 --- /dev/null +++ b/python-mode/django/imports/url-repath @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: url-repath +# key: dji +# uuid: django-imports-url-repath +# group: django-imports +# -- +from django.urls import re_path diff --git a/python-mode/django/management/command b/python-mode/django/management/command new file mode 100644 index 00000000..86ed83b1 --- /dev/null +++ b/python-mode/django/management/command @@ -0,0 +1,27 @@ +# -*- mode: snippet -*- +# name: Basic Management Command +# key: djmc +# uuid: django-managment- +# group: django-management +# -- +from django.core.management.base import BaseCommand, CommandError + + +class Command(BaseCommand): + help = '' + + def add_arguments(self, parser): + # Required arguments + parser.add_argument('', nargs='+', type=int) + + # Optional arguments + parse.add_argument('--delete', action='store_true') + + def handle(self, *args, **options): + key = options.get('', None) + delete = options.get('delete', None) + + if key == 'some bad value': + raise CommandError('Error') + + self.stdout.write(self.style.SUCCESS('Good')) \ No newline at end of file diff --git a/python-mode/django/meta/abstract b/python-mode/django/meta/abstract new file mode 100644 index 00000000..97f86a6e --- /dev/null +++ b/python-mode/django/meta/abstract @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: abstract - If abstract = True, this model will be an abstract base class. +# key: djmeta +# uuid: django-meta-abstract +# group: django-meta +# -- +abstract = True diff --git a/python-mode/django/meta/app-label b/python-mode/django/meta/app-label new file mode 100644 index 00000000..5619d6a6 --- /dev/null +++ b/python-mode/django/meta/app-label @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: app_label - If a model is defined outside of an application in INSTALLED_APPS, it must declare which app it belongs to +# key: djmeta +# uuid: django-meta-app-label +# group: django-meta +# -- +app_label = '$0' diff --git a/python-mode/django/meta/base-manager-name b/python-mode/django/meta/base-manager-name new file mode 100644 index 00000000..eb474799 --- /dev/null +++ b/python-mode/django/meta/base-manager-name @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: base_manager_name - he attribute name of the manager, for example, 'objects', to use for the model’s _base_manager. +# key: djmeta +# uuid: django-meta-base-manager-name +# group: django-meta +# -- +base_manager_name = '${1:objects}'$0 diff --git a/python-mode/django/meta/constraints b/python-mode/django/meta/constraints new file mode 100644 index 00000000..a8453c61 --- /dev/null +++ b/python-mode/django/meta/constraints @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: constraints - A list of constraints that you want to define on the model +# key: djmeta +# uuid: django-meta-constraints +# group: django-meta +# -- +constrains = [ + models.CheckConstraint(check=$1, name='$2'), + $0 +] \ No newline at end of file diff --git a/python-mode/django/meta/db-table b/python-mode/django/meta/db-table new file mode 100644 index 00000000..2a7f2cf1 --- /dev/null +++ b/python-mode/django/meta/db-table @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: db_table - The name of the database table to use for the model: +# key: djmeta +# uuid: django-meta-db-table +# group: django-meta +# -- +db_table = '$0' diff --git a/python-mode/django/meta/db-tablespace b/python-mode/django/meta/db-tablespace new file mode 100644 index 00000000..f9f309e1 --- /dev/null +++ b/python-mode/django/meta/db-tablespace @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: db_tablespace - The name of the database tablespace to use for this model. The default is the project’s DEFAULT_TABLESPACE setting. +# key: djmeta +# uuid: django-meta-db-tablespace +# group: django-meta +# -- +db_tablespace = '$0' \ No newline at end of file diff --git a/python-mode/django/meta/default-manager-name b/python-mode/django/meta/default-manager-name new file mode 100644 index 00000000..c960d300 --- /dev/null +++ b/python-mode/django/meta/default-manager-name @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: default_manager_name - The name of the manager to use for the model’s _default_manager. +# key: djmeta +# uuid: django-meta-default-manager.name +# group: django-meta +# -- +default_manager_name = '$0' \ No newline at end of file diff --git a/python-mode/django/meta/default-permissions b/python-mode/django/meta/default-permissions new file mode 100644 index 00000000..3fae63af --- /dev/null +++ b/python-mode/django/meta/default-permissions @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: default_permissions +# key: djmeta +# uuid: django-meta-default-permissions +# group: django-meta +# -- +default_permissions = ('add', 'change', 'delete', 'view') \ No newline at end of file diff --git a/python-mode/django/meta/default-related-name b/python-mode/django/meta/default-related-name new file mode 100644 index 00000000..0630dca3 --- /dev/null +++ b/python-mode/django/meta/default-related-name @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: default_related_name - The name that will be used by default for the relation from a related object back to this one. The default is _set. +# key: djmeta +# uuid: django-meta-default-related-name +# group: django-meta +# -- +default_related_name = '$0' \ No newline at end of file diff --git a/python-mode/django/meta/forms-error-messages b/python-mode/django/meta/forms-error-messages new file mode 100644 index 00000000..339c6018 --- /dev/null +++ b/python-mode/django/meta/forms-error-messages @@ -0,0 +1,21 @@ +# -*- mode: snippet -*- +# name: forms error_messages +# key: djmeta +# uuid: django-meta-forms-error-messages +# group: django-meta +# -- +error_messages = { + '${1:FIELD NAME}': { + '${2:ERROR KEY}': '${3:ERROR MESSAGE}' + }$0 + + # Examples: + # from django.core.exceptions import NON_FIELD_ERRORS + # NON_FIELD_ERRORS: { + # 'unique_together': "%(model_name)s's %(field_labels)s are not unique.", + # }, + # 'name': { + # 'max_length': _("This writer's name is too long."), + # }, + +} diff --git a/python-mode/django/meta/forms-exclude b/python-mode/django/meta/forms-exclude new file mode 100644 index 00000000..c857feac --- /dev/null +++ b/python-mode/django/meta/forms-exclude @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: forms exclude +# key: djmeta +# uuid: django-meta-forms-exclude +# group: django-meta +# -- +exclude = ['${1:FIELD NAME}'$0] diff --git a/python-mode/django/meta/forms-field-classes b/python-mode/django/meta/forms-field-classes new file mode 100644 index 00000000..74852867 --- /dev/null +++ b/python-mode/django/meta/forms-field-classes @@ -0,0 +1,12 @@ +# -*- mode: snippet -*- +# name: form field_classes +# key: djmeta +# uuid: django-meta-forms-field-classes +# group: django-meta +# -- +field_classes = { + '${1:FIELD NAME}': ${2:FORM FIELD}$0 + + # Example: + # 'slug': MySlugFormField, +} \ No newline at end of file diff --git a/python-mode/django/meta/forms-fields b/python-mode/django/meta/forms-fields new file mode 100644 index 00000000..e92d28e6 --- /dev/null +++ b/python-mode/django/meta/forms-fields @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: form fields +# key: djmeta +# uuid: django-meta-forms-fields +# group: django-meta +# -- +fields = ['${1:FIELD NAME}'$0] diff --git a/python-mode/django/meta/forms-help-texts b/python-mode/django/meta/forms-help-texts new file mode 100644 index 00000000..18b9ecad --- /dev/null +++ b/python-mode/django/meta/forms-help-texts @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: forms help_texts +# key: djmeta +# uuid: django-meta-forms-help-texts +# group: django-meta +# -- +help_texts = { + '${1:FIELD NAME}': '${2:HELP TEXT}'$0 +} diff --git a/python-mode/django/meta/forms-labels b/python-mode/django/meta/forms-labels new file mode 100644 index 00000000..4454b08c --- /dev/null +++ b/python-mode/django/meta/forms-labels @@ -0,0 +1,12 @@ +# -*- mode: snippet -*- +# name: forms labels +# key: djmeta +# uuid: django-meta-forms-labels +# group: django-meta +# -- +labels = { + '${1:FIELD NAME}': '${2:FIELD LABEL}'$0 + + # Example + # 'name': _('Writer'), +} \ No newline at end of file diff --git a/python-mode/django/meta/forms-localized-fields b/python-mode/django/meta/forms-localized-fields new file mode 100644 index 00000000..22921daf --- /dev/null +++ b/python-mode/django/meta/forms-localized-fields @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: forms localized_fields +# key: djmeta +# uuid: django-meta-forms-localized-fields +# group: django-meta +# -- +localized_fields = ('${1:FIELD NAME}',$0) \ No newline at end of file diff --git a/python-mode/django/meta/forms-model b/python-mode/django/meta/forms-model new file mode 100644 index 00000000..2de85a5a --- /dev/null +++ b/python-mode/django/meta/forms-model @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: forms model +# key: djmeta +# uuid: django-meta-forms-model +# group: django-meta +# -- +model = $0 diff --git a/python-mode/django/meta/forms-widgets b/python-mode/django/meta/forms-widgets new file mode 100644 index 00000000..da45492d --- /dev/null +++ b/python-mode/django/meta/forms-widgets @@ -0,0 +1,13 @@ +# -*- mode: snippet -*- +# name: forms widgets +# key: djmeta +# uuid: django-meta-forms-widgets +# group: django-meta +# -- +widgets = { + '${1:FIELD NAME}': ${2:FIELD}$0 + + # Example + # from django.forms import Textarea + # 'name': Textarea(attrs={'cols': 80, 'rows': 20}), +} \ No newline at end of file diff --git a/python-mode/django/meta/get-latest-by b/python-mode/django/meta/get-latest-by new file mode 100644 index 00000000..717267f2 --- /dev/null +++ b/python-mode/django/meta/get-latest-by @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: get_latest_by - This specifies the default field(s) to use in your model Manager’s latest() and earliest() methods. +# key: djmeta +# uuid: django-meta-get-latest-by +# group: django-meta +# -- +latest_by = ['${1:order}']$0 \ No newline at end of file diff --git a/python-mode/django/meta/index-together b/python-mode/django/meta/index-together new file mode 100644 index 00000000..47b7e9cc --- /dev/null +++ b/python-mode/django/meta/index-together @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: index_together - Sets of field names that, taken together, are indexed +# key: djmeta +# uuid: django-meta-index-together +# group: django-meta +# -- +index_together = [$0] \ No newline at end of file diff --git a/python-mode/django/meta/indexes b/python-mode/django/meta/indexes new file mode 100644 index 00000000..fd9f9627 --- /dev/null +++ b/python-mode/django/meta/indexes @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: indexes - A list of indexes that you want to define on the model: +# key: djmeta +# uuid: django-meta-indexes +# group: django-meta +# -- +indexes = [ + models.Index(fields=['$1'], name='$2'), + $0 +] \ No newline at end of file diff --git a/python-mode/django/meta/label b/python-mode/django/meta/label new file mode 100644 index 00000000..79717a30 --- /dev/null +++ b/python-mode/django/meta/label @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: label - Representation of the object, returns app_label.object_name, e.g. 'polls.Question'. +# key: djmeta +# uuid: django-meta-label +# group: django-meta +# -- +label = '$0' \ No newline at end of file diff --git a/python-mode/django/meta/label-lower b/python-mode/django/meta/label-lower new file mode 100644 index 00000000..e109fd7c --- /dev/null +++ b/python-mode/django/meta/label-lower @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: label_lower - Representation of the model, returns app_label.model_name, e.g. 'polls.question'. +# key: djmeta +# uuid: django-meta-label-lower +# group: django-meta +# -- +label_lower = '$0' \ No newline at end of file diff --git a/python-mode/django/meta/managed b/python-mode/django/meta/managed new file mode 100644 index 00000000..beab0e9e --- /dev/null +++ b/python-mode/django/meta/managed @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: managed - Defaults to True, meaning Django will create the appropriate database tables. +# key: djmeta +# uuid: django-meta-managed +# group: django-meta +# -- +managed = True diff --git a/python-mode/django/meta/order-with-respect-to b/python-mode/django/meta/order-with-respect-to new file mode 100644 index 00000000..53778d39 --- /dev/null +++ b/python-mode/django/meta/order-with-respect-to @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: order_with_respect_to - Makes this object orderable with respect to the given field +# key: djmeta +# uuid: django-meta-order-with-respect-to +# group: django-meta +# -- +order_with_repect_to = '$1' +$0 diff --git a/python-mode/django/meta/ordering b/python-mode/django/meta/ordering new file mode 100644 index 00000000..c114b57e --- /dev/null +++ b/python-mode/django/meta/ordering @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: ordering - The default ordering for the object, for use when obtaining lists of objects +# key: djmeta +# uuid: django-meta-ordering +# group: django-meta +# -- +ordering = ['$1']$0 \ No newline at end of file diff --git a/python-mode/django/meta/permissions b/python-mode/django/meta/permissions new file mode 100644 index 00000000..707f71de --- /dev/null +++ b/python-mode/django/meta/permissions @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: permissions - Extra permissions to enter into the permissions table when creating this object. +# key: djmeta +# uuid: django-meta-permissions +# group: django-meta +# -- +permissions = [('$1', '$2')]$0 \ No newline at end of file diff --git a/python-mode/django/meta/proxy b/python-mode/django/meta/proxy new file mode 100644 index 00000000..58391366 --- /dev/null +++ b/python-mode/django/meta/proxy @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: proxy - If proxy = True, a model which subclasses another model will be treated as a proxy model. +# key: djmeta +# uuid: django-meta-proxy +# group: django-meta +# -- +proxy = True \ No newline at end of file diff --git a/python-mode/django/meta/required-db-features b/python-mode/django/meta/required-db-features new file mode 100644 index 00000000..4d4ed3cb --- /dev/null +++ b/python-mode/django/meta/required-db-features @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: required_db_features - List of database features that the current connection should have. +# key: djmeta +# uuid: django-meta-required-db-features +# group: django-meta +# -- +required_db_features = ['$1']$0 \ No newline at end of file diff --git a/python-mode/django/meta/required-db-vendor b/python-mode/django/meta/required-db-vendor new file mode 100644 index 00000000..74e7bc98 --- /dev/null +++ b/python-mode/django/meta/required-db-vendor @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: required_db_vendor - Name of a supported database vendor that this model is specific to. +# key: djmeta +# uuid: django-meta-required-db-vendor +# group: django-meta +# -- +# Built in options 'sqlite', 'postgresql', 'mysql', 'oracle' +required_db_vendor = '$1'$0 \ No newline at end of file diff --git a/python-mode/django/meta/select-on-save b/python-mode/django/meta/select-on-save new file mode 100644 index 00000000..b6f12bc5 --- /dev/null +++ b/python-mode/django/meta/select-on-save @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: select_on_save - Determines if Django will use the pre-1.6 django.db.models.Model.save() algorithm. +# key: djmeta +# uuid: django-meta-select-on-save +# group: django-meta +# -- +select_on_save = False \ No newline at end of file diff --git a/python-mode/django/meta/unique-together b/python-mode/django/meta/unique-together new file mode 100644 index 00000000..0590bddc --- /dev/null +++ b/python-mode/django/meta/unique-together @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: unique_together - Sets of field names that, taken together, must be unique +# key: djmeta +# uuid: django-meta-unique-together +# group: django-meta +# -- +unique_together = [$0] \ No newline at end of file diff --git a/python-mode/django/meta/verbose-name b/python-mode/django/meta/verbose-name new file mode 100644 index 00000000..1e3f4cc8 --- /dev/null +++ b/python-mode/django/meta/verbose-name @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: verbose_name - A human-readable name for the object, singular +# key: djmeta +# uuid: django-meta-verbose-name +# group: django-meta +# -- +verbose_name = '$0' \ No newline at end of file diff --git a/python-mode/django/meta/verbose-name-plural b/python-mode/django/meta/verbose-name-plural new file mode 100644 index 00000000..2489bab2 --- /dev/null +++ b/python-mode/django/meta/verbose-name-plural @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: verbose_name_plural - The plural name for the object +# key: djmeta +# uuid: django-meta-verbose-name-plural +# group: django-meta +# -- +verbose_name_plural = '$0' \ No newline at end of file diff --git a/python-mode/django/middleware/authentication b/python-mode/django/middleware/authentication new file mode 100644 index 00000000..f7442d46 --- /dev/null +++ b/python-mode/django/middleware/authentication @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: AuthenticationMiddleware +# key: djmid +# uuid: django-middleware-authentication +# group: django-middleware +# -- +django.contrib.auth.middleware.AuthenticationMiddleware \ No newline at end of file diff --git a/python-mode/django/middleware/broken-link-email b/python-mode/django/middleware/broken-link-email new file mode 100644 index 00000000..91b87a00 --- /dev/null +++ b/python-mode/django/middleware/broken-link-email @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: BrokenLinkEmailsMiddleware +# key: djmid +# uuid: django-middleware-broken-link-email +# group: django-middleware +# -- +django.middleware.common.BrokenLinkEmailsMiddleware \ No newline at end of file diff --git a/python-mode/django/middleware/cache-fetch b/python-mode/django/middleware/cache-fetch new file mode 100644 index 00000000..8e22b622 --- /dev/null +++ b/python-mode/django/middleware/cache-fetch @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: FetchFromCacheMiddleware' +# key: djmid +# uuid: django-middleware-cache-fetch +# group: django-middleware +# -- +django.middleware.cache.FetchFromCacheMiddleware diff --git a/python-mode/django/middleware/cache-update b/python-mode/django/middleware/cache-update new file mode 100644 index 00000000..a1381800 --- /dev/null +++ b/python-mode/django/middleware/cache-update @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: UpdateCacheMiddleware +# key: djmid +# uuid: django-middleware-cache-update +# group: django-middleware +# -- +django.middleware.cache.UpdateCacheMiddleware \ No newline at end of file diff --git a/python-mode/django/middleware/common b/python-mode/django/middleware/common new file mode 100644 index 00000000..c6dd2745 --- /dev/null +++ b/python-mode/django/middleware/common @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CommonMiddleware +# key: djmid +# uuid: django-middleware-common +# group: django-middleware +# -- +django.middleware.common.CommonMiddleware \ No newline at end of file diff --git a/python-mode/django/middleware/conditional-get b/python-mode/django/middleware/conditional-get new file mode 100644 index 00000000..0367b018 --- /dev/null +++ b/python-mode/django/middleware/conditional-get @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: ConditionalGetMiddleware +# key: djmid +# uuid: django-middleware-conditional-get +# group: django-middleware +# -- +django.middleware.http.ConditionalGetMiddleware \ No newline at end of file diff --git a/python-mode/django/middleware/csrf-view b/python-mode/django/middleware/csrf-view new file mode 100644 index 00000000..6e2ddc40 --- /dev/null +++ b/python-mode/django/middleware/csrf-view @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CsrfViewMiddleware +# key: djmid +# uuid: django-middleware-csrf-view +# group: django-middleware +# -- +django.middleware.csrf.CsrfViewMiddleware \ No newline at end of file diff --git a/python-mode/django/middleware/current-site b/python-mode/django/middleware/current-site new file mode 100644 index 00000000..310db097 --- /dev/null +++ b/python-mode/django/middleware/current-site @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CurrentSiteMiddleware +# key: djmid +# uuid: django-middleware-current-site +# group: django-middleware +# -- +django.contrib.sites.middleware.CurrentSiteMiddleware \ No newline at end of file diff --git a/python-mode/django/middleware/gzip b/python-mode/django/middleware/gzip new file mode 100644 index 00000000..07187dec --- /dev/null +++ b/python-mode/django/middleware/gzip @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: GZipMiddleware +# key: djmid +# uuid: django-middleware-gzip +# group: django-middleware +# -- +django.middleware.gzip.GZipMiddleware \ No newline at end of file diff --git a/python-mode/django/middleware/locale b/python-mode/django/middleware/locale new file mode 100644 index 00000000..8649e420 --- /dev/null +++ b/python-mode/django/middleware/locale @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LocaleMiddleware +# key: djmid +# uuid: django-middleware-locale +# group: django-middleware +# -- +django.middleware.locale.LocaleMiddleware \ No newline at end of file diff --git a/python-mode/django/middleware/message b/python-mode/django/middleware/message new file mode 100644 index 00000000..a99b5970 --- /dev/null +++ b/python-mode/django/middleware/message @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: MessageMiddlware +# key: djmid +# uuid: django-middleware-message +# group: django-middleware +# -- +django.contrib.messages.middleware.MessageMiddleware \ No newline at end of file diff --git a/python-mode/django/middleware/persistent-remote-user b/python-mode/django/middleware/persistent-remote-user new file mode 100644 index 00000000..d0bdfd5f --- /dev/null +++ b/python-mode/django/middleware/persistent-remote-user @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: PersistentRemoteUserMiddleware +# key: djmid +# uuid: django-middleware-persistent-remote-user +# group: django-middleware +# -- +django.contrib.auth.middleware.PersistentRemoteUserMiddleware diff --git a/python-mode/django/middleware/remote-user b/python-mode/django/middleware/remote-user new file mode 100644 index 00000000..e06d6127 --- /dev/null +++ b/python-mode/django/middleware/remote-user @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: RemoteUserMiddleware +# key: djmid +# uuid: django-middleware-remote-user +# group: django-middleware +# -- +django.contrib.auth.middleware.RemoteUserMiddleware diff --git a/python-mode/django/middleware/security b/python-mode/django/middleware/security new file mode 100644 index 00000000..9ab81da0 --- /dev/null +++ b/python-mode/django/middleware/security @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SecurityMiddlware +# key: djmid +# uuid: django-middleware-security +# group: django-middleware +# -- +django.middleware.security.SecurityMiddleware \ No newline at end of file diff --git a/python-mode/django/middleware/session b/python-mode/django/middleware/session new file mode 100644 index 00000000..b42b0b84 --- /dev/null +++ b/python-mode/django/middleware/session @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SessionMiddleware +# key: djmid +# uuid: django-middleware-session +# group: django-middleware +# -- +django.contrib.sessions.middleware.SessionMiddleware \ No newline at end of file diff --git a/python-mode/django/middleware/x-frame-options b/python-mode/django/middleware/x-frame-options new file mode 100644 index 00000000..7f50218e --- /dev/null +++ b/python-mode/django/middleware/x-frame-options @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: XFrameOptionsMiddleware +# key: djmid +# uuid: django-middleware-x-frame-options +# group: django-middleware +# -- +django.middleware.clickjacking.XFrameOptionsMiddleware \ No newline at end of file diff --git a/python-mode/django/models/common b/python-mode/django/models/common new file mode 100644 index 00000000..aa9ad60a --- /dev/null +++ b/python-mode/django/models/common @@ -0,0 +1,18 @@ +# -*- mode: snippet -*- +# name: Common Model +# key: djmod +# uuid: django-models-common +# group: django-models +# -- +class ${1:MODEL NAME}(models.Model): + """${2:DOC STRING}""" + + # Fields + ${3:FIELD NAME} = models.${4:FIELD} + $0 + + def __str__(self): + return str(self.id) + + def save(self, *args, **kwargs): + super().save(*args, **kwargs) diff --git a/python-mode/django/models/generic b/python-mode/django/models/generic new file mode 100644 index 00000000..30112e78 --- /dev/null +++ b/python-mode/django/models/generic @@ -0,0 +1,20 @@ +# -*- mode: snippet -*- +# name: Generic Model +# key: djmod +# uuid: django-models-generic +# group: django-models +# -- +# from django.contrib.contenttypes.fields import GenericForeignKey +# from django.contrib.contenttypes.models import ContentType + +class ${1:MODEL NAME}(models.Model): + """${2:DOC STRING}""" + ${3:FIELD NAME} = models.${4:FIELD} + $0 + + content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE) + object_id = models.PositiveIntegerField() + content_object = GenericForeignKey('content_type', 'object_id') + + def __str__(self): + return str(self.id) diff --git a/python-mode/django/settings/.yas-parents b/python-mode/django/settings/.yas-parents new file mode 100644 index 00000000..49fb9bbc --- /dev/null +++ b/python-mode/django/settings/.yas-parents @@ -0,0 +1 @@ +python-mode diff --git a/python-mode/django/settings/absolute-url-overrides b/python-mode/django/settings/absolute-url-overrides new file mode 100644 index 00000000..bc3412dc --- /dev/null +++ b/python-mode/django/settings/absolute-url-overrides @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: ABSOLUTE_URL_OVERRIDES +# key: djs +# uuid: django-settings-absolute-url-overrides +# group: django-settings +# -- +ABSOLUTE_URL_OVERRIDES = [ + $0 +] \ No newline at end of file diff --git a/python-mode/django/settings/absolute-url-overrides-dot b/python-mode/django/settings/absolute-url-overrides-dot new file mode 100644 index 00000000..9ca24a1f --- /dev/null +++ b/python-mode/django/settings/absolute-url-overrides-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: ABSOLUTE_URL_OVERRIDES +# key: settings. +# uuid: django-settings-absolute-url-overrides-dot +# group: django-settings-dot +# -- +settings.ABSOLUTE_URL_OVERRIDES \ No newline at end of file diff --git a/python-mode/django/settings/admins b/python-mode/django/settings/admins new file mode 100644 index 00000000..5468d693 --- /dev/null +++ b/python-mode/django/settings/admins @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: ADMINS - People who get code error notifications. +# key: djs +# uuid: django-settings-admins +# group: django-settings +# -- +# People who get code error notifications. +# In the format [('Full Name', 'email@example.com'), ('Full Name', 'anotheremail@example.com')] +ADMINS = [$0] diff --git a/python-mode/django/settings/admins-dot b/python-mode/django/settings/admins-dot new file mode 100644 index 00000000..cbc6f5c6 --- /dev/null +++ b/python-mode/django/settings/admins-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: ADMINS - People who get code error notifications. +# key: settings. +# uuid: django-settings-admins-dot +# group: django-settings-dot +# -- +settings.ADMINS diff --git a/python-mode/django/settings/allowed-hosts b/python-mode/django/settings/allowed-hosts new file mode 100644 index 00000000..eb391f07 --- /dev/null +++ b/python-mode/django/settings/allowed-hosts @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: ALLOWED_HOSTS - "*" matches anything, ".example.com" matches example.com and all subdomains +# key: djs +# uuid: django-settings-allowed-hosts +# group: django-settings +# -- +# Hosts/domain names that are valid for this site. +# "*" matches anything, ".example.com" matches example.com and all subdomains +ALLOWED_HOSTS = [] diff --git a/python-mode/django/settings/allowed-hosts-dot b/python-mode/django/settings/allowed-hosts-dot new file mode 100644 index 00000000..275191c7 --- /dev/null +++ b/python-mode/django/settings/allowed-hosts-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: ALLOWED_HOSTS - "*" matches anything, ".example.com" matches example.com and all subdomains +# key: settings. +# uuid: django-settings-allowed-hosts-dot +# group: django-settings-dot +# -- +settings.ALLOWED_HOSTS diff --git a/python-mode/django/settings/append-slash b/python-mode/django/settings/append-slash new file mode 100644 index 00000000..42404f41 --- /dev/null +++ b/python-mode/django/settings/append-slash @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: APPEND_SLASH - Whether to append trailing slashes to URLs. +# key: djs +# uuid: django-settings-append-slash +# group: django-settings +# -- +# Whether to append trailing slashes to URLs. +APPEND_SLASH = True \ No newline at end of file diff --git a/python-mode/django/settings/append-slash-dot b/python-mode/django/settings/append-slash-dot new file mode 100644 index 00000000..bc338421 --- /dev/null +++ b/python-mode/django/settings/append-slash-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: APPEND_SLASH - Whether to append trailing slashes to URLs. +# key: settings +# uuid: django-settings-append-slash +# group: django-settings +# -- +settings.APPEND_SLASH \ No newline at end of file diff --git a/python-mode/django/settings/auth-password-validators b/python-mode/django/settings/auth-password-validators new file mode 100644 index 00000000..73ad3272 --- /dev/null +++ b/python-mode/django/settings/auth-password-validators @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: AUTH_PASSWORD_VALIDATORS +# key: djs +# uuid: django-settings-auth-password-validators +# group: django-settings +# -- +AUTH_PASSWORD_VALIDATORS = [] \ No newline at end of file diff --git a/python-mode/django/settings/auth-password-validators-dot b/python-mode/django/settings/auth-password-validators-dot new file mode 100644 index 00000000..a1dd5fe9 --- /dev/null +++ b/python-mode/django/settings/auth-password-validators-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: AUTH_PASSWORD_VALIDATORS +# key: settings. +# uuid: django-settings-auth-password-validators-dot +# group: django-settings-dot +# -- +settings.AUTH_PASSWORD_VALIDATORS \ No newline at end of file diff --git a/python-mode/django/settings/auth-user-model b/python-mode/django/settings/auth-user-model new file mode 100644 index 00000000..0bffadb0 --- /dev/null +++ b/python-mode/django/settings/auth-user-model @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: AUTH_USER_MODEL +# key: djs +# uuid: django-settings-auth-user-model +# group: django-settings +# -- +AUTH_USER_MODEL = 'auth.User' \ No newline at end of file diff --git a/python-mode/django/settings/auth-user-model-dot b/python-mode/django/settings/auth-user-model-dot new file mode 100644 index 00000000..6d8b6e22 --- /dev/null +++ b/python-mode/django/settings/auth-user-model-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: AUTH_USER_MODEL +# key: settings. +# uuid: django-settings-auth-user-model-dot +# group: django-settings-dot +# -- +settings.AUTH_USER_MODEL \ No newline at end of file diff --git a/python-mode/django/settings/authentication-backends b/python-mode/django/settings/authentication-backends new file mode 100644 index 00000000..9921271c --- /dev/null +++ b/python-mode/django/settings/authentication-backends @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: AUTHENTICATION_BACKENDS +# key: djs +# uuid: django-settings-authentication-backends +# group: django-settings +# -- +AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend'] \ No newline at end of file diff --git a/python-mode/django/settings/authentication-backends-dot b/python-mode/django/settings/authentication-backends-dot new file mode 100644 index 00000000..e4cf18db --- /dev/null +++ b/python-mode/django/settings/authentication-backends-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: AUTHENTICATION_BACKENDS +# key: settings. +# uuid: django-settings-authentication-backends-dot +# group: django-settings-dot +# -- +settings.AUTHENTICATION_BACKENDS \ No newline at end of file diff --git a/python-mode/django/settings/cache-middleware-alias b/python-mode/django/settings/cache-middleware-alias new file mode 100644 index 00000000..f1379076 --- /dev/null +++ b/python-mode/django/settings/cache-middleware-alias @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CACHE_MIDDLEWARE_ALIAS +# key: djs +# uuid: django-settings-cache-middleware-alias +# group: django-settings +# -- +CACHE_MIDDLEWARE_ALIAS = 'default' \ No newline at end of file diff --git a/python-mode/django/settings/cache-middleware-alias-dot b/python-mode/django/settings/cache-middleware-alias-dot new file mode 100644 index 00000000..2f24ca84 --- /dev/null +++ b/python-mode/django/settings/cache-middleware-alias-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CACHE_MIDDLEWARE_ALIAS +# key: settings. +# uuid: django-settings-cache-middleware-alias-dot +# group: django-settings-dot +# -- +settings.CACHE_MIDDLEWARE_ALIAS \ No newline at end of file diff --git a/python-mode/django/settings/cache-middleware-key-prefix b/python-mode/django/settings/cache-middleware-key-prefix new file mode 100644 index 00000000..1483c59e --- /dev/null +++ b/python-mode/django/settings/cache-middleware-key-prefix @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CACHE_MIDDLEWARE_KEY_PREFIX +# key: djs +# uuid: django-settings-cache-middleware-key-prefix +# group: django-settings +# -- +CACHE_MIDDLEWARE_KEY_PREFIX = '' \ No newline at end of file diff --git a/python-mode/django/settings/cache-middleware-key-prefix-dot b/python-mode/django/settings/cache-middleware-key-prefix-dot new file mode 100644 index 00000000..f03ba020 --- /dev/null +++ b/python-mode/django/settings/cache-middleware-key-prefix-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CACHE_MIDDLEWARE_KEY_PREFIX +# key: settings. +# uuid: django-settings-cache-middleware-key-prefix-dot +# group: django-settings-dot +# -- +settings.CACHE_MIDDLEWARE_KEY_PREFIX \ No newline at end of file diff --git a/python-mode/django/settings/cache-middleware-seconds b/python-mode/django/settings/cache-middleware-seconds new file mode 100644 index 00000000..5c614570 --- /dev/null +++ b/python-mode/django/settings/cache-middleware-seconds @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CACHE_MIDDLEWARE_SECONDS +# key: djs +# uuid: django-settings-cache-middleware-seconds +# group: django-settings +# -- +CACHE_MIDDLEWARE_SECONDS = 600 \ No newline at end of file diff --git a/python-mode/django/settings/cache-middleware-seconds-dot b/python-mode/django/settings/cache-middleware-seconds-dot new file mode 100644 index 00000000..0a45ca2e --- /dev/null +++ b/python-mode/django/settings/cache-middleware-seconds-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CACHE_MIDDLEWARE_SECONDS +# key: settings. +# uuid: django-settings-cache-middleware-seconds-dot +# group: django-settings-dot +# -- +settings.CACHE_MIDDLEWARE_SECONDS \ No newline at end of file diff --git a/python-mode/django/settings/caches b/python-mode/django/settings/caches new file mode 100644 index 00000000..996225d5 --- /dev/null +++ b/python-mode/django/settings/caches @@ -0,0 +1,12 @@ +# -*- mode: snippet -*- +# name: CACHES - The cache backends to use. +# key: djs +# uuid: django-settings-caches +# group: django-settings +# -- +# The cache backends to use. +CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', + } +} \ No newline at end of file diff --git a/python-mode/django/settings/caches-dot b/python-mode/django/settings/caches-dot new file mode 100644 index 00000000..fd1a3490 --- /dev/null +++ b/python-mode/django/settings/caches-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CACHES - The cache backends to use. +# key: settings. +# uuid: django-settings-caches-dot +# group: django-settings-dot +# -- +settings.CACHES \ No newline at end of file diff --git a/python-mode/django/settings/csrf-cookie-age b/python-mode/django/settings/csrf-cookie-age new file mode 100644 index 00000000..20842d0a --- /dev/null +++ b/python-mode/django/settings/csrf-cookie-age @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_COOKIE_AGE +# key: djs +# uuid: django-settings-csrf-cookie-age +# group: django-settings +# -- +CSRF_COOKIE_AGE = 60 * 60 * 24 * 7 * 52 \ No newline at end of file diff --git a/python-mode/django/settings/csrf-cookie-age-dot b/python-mode/django/settings/csrf-cookie-age-dot new file mode 100644 index 00000000..a3e80636 --- /dev/null +++ b/python-mode/django/settings/csrf-cookie-age-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_COOKIE_AGE +# key: settings. +# uuid: django-settings-csrf-cookie-age-dot +# group: django-settings-dot +# -- +settings.CSRF_COOKIE_AGE \ No newline at end of file diff --git a/python-mode/django/settings/csrf-cookie-domain b/python-mode/django/settings/csrf-cookie-domain new file mode 100644 index 00000000..47076e62 --- /dev/null +++ b/python-mode/django/settings/csrf-cookie-domain @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_COOKIE_DOMAIN +# key: djs +# uuid: django-settings-csrf-cookie-domain +# group: django-settings +# -- +CSRF_COOKIE_DOMAIN = None \ No newline at end of file diff --git a/python-mode/django/settings/csrf-cookie-domain-dot b/python-mode/django/settings/csrf-cookie-domain-dot new file mode 100644 index 00000000..8dbde285 --- /dev/null +++ b/python-mode/django/settings/csrf-cookie-domain-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_COOKIE_DOMAIN +# key: settings. +# uuid: django-settings-csrf-cookie-domain-dot +# group: django-settings-dot +# -- +settings.CSRF_COOKIE_DOMAIN \ No newline at end of file diff --git a/python-mode/django/settings/csrf-cookie-httponly b/python-mode/django/settings/csrf-cookie-httponly new file mode 100644 index 00000000..de54a8cf --- /dev/null +++ b/python-mode/django/settings/csrf-cookie-httponly @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_COOKIE_HTTPONLY +# key: djs +# uuid: django-settings-csrf-cookie-httponly +# group: django-settings +# -- +CSRF_COOKIE_HTTPONLY = False \ No newline at end of file diff --git a/python-mode/django/settings/csrf-cookie-httponly-dot b/python-mode/django/settings/csrf-cookie-httponly-dot new file mode 100644 index 00000000..8908e051 --- /dev/null +++ b/python-mode/django/settings/csrf-cookie-httponly-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_COOKIE_HTTPONLY +# key: settings. +# uuid: django-settings-csrf-cookie-httponly-dot +# group: django-settings-dot +# -- +settings.CSRF_COOKIE_HTTPONLY \ No newline at end of file diff --git a/python-mode/django/settings/csrf-cookie-name b/python-mode/django/settings/csrf-cookie-name new file mode 100644 index 00000000..c7a145ae --- /dev/null +++ b/python-mode/django/settings/csrf-cookie-name @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_COOKIE_NAME +# key: djs +# uuid: django-settings-csrf-cookie-name +# group: django-settings +# -- +CSRF_COOKIE_NAME = 'csrftoken' \ No newline at end of file diff --git a/python-mode/django/settings/csrf-cookie-name-dot b/python-mode/django/settings/csrf-cookie-name-dot new file mode 100644 index 00000000..c5f94e03 --- /dev/null +++ b/python-mode/django/settings/csrf-cookie-name-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_COOKIE_NAME +# key: settings. +# uuid: django-settings-csrf-cookie-name-dot +# group: django-settings-dot +# -- +settings.CSRF_COOKIE_NAME \ No newline at end of file diff --git a/python-mode/django/settings/csrf-cookie-path b/python-mode/django/settings/csrf-cookie-path new file mode 100644 index 00000000..b868b511 --- /dev/null +++ b/python-mode/django/settings/csrf-cookie-path @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_COOKIE_PATH +# key: djs +# uuid: django-settings-csrf-cookie-path +# group: django-settings +# -- +CSRF_COOKIE_PATH = '/' \ No newline at end of file diff --git a/python-mode/django/settings/csrf-cookie-path-dot b/python-mode/django/settings/csrf-cookie-path-dot new file mode 100644 index 00000000..72b65d9e --- /dev/null +++ b/python-mode/django/settings/csrf-cookie-path-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_COOKIE_PATH +# key: settings. +# uuid: django-settings-csrf-cookie-path-dot +# group: django-settings-dot +# -- +settings.CSRF_COOKIE_PATH \ No newline at end of file diff --git a/python-mode/django/settings/csrf-cookie-samesite b/python-mode/django/settings/csrf-cookie-samesite new file mode 100644 index 00000000..a50c8d93 --- /dev/null +++ b/python-mode/django/settings/csrf-cookie-samesite @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_COOKIE_SAMESITE +# key: djs +# uuid: django-settings-csrf-cookie-samesite +# group: django-settings +# -- +CSRF_COOKIE_SAMESITE = 'Lax' diff --git a/python-mode/django/settings/csrf-cookie-samesite-dot b/python-mode/django/settings/csrf-cookie-samesite-dot new file mode 100644 index 00000000..6ecf1464 --- /dev/null +++ b/python-mode/django/settings/csrf-cookie-samesite-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_COOKIE_SAMESITE +# key: settings. +# uuid: django-settings-csrf-cookie-samesite-dot +# group: django-settings-dot +# -- +settings.CSRF_COOKIE_SAMESITE = 'Lax' diff --git a/python-mode/django/settings/csrf-cookie-secure b/python-mode/django/settings/csrf-cookie-secure new file mode 100644 index 00000000..24167860 --- /dev/null +++ b/python-mode/django/settings/csrf-cookie-secure @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_COOKIE_SECURE +# key: djs +# uuid: django-settings-csrf-cookie-secure +# group: django-settings +# -- +CSRF_COOKIE_SECURE = False \ No newline at end of file diff --git a/python-mode/django/settings/csrf-cookie-secure-dot b/python-mode/django/settings/csrf-cookie-secure-dot new file mode 100644 index 00000000..5803b15b --- /dev/null +++ b/python-mode/django/settings/csrf-cookie-secure-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_COOKIE_SECURE +# key: settings. +# uuid: django-settings-csrf-cookie-secure-dot +# group: django-settings-dot +# -- +settings.CSRF_COOKIE_SECURE \ No newline at end of file diff --git a/python-mode/django/settings/csrf-failure-view b/python-mode/django/settings/csrf-failure-view new file mode 100644 index 00000000..5628e61d --- /dev/null +++ b/python-mode/django/settings/csrf-failure-view @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: CSRF_FAILURE_VIEW - Dotted path to callable to be used as view when a request is rejected by the CSRF middleware. +# key: djs +# uuid: django-settings-csrf-failure-view +# group: django-settings +# -- +# Dotted path to callable to be used as view when a request is +# rejected by the CSRF middleware. +CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure' \ No newline at end of file diff --git a/python-mode/django/settings/csrf-failure-view-dot b/python-mode/django/settings/csrf-failure-view-dot new file mode 100644 index 00000000..c7a429b1 --- /dev/null +++ b/python-mode/django/settings/csrf-failure-view-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_FAILURE_VIEW - Dotted path to callable to be used as view when a request is rejected by the CSRF middleware. +# key: settings. +# uuid: django-settings-csrf-failure-view-dot +# group: django-settings-dot +# -- +settings.CSRF_FAILURE_VIEW \ No newline at end of file diff --git a/python-mode/django/settings/csrf-header-name b/python-mode/django/settings/csrf-header-name new file mode 100644 index 00000000..58a80277 --- /dev/null +++ b/python-mode/django/settings/csrf-header-name @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_HEADER_NAME +# key: djs +# uuid: django-settings-csrf-header-name +# group: django-settings +# -- +CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN' \ No newline at end of file diff --git a/python-mode/django/settings/csrf-header-name-dot b/python-mode/django/settings/csrf-header-name-dot new file mode 100644 index 00000000..31837c9b --- /dev/null +++ b/python-mode/django/settings/csrf-header-name-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_HEADER_NAME +# key: settings. +# uuid: django-settings-csrf-header-name-dot +# group: django-settings-dot +# -- +settings.CSRF_HEADER_NAME \ No newline at end of file diff --git a/python-mode/django/settings/csrf-trusted-origins b/python-mode/django/settings/csrf-trusted-origins new file mode 100644 index 00000000..fae7771b --- /dev/null +++ b/python-mode/django/settings/csrf-trusted-origins @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: CSRF_TRUSTED_ORIGINS +# key: djs +# uuid: django-settings-csrf-trusted-origins +# group: django-settings +# -- +CSRF_TRUSTED_ORIGINS = [ + $0 +] \ No newline at end of file diff --git a/python-mode/django/settings/csrf-trusted-origins-dot b/python-mode/django/settings/csrf-trusted-origins-dot new file mode 100644 index 00000000..e2947485 --- /dev/null +++ b/python-mode/django/settings/csrf-trusted-origins-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_TRUSTED_ORIGINS +# key: settings. +# uuid: django-settings-csrf-trusted-origins-dot +# group: django-settings-dot +# -- +settings.CSRF_TRUSTED_ORIGINS \ No newline at end of file diff --git a/python-mode/django/settings/csrf-use-sessions b/python-mode/django/settings/csrf-use-sessions new file mode 100644 index 00000000..9ba2347d --- /dev/null +++ b/python-mode/django/settings/csrf-use-sessions @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_USE_SESSIONS +# key: djs +# uuid: django-settings-csrf-use-sessions +# group: django-settings +# -- +CSRF_USE_SESSIONS = False \ No newline at end of file diff --git a/python-mode/django/settings/csrf-use-sessions-dot b/python-mode/django/settings/csrf-use-sessions-dot new file mode 100644 index 00000000..f87558e7 --- /dev/null +++ b/python-mode/django/settings/csrf-use-sessions-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: CSRF_USE_SESSIONS +# key: settings. +# uuid: django-settings-csrf-use-sessions-dot +# group: django-settings-dot +# -- +settings.CSRF_USE_SESSIONS \ No newline at end of file diff --git a/python-mode/django/settings/data-upload-max-memory-size b/python-mode/django/settings/data-upload-max-memory-size new file mode 100644 index 00000000..f106f1f2 --- /dev/null +++ b/python-mode/django/settings/data-upload-max-memory-size @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: DATA_UPLOAD_MAX_MEMORY_SIZE - Maximum size in bytes of request data (excluding file uploads) +# key: djs +# uuid: django-settings-data-upload-max-memory-size +# group: django-settings +# -- +# Maximum size in bytes of request data (excluding file uploads) that will be +# read before a SuspiciousOperation (RequestDataTooBig) is raised. +DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440 # i.e. 2.5 MB diff --git a/python-mode/django/settings/data-upload-max-memory-size-dot b/python-mode/django/settings/data-upload-max-memory-size-dot new file mode 100644 index 00000000..b756e94c --- /dev/null +++ b/python-mode/django/settings/data-upload-max-memory-size-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DATA_UPLOAD_MAX_MEMORY_SIZE - Maximum size in bytes of request data (excluding file uploads) +# key: settings. +# uuid: django-settings-data-upload-max-memory-size-dot +# group: django-settings-dot +# -- +settings.DATA_UPLOAD_MAX_MEMORY_SIZE diff --git a/python-mode/django/settings/data-upload-max-number-fields b/python-mode/django/settings/data-upload-max-number-fields new file mode 100644 index 00000000..af929ef3 --- /dev/null +++ b/python-mode/django/settings/data-upload-max-number-fields @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: Maximum number of GET/POST parameters that will be read before a SuspiciousOperation (TooManyFieldsSent) is raised. +# key: djs +# uuid: django-settings-data-upload-max-number-fields +# group: django-settings +# -- +# Maximum number of GET/POST parameters that will be read before a +# SuspiciousOperation (TooManyFieldsSent) is raised. +DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000 diff --git a/python-mode/django/settings/data-upload-max-number-fields-dot b/python-mode/django/settings/data-upload-max-number-fields-dot new file mode 100644 index 00000000..c304adf8 --- /dev/null +++ b/python-mode/django/settings/data-upload-max-number-fields-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: Maximum number of GET/POST parameters that will be read before a SuspiciousOperation (TooManyFieldsSent) is raised. +# key: settings. +# uuid: django-settings-data-upload-max-number-fields-dot +# group: django-settings-dot +# -- +settings.DATA_UPLOAD_MAX_NUMBER_FIELDS diff --git a/python-mode/django/settings/database-routers b/python-mode/django/settings/database-routers new file mode 100644 index 00000000..b6fa1d58 --- /dev/null +++ b/python-mode/django/settings/database-routers @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: DATABASE_ROUTERS - Classes used to implement DB routing behavior. +# key: djs +# uuid: django-settings-database-routers +# group: django-settings +# -- +# Classes used to implement DB routing behavior. +DATABASE_ROUTERS = [] \ No newline at end of file diff --git a/python-mode/django/settings/database-routers-dot b/python-mode/django/settings/database-routers-dot new file mode 100644 index 00000000..88d806f9 --- /dev/null +++ b/python-mode/django/settings/database-routers-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DATABASE_ROUTERS - Classes used to implement DB routing behavior. +# key: settings. +# uuid: django-settings-database-routers-dot +# group: django-settings -dot +# -- +settings.DATABASE_ROUTERS \ No newline at end of file diff --git a/python-mode/django/settings/databases b/python-mode/django/settings/databases new file mode 100644 index 00000000..a2ad0a24 --- /dev/null +++ b/python-mode/django/settings/databases @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: DATABASES - Database connection info. If left empty, will default to the dummy backend. +# key: djs +# uuid: django-settings-databases +# group: django-settings +# -- +# Database connection info. If left empty, will default to the dummy backend. +DATABASES = {} \ No newline at end of file diff --git a/python-mode/django/settings/databases-dot b/python-mode/django/settings/databases-dot new file mode 100644 index 00000000..78f685b5 --- /dev/null +++ b/python-mode/django/settings/databases-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DATABASES - Database connection info. If left empty, will default to the dummy backend. +# key: settings. +# uuid: django-settings-databases-dot +# group: django-settings-dot +# -- +settings.DATABASES \ No newline at end of file diff --git a/python-mode/django/settings/date-format b/python-mode/django/settings/date-format new file mode 100644 index 00000000..2a9abb15 --- /dev/null +++ b/python-mode/django/settings/date-format @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: DATE_FORMAT - Default formatting for date objects. +# key: djs +# uuid: django-settings-date-format +# group: django-settings +# -- +# Default formatting for date objects. See all available format strings here: +# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date +DATE_FORMAT = 'N j, Y' diff --git a/python-mode/django/settings/date-format-dot b/python-mode/django/settings/date-format-dot new file mode 100644 index 00000000..2efd4038 --- /dev/null +++ b/python-mode/django/settings/date-format-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DATE_FORMAT - Default formatting for date objects. +# key: settings. +# uuid: django-settings-date-format-dot +# group: django-settings-dot +# -- +settings.DATE_FORMAT diff --git a/python-mode/django/settings/date-input-formats b/python-mode/django/settings/date-input-formats new file mode 100644 index 00000000..68cf18e7 --- /dev/null +++ b/python-mode/django/settings/date-input-formats @@ -0,0 +1,17 @@ +# -*- mode: snippet -*- +# name: DATE_INPUT_FORMATS - Default formats to be used when parsing dates from input boxes, in order. +# key: djs +# uuid: django-settings-date-input-formats +# group: django-settings +# -- +# Default formats to be used when parsing dates from input boxes, in order +# See all available format string here: +# https://docs.python.org/library/datetime.html#strftime-behavior +# * Note that these format strings are different from the ones to display dates +DATE_INPUT_FORMATS = [ + '%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', # '2006-10-25', '10/25/2006', '10/25/06' + '%b %d %Y', '%b %d, %Y', # 'Oct 25 2006', 'Oct 25, 2006' + '%d %b %Y', '%d %b, %Y', # '25 Oct 2006', '25 Oct, 2006' + '%B %d %Y', '%B %d, %Y', # 'October 25 2006', 'October 25, 2006' + '%d %B %Y', '%d %B, %Y', # '25 October 2006', '25 October, 2006' +] diff --git a/python-mode/django/settings/date-input-formats-dot b/python-mode/django/settings/date-input-formats-dot new file mode 100644 index 00000000..a566657a --- /dev/null +++ b/python-mode/django/settings/date-input-formats-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DATE_INPUT_FORMATS - Default formats to be used when parsing dates from input boxes, in order. +# key: settings. +# uuid: django-settings-date-input-formats-dot +# group: django-settings-dot +# -- +settings.DATE_INPUT_FORMATS \ No newline at end of file diff --git a/python-mode/django/settings/datetime-format b/python-mode/django/settings/datetime-format new file mode 100644 index 00000000..aae672b2 --- /dev/null +++ b/python-mode/django/settings/datetime-format @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: DATETIME_FORMAT - Default formatting for datetime objects. +# key: djs +# uuid: django-settings-datetime-format +# group: django-settings +# -- +# Default formatting for datetime objects. See all available format strings here: +# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date +DATETIME_FORMAT = 'N j, Y, P' diff --git a/python-mode/django/settings/datetime-format-dot b/python-mode/django/settings/datetime-format-dot new file mode 100644 index 00000000..0b28999a --- /dev/null +++ b/python-mode/django/settings/datetime-format-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DATETIME_FORMAT - Default formatting for datetime objects. +# key: settings. +# uuid: django-settings-datetime-format-dot +# group: django-settings-dot +# -- +settings.DATETIME_FORMAT diff --git a/python-mode/django/settings/datetime-input-formats b/python-mode/django/settings/datetime-input-formats new file mode 100644 index 00000000..ea58d5a4 --- /dev/null +++ b/python-mode/django/settings/datetime-input-formats @@ -0,0 +1,22 @@ +# -*- mode: snippet -*- +# name: DATETIME_INPUT_FORMATS - Default formats to be used when parsing dates and times from input boxes, +# key: djs +# uuid: django-settings-datetime-input-formats +# group: django-settings +# -- +# Default formats to be used when parsing dates and times from input boxes, +# in order +# See all available format string here: +# https://docs.python.org/library/datetime.html#strftime-behavior +# * Note that these format strings are different from the ones to display dates +DATETIME_INPUT_FORMATS = [ + '%Y-%m-%d %H:%M:%S', # '2006-10-25 14:30:59' + '%Y-%m-%d %H:%M:%S.%f', # '2006-10-25 14:30:59.000200' + '%Y-%m-%d %H:%M', # '2006-10-25 14:30' + '%m/%d/%Y %H:%M:%S', # '10/25/2006 14:30:59' + '%m/%d/%Y %H:%M:%S.%f', # '10/25/2006 14:30:59.000200' + '%m/%d/%Y %H:%M', # '10/25/2006 14:30' + '%m/%d/%y %H:%M:%S', # '10/25/06 14:30:59' + '%m/%d/%y %H:%M:%S.%f', # '10/25/06 14:30:59.000200' + '%m/%d/%y %H:%M', # '10/25/06 14:30' +] \ No newline at end of file diff --git a/python-mode/django/settings/datetime-input-formats-dot b/python-mode/django/settings/datetime-input-formats-dot new file mode 100644 index 00000000..5fcef240 --- /dev/null +++ b/python-mode/django/settings/datetime-input-formats-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DATETIME_INPUT_FORMATS - Default formats to be used when parsing dates and times from input boxes, +# key: settings. +# uuid: django-settings-datetime-input-formats-dot +# group: django-settings-dot +# -- +settings.DATETIME_INPUT_FORMATS \ No newline at end of file diff --git a/python-mode/django/settings/debug b/python-mode/django/settings/debug new file mode 100644 index 00000000..1289e463 --- /dev/null +++ b/python-mode/django/settings/debug @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DEBUG - A boolean that turns on/off debug mode. +# key: djs +# uuid: django-settings-debug +# group: django-settings +# -- +DEBUG = False diff --git a/python-mode/django/settings/debug-dot b/python-mode/django/settings/debug-dot new file mode 100644 index 00000000..17d89013 --- /dev/null +++ b/python-mode/django/settings/debug-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DEBUG - A boolean that turns on/off debug mode. +# key: settings. +# uuid: django-settings-debug-dot +# group: django-settings-dot +# -- +settings.DEBUG diff --git a/python-mode/django/settings/debug-propagate-exceptions b/python-mode/django/settings/debug-propagate-exceptions new file mode 100644 index 00000000..6086b930 --- /dev/null +++ b/python-mode/django/settings/debug-propagate-exceptions @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: DEBUG_PROPAGATE_EXCEPTIONS - Whether the framework should propagate raw exceptions rather than catching them. +# key: djs +# uuid: django-setting-debug-prop-exc +# group: django-settings +# -- +# Whether the framework should propagate raw exceptions rather than catching +# them. This is useful under some testing situations and should never be used +# on a live site. +DEBUG_PROPAGATE_EXCEPTIONS = False diff --git a/python-mode/django/settings/debug-propagate-exceptions-dot b/python-mode/django/settings/debug-propagate-exceptions-dot new file mode 100644 index 00000000..17dda8bd --- /dev/null +++ b/python-mode/django/settings/debug-propagate-exceptions-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DEBUG_PROPAGATE_EXCEPTIONS - Whether the framework should propagate raw exceptions rather than catching them. +# key: settings. +# uuid: django-setting-debug-prop-exc-dot +# group: django-settings-dot +# -- +settings.DEBUG_PROPAGATE_EXCEPTIONS diff --git a/python-mode/django/settings/decimal-separator b/python-mode/django/settings/decimal-separator new file mode 100644 index 00000000..bdff7e7d --- /dev/null +++ b/python-mode/django/settings/decimal-separator @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: DECIMAL_SEPARATOR - Decimal separator symbol. +# key: djs +# uuid: django-settings-decimal-separator +# group: django-settings +# -- +# Decimal separator symbol +DECIMAL_SEPARATOR = '.' \ No newline at end of file diff --git a/python-mode/django/settings/decimal-separator-dot b/python-mode/django/settings/decimal-separator-dot new file mode 100644 index 00000000..d7fe601f --- /dev/null +++ b/python-mode/django/settings/decimal-separator-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DECIMAL_SEPARATOR - Decimal separator symbol. +# key: settings. +# uuid: django-settings-decimal-separator-dot +# group: django-settings-dot +# -- +settings.DECIMAL_SEPARATOR \ No newline at end of file diff --git a/python-mode/django/settings/default-charset b/python-mode/django/settings/default-charset new file mode 100644 index 00000000..383f4e72 --- /dev/null +++ b/python-mode/django/settings/default-charset @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: DEFAULT_CHARSET - Default charset to use for all HttpResponse objects +# key: djs +# uuid: django-settings-default-charset +# -- +# Default charset to use for all HttpResponse objects, if a MIME type isn't +# manually specified. It's used to construct the Content-Type header. +DEFAULT_CHARSET = 'utf-8' \ No newline at end of file diff --git a/python-mode/django/settings/default-charset-dot b/python-mode/django/settings/default-charset-dot new file mode 100644 index 00000000..dc8f09a3 --- /dev/null +++ b/python-mode/django/settings/default-charset-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DEFAULT_CHARSET - Default charset to use for all HttpResponse objects +# key: settings. +# uuid: django-settings-default-charset-dot +# uuid: django-settings-dot +# --- +settings.DEFAULT_CHARSET \ No newline at end of file diff --git a/python-mode/django/settings/default-exception-reporter b/python-mode/django/settings/default-exception-reporter new file mode 100644 index 00000000..a8b2909d --- /dev/null +++ b/python-mode/django/settings/default-exception-reporter @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: DEFAULT_EXCEPTION_REPORTER - Default exception reporter class used +# key: djs +# uuid: django-settings-default-exception-reporter +# group: django-settings +# -- +# Default exception reporter class used in case none has been +# specifically assigned to the HttpRequest instance. +DEFAULT_EXCEPTION_REPORTER = 'django.views.debug.ExceptionReporter' \ No newline at end of file diff --git a/python-mode/django/settings/default-exception-reporter-dot b/python-mode/django/settings/default-exception-reporter-dot new file mode 100644 index 00000000..b356c70f --- /dev/null +++ b/python-mode/django/settings/default-exception-reporter-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DEFAULT_EXCEPTION_REPORTER - Default exception reporter class used +# key: settings. +# uuid: django-settings-default-exception-reporter-dot +# group: django-settings-dot +# -- +settings.DEFAULT_EXCEPTION_REPORTER \ No newline at end of file diff --git a/python-mode/django/settings/default-exception-reporter-filter b/python-mode/django/settings/default-exception-reporter-filter new file mode 100644 index 00000000..b68bfa2f --- /dev/null +++ b/python-mode/django/settings/default-exception-reporter-filter @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: DEFAULT_EXCEPTION_REPORTER_FILTER - Default exception reporter filter class used +# key: djs +# uuid: django-settings-default-exception-reporter-filter +# group: django-settings +# -- +# Default exception reporter filter class used in case none has been +# specifically assigned to the HttpRequest instance. +DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter' \ No newline at end of file diff --git a/python-mode/django/settings/default-exception-reporter-filter-dot b/python-mode/django/settings/default-exception-reporter-filter-dot new file mode 100644 index 00000000..513a25a0 --- /dev/null +++ b/python-mode/django/settings/default-exception-reporter-filter-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DEFAULT_EXCEPTION_REPORTER_FILTER - Default exception reporter filter class used +# key: settings. +# uuid: django-settings-default-exception-reporter-filter-dot +# group: django-settings-dot +# -- +settings.DEFAULT_EXCEPTION_REPORTER_FILTER \ No newline at end of file diff --git a/python-mode/django/settings/default-file-storage b/python-mode/django/settings/default-file-storage new file mode 100644 index 00000000..aedd4a14 --- /dev/null +++ b/python-mode/django/settings/default-file-storage @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: DEFAULT_FILE_STORAGE - Default file storage mechanism that holds media. +# key: djs +# uuid: django-settings-default-file-storage +# group: django-settings +# -- +# Default file storage mechanism that holds media. +DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage' diff --git a/python-mode/django/settings/default-file-storage-dot b/python-mode/django/settings/default-file-storage-dot new file mode 100644 index 00000000..7b126b13 --- /dev/null +++ b/python-mode/django/settings/default-file-storage-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DEFAULT_FILE_STORAGE - Default file storage mechanism that holds media. +# key: settings. +# uuid: django-settings-default-file-storage-dot +# group: django-settings-dot +# -- +settings.DEFAULT_FILE_STORAGE diff --git a/python-mode/django/settings/default-from-email b/python-mode/django/settings/default-from-email new file mode 100644 index 00000000..72f23357 --- /dev/null +++ b/python-mode/django/settings/default-from-email @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: DEFAULT_FROM_EMAIL - Default email address to use for various automated correspondence from the site managers. +# key: djs +# uuid: django-settings-default-from-email +# group: django-settings +# -- +# Default email address to use for various automated correspondence from +# the site managers. +DEFAULT_FROM_EMAIL = 'webmaster@localhost' \ No newline at end of file diff --git a/python-mode/django/settings/default-from-email-dot b/python-mode/django/settings/default-from-email-dot new file mode 100644 index 00000000..6bfb2768 --- /dev/null +++ b/python-mode/django/settings/default-from-email-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DEFAULT_FROM_EMAIL - Default email address to use for various automated correspondence from the site managers. +# key: settings. +# uuid: django-settings-default-from-email-dot +# group: django-settings-dot +# -- +settings.DEFAULT_FROM_EMAIL \ No newline at end of file diff --git a/python-mode/django/settings/default-index-tablespace b/python-mode/django/settings/default-index-tablespace new file mode 100644 index 00000000..86819c25 --- /dev/null +++ b/python-mode/django/settings/default-index-tablespace @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DEFAULT_INDEX_TABLESPACE +# key: djs +# uuid: django-settings-default-index-tablespace +# group: django-settings +# -- +DEFAULT_INDEX_TABLESPACE = '' \ No newline at end of file diff --git a/python-mode/django/settings/default-index-tablespace-dot b/python-mode/django/settings/default-index-tablespace-dot new file mode 100644 index 00000000..25de49b4 --- /dev/null +++ b/python-mode/django/settings/default-index-tablespace-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DEFAULT_INDEX_TABLESPACE +# key: settings. +# uuid: django-settings-default-index-tablespace-dot +# group: django-settings-dot +# -- +settings.DEFAULT_INDEX_TABLESPACE \ No newline at end of file diff --git a/python-mode/django/settings/default-tablespace b/python-mode/django/settings/default-tablespace new file mode 100644 index 00000000..6d11580c --- /dev/null +++ b/python-mode/django/settings/default-tablespace @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: DEFAULT_TABLESPACE - The tablespaces to use for each model when not specified otherwise. +# key: djs +# uuid: django-settings-default-tablespace +# group: django-settings +# -- +# The tablespaces to use for each model when not specified otherwise. +DEFAULT_TABLESPACE = '' \ No newline at end of file diff --git a/python-mode/django/settings/default-tablespace-dot b/python-mode/django/settings/default-tablespace-dot new file mode 100644 index 00000000..0c4c6bfb --- /dev/null +++ b/python-mode/django/settings/default-tablespace-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DEFAULT_TABLESPACE - The tablespaces to use for each model when not specified otherwise. +# key: settings. +# uuid: django-settings-default-tablespace-dot +# group: django-settings-dot +# -- +settings.DEFAULT_TABLESPACE \ No newline at end of file diff --git a/python-mode/django/settings/disallow-user-agents b/python-mode/django/settings/disallow-user-agents new file mode 100644 index 00000000..ea793cd9 --- /dev/null +++ b/python-mode/django/settings/disallow-user-agents @@ -0,0 +1,19 @@ +# -*- mode: snippet -*- +# name: DISALLOWED_USER_AGENTS - List of compiled regular expression objects representing User-Agent strings. +# key: djs +# uuid: django-settings-disallowed-user-agents +# group: django-settings +# -- +# List of compiled regular expression objects representing User-Agent strings +# that are not allowed to visit any page, systemwide. Use this for bad +# robots/crawlers. Here are a few examples: +# import re +# DISALLOWED_USER_AGENTS = [ +# re.compile(r'^NaverBot.*'), +# re.compile(r'^EmailSiphon.*'), +# re.compile(r'^SiteSucker.*'), +# re.compile(r'^sohu-search'), +# ] +DISALLOWED_USER_AGENTS = [ + $0 +] \ No newline at end of file diff --git a/python-mode/django/settings/disallow-user-agents-dot b/python-mode/django/settings/disallow-user-agents-dot new file mode 100644 index 00000000..bd3c651e --- /dev/null +++ b/python-mode/django/settings/disallow-user-agents-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: DISALLOWED_USER_AGENTS - List of compiled regular expression objects representing User-Agent strings. +# key: settings. +# uuid: django-settings-disallowed-user-agents-dot +# group: django-settings-dot +# -- +settings.DISALLOWED_USER_AGENTS \ No newline at end of file diff --git a/python-mode/django/settings/email-backend b/python-mode/django/settings/email-backend new file mode 100644 index 00000000..f01d8612 --- /dev/null +++ b/python-mode/django/settings/email-backend @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: EMAIL_BACKEND - The email backend to use. +# key: djs +# uuid: django-settings-email-backend +# group: django-settings +# -- +# The email backend to use. For possible shortcuts see django.core.mail. +# The default is to use the SMTP backend. +# Third-party backends can be specified by providing a Python path +# to a module that defines an EmailBackend class. +EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' \ No newline at end of file diff --git a/python-mode/django/settings/email-backend-dot b/python-mode/django/settings/email-backend-dot new file mode 100644 index 00000000..23d28003 --- /dev/null +++ b/python-mode/django/settings/email-backend-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_BACKEND - The email backend to use. +# key: settings. +# uuid: django-settings-email-backend-dot +# group: django-settings-dot +# -- +settings.EMAIL_BACKEND \ No newline at end of file diff --git a/python-mode/django/settings/email-host b/python-mode/django/settings/email-host new file mode 100644 index 00000000..00592a57 --- /dev/null +++ b/python-mode/django/settings/email-host @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: EMAIL_HOST - Host for sending email. +# key: djs +# uuid: django-settings-email-host +# group: django-settings +# -- +# Host for sending email. +EMAIL_HOST = 'localhost' \ No newline at end of file diff --git a/python-mode/django/settings/email-host-dot b/python-mode/django/settings/email-host-dot new file mode 100644 index 00000000..9bafe7b0 --- /dev/null +++ b/python-mode/django/settings/email-host-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_HOST - Host for sending email. +# key: settings. +# uuid: django-settings-email-host-dot +# group: django-settings-dot +# -- +settings.EMAIL_HOST \ No newline at end of file diff --git a/python-mode/django/settings/email-host-password b/python-mode/django/settings/email-host-password new file mode 100644 index 00000000..6fe4f63a --- /dev/null +++ b/python-mode/django/settings/email-host-password @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_HOST_PASSWORD - Optional SMTP authentication information for EMAIL_HOST. +# key: djs +# uuid: django-settings-email-host-password +# group: django-settings +# -- +EMAIL_HOST_PASSWORD = '' \ No newline at end of file diff --git a/python-mode/django/settings/email-host-password-dot b/python-mode/django/settings/email-host-password-dot new file mode 100644 index 00000000..73e71137 --- /dev/null +++ b/python-mode/django/settings/email-host-password-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_HOST_PASSWORD - Optional SMTP authentication information for EMAIL_HOST. +# key: settings. +# uuid: django-settings-email-host-password-dot +# group: django-settings-dot +# -- +settings.EMAIL_HOST_PASSWORD \ No newline at end of file diff --git a/python-mode/django/settings/email-host-user b/python-mode/django/settings/email-host-user new file mode 100644 index 00000000..6783c52a --- /dev/null +++ b/python-mode/django/settings/email-host-user @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_HOST_USER - Optional SMTP authentication information for EMAIL_HOST. +# key: djs +# uuid: django-settings-email-host-user +# group: django-settings +# -- +EMAIL_HOST_USER = '' diff --git a/python-mode/django/settings/email-host-user-dot b/python-mode/django/settings/email-host-user-dot new file mode 100644 index 00000000..85c2ebbf --- /dev/null +++ b/python-mode/django/settings/email-host-user-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_HOST_USER - Optional SMTP authentication information for EMAIL_HOST. +# key: settings. +# uuid: django-settings-email-host-user-dot +# group: django-settings-dot +# -- +settings.EMAIL_HOST_USER diff --git a/python-mode/django/settings/email-port b/python-mode/django/settings/email-port new file mode 100644 index 00000000..53ddf32c --- /dev/null +++ b/python-mode/django/settings/email-port @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: EMAIL_PORT - Port for sending email. +# key: djs +# uuid: django-settings-email-port +# group: django-settings +# -- +# Port for sending email. +EMAIL_PORT = 25 \ No newline at end of file diff --git a/python-mode/django/settings/email-port-dot b/python-mode/django/settings/email-port-dot new file mode 100644 index 00000000..642bb4be --- /dev/null +++ b/python-mode/django/settings/email-port-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_PORT - Port for sending email. +# key: settings. +# uuid: django-settings-email-port-dot +# group: django-settings-dot +# -- +settings.EMAIL_PORT \ No newline at end of file diff --git a/python-mode/django/settings/email-ssl-certfile b/python-mode/django/settings/email-ssl-certfile new file mode 100644 index 00000000..4bb507f3 --- /dev/null +++ b/python-mode/django/settings/email-ssl-certfile @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_SSL_CERTFILE - Optional SMTP authentication information for EMAIL_HOST. +# key: djs +# uuid: django-settings-email-ssl-certfile +# group: django-settings +# -- +EMAIL_SSL_CERTFILE = None diff --git a/python-mode/django/settings/email-ssl-certfile-dot b/python-mode/django/settings/email-ssl-certfile-dot new file mode 100644 index 00000000..6a1794cf --- /dev/null +++ b/python-mode/django/settings/email-ssl-certfile-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_SSL_CERTFILE - Optional SMTP authentication information for EMAIL_HOST. +# key: settings. +# uuid: django-settings-email-ssl-certfile-dot +# group: django-settings-dot +# -- +settings.EMAIL_SSL_CERTFILE diff --git a/python-mode/django/settings/email-ssl-keyfile b/python-mode/django/settings/email-ssl-keyfile new file mode 100644 index 00000000..6646ffcf --- /dev/null +++ b/python-mode/django/settings/email-ssl-keyfile @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_SSL_KEYFILE - Optional SMTP authentication information for EMAIL_HOST. +# key: djs +# uuid: django-settings-email-ssl-keyfile +# group: django-settings +# -- +EMAIL_SSL_KEYFILE = None \ No newline at end of file diff --git a/python-mode/django/settings/email-ssl-keyfile-dot b/python-mode/django/settings/email-ssl-keyfile-dot new file mode 100644 index 00000000..82d049bd --- /dev/null +++ b/python-mode/django/settings/email-ssl-keyfile-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_SSL_KEYFILE - Optional SMTP authentication information for EMAIL_HOST. +# key: settings. +# uuid: django-settings-email-ssl-keyfile-dot +# group: django-settings-dot +# -- +settings.EMAIL_SSL_KEYFILE \ No newline at end of file diff --git a/python-mode/django/settings/email-subject-prefix b/python-mode/django/settings/email-subject-prefix new file mode 100644 index 00000000..9fb88037 --- /dev/null +++ b/python-mode/django/settings/email-subject-prefix @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: EMAIL_SUBJECT_PREFIX - Subject-line prefix for email messages. +# key: djs +# uuid: django-settings-email-subject-prefix +# group: django-settings +# -- +# Subject-line prefix for email messages send with django.core.mail.mail_admins +# or ...mail_managers. Make sure to include the trailing space. +EMAIL_SUBJECT_PREFIX = '[Django] ' diff --git a/python-mode/django/settings/email-subject-prefix-dot b/python-mode/django/settings/email-subject-prefix-dot new file mode 100644 index 00000000..27f2eea1 --- /dev/null +++ b/python-mode/django/settings/email-subject-prefix-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_SUBJECT_PREFIX - Subject-line prefix for email messages. +# key: settings. +# uuid: django-settings-email-subject-prefix-dot +# group: django-settings-dot +# -- +settings.EMAIL_SUBJECT_PREFIX diff --git a/python-mode/django/settings/email-timeout b/python-mode/django/settings/email-timeout new file mode 100644 index 00000000..a7d9b2f6 --- /dev/null +++ b/python-mode/django/settings/email-timeout @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_TIMEOUT - Optional SMTP authentication information for EMAIL_HOST. +# key: djs +# uuid: django-settings-email-timeout +# group: django-settings +# -- +EMAIL_TIMEOUT = None diff --git a/python-mode/django/settings/email-timeout-dot b/python-mode/django/settings/email-timeout-dot new file mode 100644 index 00000000..885d5962 --- /dev/null +++ b/python-mode/django/settings/email-timeout-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_TIMEOUT - Optional SMTP authentication information for EMAIL_HOST. +# key: settings. +# uuid: django-settings-email-timeout-dot +# group: django-settings-dot +# -- +settings.EMAIL_TIMEOUT diff --git a/python-mode/django/settings/email-use-localtime b/python-mode/django/settings/email-use-localtime new file mode 100644 index 00000000..eaf10955 --- /dev/null +++ b/python-mode/django/settings/email-use-localtime @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: EMAIL_USE_LOCALTIME - Whether to send SMTP 'Date' header in the local time zone or in UTC. +# key: djs +# uuid: django-settings-email-use-localtime +# group: django-settings +# -- +# Whether to send SMTP 'Date' header in the local time zone or in UTC. +EMAIL_USE_LOCALTIME = False diff --git a/python-mode/django/settings/email-use-localtime-dot b/python-mode/django/settings/email-use-localtime-dot new file mode 100644 index 00000000..866eb76f --- /dev/null +++ b/python-mode/django/settings/email-use-localtime-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_USE_LOCALTIME - Whether to send SMTP 'Date' header in the local time zone or in UTC. +# key: settings. +# uuid: django-settings-email-use-localtime-dot +# group: django-settings-dot +# -- +settings.EMAIL_USE_LOCALTIME diff --git a/python-mode/django/settings/email-use-ssl b/python-mode/django/settings/email-use-ssl new file mode 100644 index 00000000..d75f4ddc --- /dev/null +++ b/python-mode/django/settings/email-use-ssl @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_USE_SSL - Optional SMTP authentication information for EMAIL_HOST. +# key: djs +# uuid: django-settings-email-use-ssl +# group: django-settings +# -- +EMAIL_USE_SSL = False \ No newline at end of file diff --git a/python-mode/django/settings/email-use-ssl-dot b/python-mode/django/settings/email-use-ssl-dot new file mode 100644 index 00000000..991ee905 --- /dev/null +++ b/python-mode/django/settings/email-use-ssl-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_USE_SSL - Optional SMTP authentication information for EMAIL_HOST. +# key: settings. +# uuid: django-settings-email-use-ssl-dot +# group: django-settings-dot +# -- +settings.EMAIL_USE_SSL \ No newline at end of file diff --git a/python-mode/django/settings/email-use-tls b/python-mode/django/settings/email-use-tls new file mode 100644 index 00000000..8c41cc1f --- /dev/null +++ b/python-mode/django/settings/email-use-tls @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_USE_TLS - Optional SMTP authentication information for EMAIL_HOST. +# key: djs +# uuid: django-settings-email-use-tls +# group: django-settings +# -- +EMAIL_USE_TLS = False \ No newline at end of file diff --git a/python-mode/django/settings/email-use-tls-dot b/python-mode/django/settings/email-use-tls-dot new file mode 100644 index 00000000..616db9e3 --- /dev/null +++ b/python-mode/django/settings/email-use-tls-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: EMAIL_USE_TLS - Optional SMTP authentication information for EMAIL_HOST. +# key: settings. +# uuid: django-settings-email-use-tls-dot +# group: django-settings-dot +# -- +settings.EMAIL_USE_TLS \ No newline at end of file diff --git a/python-mode/django/settings/file-upload-directory-permissions b/python-mode/django/settings/file-upload-directory-permissions new file mode 100644 index 00000000..c465a80b --- /dev/null +++ b/python-mode/django/settings/file-upload-directory-permissions @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: FILE_UPLOAD_DIRECTORY_PERMISSIONS - The numeric mode to assign to newly-created directories, when uploading files. +# key: djs +# uuid: django-settings-file-upload-directory-permissions +# group: django-settings +# -- +# The numeric mode to assign to newly-created directories, when uploading files. +# The value should be a mode as you'd pass to os.chmod; +# see https://docs.python.org/library/os.html#files-and-directories. +FILE_UPLOAD_DIRECTORY_PERMISSIONS = None diff --git a/python-mode/django/settings/file-upload-directory-permissions-dot b/python-mode/django/settings/file-upload-directory-permissions-dot new file mode 100644 index 00000000..21b74970 --- /dev/null +++ b/python-mode/django/settings/file-upload-directory-permissions-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: FILE_UPLOAD_DIRECTORY_PERMISSIONS - The numeric mode to assign to newly-created directories, when uploading files. +# key: settings. +# uuid: django-settings-file-upload-directory-permissions-dot +# group: django-settings-dot +# -- +settings.FILE_UPLOAD_DIRECTORY_PERMISSIONS diff --git a/python-mode/django/settings/file-upload-handlers b/python-mode/django/settings/file-upload-handlers new file mode 100644 index 00000000..bf8148c6 --- /dev/null +++ b/python-mode/django/settings/file-upload-handlers @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: FILE_UPLOAD_HANDLERS - List of upload handler classes to be applied in order. +# key: djs +# uuid: django-settings-file-upload-handlers +# group: django-settings +# -- +# List of upload handler classes to be applied in order. +FILE_UPLOAD_HANDLERS = [ + 'django.core.files.uploadhandler.MemoryFileUploadHandler', + 'django.core.files.uploadhandler.TemporaryFileUploadHandler', +] diff --git a/python-mode/django/settings/file-upload-handlers-dot b/python-mode/django/settings/file-upload-handlers-dot new file mode 100644 index 00000000..0a8942b5 --- /dev/null +++ b/python-mode/django/settings/file-upload-handlers-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: FILE_UPLOAD_HANDLERS - List of upload handler classes to be applied in order. +# key: settings. +# uuid: django-settings-file-upload-handlers-dot +# group: django-settings-dot +# -- +settings.FILE_UPLOAD_HANDLERS diff --git a/python-mode/django/settings/file-upload-max-memory-size b/python-mode/django/settings/file-upload-max-memory-size new file mode 100644 index 00000000..c60c7889 --- /dev/null +++ b/python-mode/django/settings/file-upload-max-memory-size @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: FILE_UPLOAD_MAX_MEMORY_SIZE - file system instead of into memory. +# key: djs +# uuid: django-settings-file-upload-max-memory-size +# group: django-settings +# -- +# file system instead of into memory. +FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 # i.e. 2.5 MB \ No newline at end of file diff --git a/python-mode/django/settings/file-upload-max-memory-size-dot b/python-mode/django/settings/file-upload-max-memory-size-dot new file mode 100644 index 00000000..8aadbe3e --- /dev/null +++ b/python-mode/django/settings/file-upload-max-memory-size-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: FILE_UPLOAD_MAX_MEMORY_SIZE - file system instead of into memory. +# key: settings. +# uuid: django-settings-file-upload-max-memory-size-dot +# group: django-settings-dot +# -- +settings.FILE_UPLOAD_MAX_MEMORY_SIZE \ No newline at end of file diff --git a/python-mode/django/settings/file-upload-permissions b/python-mode/django/settings/file-upload-permissions new file mode 100644 index 00000000..cfc0cd9f --- /dev/null +++ b/python-mode/django/settings/file-upload-permissions @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: FILE_UPLOAD_PERMISSIONS - The numeric mode to set newly-uploaded files to. +# key: djs +# uuid: django-settings-file-upload-permissions +# group: django-settings +# -- +# The numeric mode to set newly-uploaded files to. The value should be a mode +# you'd pass directly to os.chmod; see https://docs.python.org/library/os.html#files-and-directories. +FILE_UPLOAD_PERMISSIONS = 0o644 \ No newline at end of file diff --git a/python-mode/django/settings/file-upload-permissions-dot b/python-mode/django/settings/file-upload-permissions-dot new file mode 100644 index 00000000..4aae9938 --- /dev/null +++ b/python-mode/django/settings/file-upload-permissions-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: FILE_UPLOAD_PERMISSIONS - The numeric mode to set newly-uploaded files to. +# key: settings. +# uuid: django-settings-file-upload-permissions-dot +# group: django-settings-dot +# -- +settings.FILE_UPLOAD_PERMISSIONS \ No newline at end of file diff --git a/python-mode/django/settings/file-upload-temp-dir b/python-mode/django/settings/file-upload-temp-dir new file mode 100644 index 00000000..00d3dc70 --- /dev/null +++ b/python-mode/django/settings/file-upload-temp-dir @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: FILE_UPLOAD_TEMP_DIR - Directory in which upload streamed files will be temporarily saved. +# key: djs +# uuid: django-settings-file-upload-temp-dir +# group: django-settings +# -- +# Directory in which upload streamed files will be temporarily saved. A value of +# `None` will make Django use the operating system's default temporary directory +# (i.e. "/tmp" on *nix systems). +FILE_UPLOAD_TEMP_DIR = None \ No newline at end of file diff --git a/python-mode/django/settings/file-upload-temp-dir-dot b/python-mode/django/settings/file-upload-temp-dir-dot new file mode 100644 index 00000000..2b2052b6 --- /dev/null +++ b/python-mode/django/settings/file-upload-temp-dir-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: FILE_UPLOAD_TEMP_DIR - Directory in which upload streamed files will be temporarily saved. +# key: settings. +# uuid: django-settings-file-upload-temp-dir-dot +# group: django-settings-dot +# -- +settings.FILE_UPLOAD_TEMP_DIR \ No newline at end of file diff --git a/python-mode/django/settings/first-day-of-week b/python-mode/django/settings/first-day-of-week new file mode 100644 index 00000000..c64750e1 --- /dev/null +++ b/python-mode/django/settings/first-day-of-week @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: FIRST_DAY_OF_WEEK - First day of week, to be used on calendars. +# key: djs +# uuid: django-settings-first-day-of-week +# group: django-settings +# -- +# First day of week, to be used on calendars +# 0 means Sunday, 1 means Monday... +FIRST_DAY_OF_WEEK = 0 diff --git a/python-mode/django/settings/first-day-of-week-dot b/python-mode/django/settings/first-day-of-week-dot new file mode 100644 index 00000000..38fa889f --- /dev/null +++ b/python-mode/django/settings/first-day-of-week-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: FIRST_DAY_OF_WEEK - First day of week, to be used on calendars. +# key: settings. +# uuid: django-settings-first-day-of-week-dot +# group: django-settings-dot +# -- +settings.FIRST_DAY_OF_WEEK diff --git a/python-mode/django/settings/fixture-dirs b/python-mode/django/settings/fixture-dirs new file mode 100644 index 00000000..6036c399 --- /dev/null +++ b/python-mode/django/settings/fixture-dirs @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: FIXTURE_DIRS - The list of directories to search for fixtures +# key: djs +# uuid: django-settings-fixture-dirs +# group: django-settings +# -- +# The list of directories to search for fixtures +FIXTURE_DIRS = [ + $0 +] \ No newline at end of file diff --git a/python-mode/django/settings/fixture-dirs-dot b/python-mode/django/settings/fixture-dirs-dot new file mode 100644 index 00000000..ce1d4ba5 --- /dev/null +++ b/python-mode/django/settings/fixture-dirs-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: FIXTURE_DIRS - The list of directories to search for fixtures +# key: settings. +# uuid: django-settings-fixture-dirs-dot +# group: django-settings-dot +# -- +settings.FIXTURE_DIRS \ No newline at end of file diff --git a/python-mode/django/settings/force-script-name b/python-mode/django/settings/force-script-name new file mode 100644 index 00000000..7d47f021 --- /dev/null +++ b/python-mode/django/settings/force-script-name @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: FORCE_SCRIPT_NAME - Whether to prepend the "www." subdomain to URLs that don't have it. +# key: djs +# uuid: django-settings-force-script-name +# group: django-settings +# -- +# Override the server-derived value of SCRIPT_NAME +FORCE_SCRIPT_NAME = None \ No newline at end of file diff --git a/python-mode/django/settings/force-script-name-dot b/python-mode/django/settings/force-script-name-dot new file mode 100644 index 00000000..9a58d774 --- /dev/null +++ b/python-mode/django/settings/force-script-name-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: FORCE_SCRIPT_NAME - Whether to prepend the "www." subdomain to URLs that don't have it. +# key: settings. +# uuid: django-settings-force-script-name-dot +# group: django-settings-dot +# -- +settings.FORCE_SCRIPT_NAME \ No newline at end of file diff --git a/python-mode/django/settings/form-renderer b/python-mode/django/settings/form-renderer new file mode 100644 index 00000000..67f18e8a --- /dev/null +++ b/python-mode/django/settings/form-renderer @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: FORM_RENDERER - Default form rendering class. +# key: djs +# uuid: django-settings-form-renderer +# group: django-settings +# -- +# Default form rendering class. +FORM_RENDERER = 'django.forms.renderers.DjangoTemplates' \ No newline at end of file diff --git a/python-mode/django/settings/form-renderer-dot b/python-mode/django/settings/form-renderer-dot new file mode 100644 index 00000000..6353889b --- /dev/null +++ b/python-mode/django/settings/form-renderer-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: FORM_RENDERER - Default form rendering class. +# key: settings. +# uuid: django-settings-form-renderer-dot +# group: django-settings-dot +# -- +settings.FORM_RENDERER \ No newline at end of file diff --git a/python-mode/django/settings/format-module-path b/python-mode/django/settings/format-module-path new file mode 100644 index 00000000..7cfb300b --- /dev/null +++ b/python-mode/django/settings/format-module-path @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: FORMAT_MODULE_PATH - Python module path where user will place custom format definition. +# key: djs +# uuid: django-settings-format-module-path +# group: django-settings +# -- +# Python module path where user will place custom format definition. +# The directory where this setting is pointing should contain subdirectories +# named as the locales, containing a formats.py file +# (i.e. "myproject.locale" for myproject/locale/en/formats.py etc. use) +FORMAT_MODULE_PATH = None diff --git a/python-mode/django/settings/format-module-path-dot b/python-mode/django/settings/format-module-path-dot new file mode 100644 index 00000000..4f34011f --- /dev/null +++ b/python-mode/django/settings/format-module-path-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: FORMAT_MODULE_PATH - Python module path where user will place custom format definition. +# key: settings. +# uuid: django-settings-format-module-path-dot +# group: django-settings-dot +# -- +settings.FORMAT_MODULE_PATH diff --git a/python-mode/django/settings/ignoreable-404-urls b/python-mode/django/settings/ignoreable-404-urls new file mode 100644 index 00000000..3783603d --- /dev/null +++ b/python-mode/django/settings/ignoreable-404-urls @@ -0,0 +1,19 @@ +# -*- mode: snippet -*- +# name: IGNORABLE_404_URLS - List of compiled regular expression objects representing URLs that need not be reported by BrokenLinkEmailsMiddleware. +# key: djs +# uuid: django-settings-ignorable-404-urls +# group: django-settings +# -- +# List of compiled regular expression objects representing URLs that need not +# be reported by BrokenLinkEmailsMiddleware. Here are a few examples: +# import re +# IGNORABLE_404_URLS = [ +# re.compile(r'^/apple-touch-icon.*\.png$'), +# re.compile(r'^/favicon.ico$'), +# re.compile(r'^/robots.txt$'), +# re.compile(r'^/phpmyadmin/'), +# re.compile(r'\.(cgi|php|pl)$'), +# ] +IGNORABLE_404_URLS = [ + $0 +] \ No newline at end of file diff --git a/python-mode/django/settings/ignoreable-404-urls-dot b/python-mode/django/settings/ignoreable-404-urls-dot new file mode 100644 index 00000000..34bd01ac --- /dev/null +++ b/python-mode/django/settings/ignoreable-404-urls-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: IGNORABLE_404_URLS - List of compiled regular expression objects representing URLs that need not be reported by BrokenLinkEmailsMiddleware. +# key: settings. +# uuid: django-settings-ignorable-404-urls-dot +# group: django-settings-dot +# -- +settings.IGNORABLE_404_URLS \ No newline at end of file diff --git a/python-mode/django/settings/installed-apps b/python-mode/django/settings/installed-apps new file mode 100644 index 00000000..7aa27e34 --- /dev/null +++ b/python-mode/django/settings/installed-apps @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: INSTALLED_APPS - List of strings representing installed apps. +# key: djs +# uuid: django-settings-installed-apps +# group: django-settings +# -- +# List of strings representing installed apps. +INSTALLED_APPS = [ + $0 +] \ No newline at end of file diff --git a/python-mode/django/settings/installed-apps-dot b/python-mode/django/settings/installed-apps-dot new file mode 100644 index 00000000..cb42aa43 --- /dev/null +++ b/python-mode/django/settings/installed-apps-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: INSTALLED_APPS - List of strings representing installed apps. +# key: settings. +# uuid: django-settings-installed-apps-dot +# group: django-settings-dot +# -- +settings.INSTALLED_APPS \ No newline at end of file diff --git a/python-mode/django/settings/intermal-ips b/python-mode/django/settings/intermal-ips new file mode 100644 index 00000000..876830fb --- /dev/null +++ b/python-mode/django/settings/intermal-ips @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: INTERNAL_IPS - List of IP addresses, as strings +# key: djs +# uuid: django-settings-internal-ips +# group: django-settings +# -- +# List of IP addresses, as strings, that: +# * See debug comments, when DEBUG is true +# * Receive x-headers +INTERNAL_IPS = [$0] diff --git a/python-mode/django/settings/intermal-ips-dot b/python-mode/django/settings/intermal-ips-dot new file mode 100644 index 00000000..2a3ed431 --- /dev/null +++ b/python-mode/django/settings/intermal-ips-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: INTERNAL_IPS - List of IP addresses, as strings +# key: settings. +# uuid: django-settings-internal-ips-dot +# group: django-settings-dot +# -- +settings.INTERNAL_IPS diff --git a/python-mode/django/settings/language-code b/python-mode/django/settings/language-code new file mode 100644 index 00000000..cf808fcf --- /dev/null +++ b/python-mode/django/settings/language-code @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_CODE - Language code for this installation. +# key: djs +# uuid: django-settings-language-code +# group: django-settings +# -- +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html +LANGUAGE_CODE = 'en-us' diff --git a/python-mode/django/settings/language-code-dot b/python-mode/django/settings/language-code-dot new file mode 100644 index 00000000..9d41288b --- /dev/null +++ b/python-mode/django/settings/language-code-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_CODE - Language code for this installation. +# key: settings. +# uuid: django-settings-language-code-dot +# group: django-settings-dot +# -- +settings.LANGUAGE_CODE diff --git a/python-mode/django/settings/language-cookie-age b/python-mode/django/settings/language-cookie-age new file mode 100644 index 00000000..2a1651fe --- /dev/null +++ b/python-mode/django/settings/language-cookie-age @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_COOKIE_AGE +# key: djs +# uuid: django-settings-language-cookie-age +# group: django-settings +# -- +LANGUAGE_COOKIE_AGE = None \ No newline at end of file diff --git a/python-mode/django/settings/language-cookie-age-dot b/python-mode/django/settings/language-cookie-age-dot new file mode 100644 index 00000000..cb669e62 --- /dev/null +++ b/python-mode/django/settings/language-cookie-age-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_COOKIE_AGE +# key: settings. +# uuid: django-settings-language-cookie-age-dot +# group: django-settings-dot +# -- +settings.LANGUAGE_COOKIE_AGE \ No newline at end of file diff --git a/python-mode/django/settings/language-cookie-domain b/python-mode/django/settings/language-cookie-domain new file mode 100644 index 00000000..b611a2e1 --- /dev/null +++ b/python-mode/django/settings/language-cookie-domain @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_COOKIE_DOMAIN +# key: djs +# uuid: django-settings-language-cookie-domain +# group: django-settings +# -- +LANGUAGE_COOKIE_DOMAIN = None diff --git a/python-mode/django/settings/language-cookie-domain-dot b/python-mode/django/settings/language-cookie-domain-dot new file mode 100644 index 00000000..80efa622 --- /dev/null +++ b/python-mode/django/settings/language-cookie-domain-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_COOKIE_DOMAIN +# key: settings. +# uuid: django-settings-language-cookie-domain-dot +# group: django-settings-dot +# -- +settings.LANGUAGE_COOKIE_DOMAIN diff --git a/python-mode/django/settings/language-cookie-httponly b/python-mode/django/settings/language-cookie-httponly new file mode 100644 index 00000000..df375e3a --- /dev/null +++ b/python-mode/django/settings/language-cookie-httponly @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_COOKIE_HTTPONLY +# key: djs +# uuid: django-settings-language-cookie-httponly +# group: django-settings +# -- +LANGUAGE_COOKIE_HTTPONLY = False \ No newline at end of file diff --git a/python-mode/django/settings/language-cookie-httponly-dot b/python-mode/django/settings/language-cookie-httponly-dot new file mode 100644 index 00000000..17b989f6 --- /dev/null +++ b/python-mode/django/settings/language-cookie-httponly-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_COOKIE_HTTPONLY +# key: settings. +# uuid: django-settings-language-cookie-httponly-dot +# group: django-settings-dot +# -- +settings.LANGUAGE_COOKIE_HTTPONLY \ No newline at end of file diff --git a/python-mode/django/settings/language-cookie-name b/python-mode/django/settings/language-cookie-name new file mode 100644 index 00000000..5f1ab84b --- /dev/null +++ b/python-mode/django/settings/language-cookie-name @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_COOKIE_NAME +# key: djs +# uuid: django-settings-language-cookie-name +# group: django-settings +# -- +LANGUAGE_COOKIE_NAME = 'django_language' diff --git a/python-mode/django/settings/language-cookie-name-dot b/python-mode/django/settings/language-cookie-name-dot new file mode 100644 index 00000000..b82cd8ff --- /dev/null +++ b/python-mode/django/settings/language-cookie-name-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_COOKIE_NAME +# key: settings. +# uuid: django-settings-language-cookie-name-dot +# group: django-settings-dot +# -- +settings.LANGUAGE_COOKIE_NAME diff --git a/python-mode/django/settings/language-cookie-path b/python-mode/django/settings/language-cookie-path new file mode 100644 index 00000000..297ee956 --- /dev/null +++ b/python-mode/django/settings/language-cookie-path @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_COOKIE_PATH +# key: djs +# uuid: django-settings-language-cookie-path +# group: django-settings +# -- +LANGUAGE_COOKIE_PATH = '/' \ No newline at end of file diff --git a/python-mode/django/settings/language-cookie-path-dot b/python-mode/django/settings/language-cookie-path-dot new file mode 100644 index 00000000..ebdf29b2 --- /dev/null +++ b/python-mode/django/settings/language-cookie-path-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_COOKIE_PATH +# key: settings. +# uuid: django-settings-language-cookie-path-dot +# group: django-settings-dot +# -- +settings.LANGUAGE_COOKIE_PATH \ No newline at end of file diff --git a/python-mode/django/settings/language-cookie-samesite b/python-mode/django/settings/language-cookie-samesite new file mode 100644 index 00000000..599352ab --- /dev/null +++ b/python-mode/django/settings/language-cookie-samesite @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_COOKIE_SAMESITE +# key: djs +# uuid: django-settings-language-cookie-samesite +# group: django-settings +# -- +LANGUAGE_COOKIE_SAMESITE = None \ No newline at end of file diff --git a/python-mode/django/settings/language-cookie-samesite-dot b/python-mode/django/settings/language-cookie-samesite-dot new file mode 100644 index 00000000..123e6e21 --- /dev/null +++ b/python-mode/django/settings/language-cookie-samesite-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_COOKIE_SAMESITE +# key: settings. +# uuid: django-settings-language-cookie-samesite-dot +# group: django-settings-dot +# -- +settings.LANGUAGE_COOKIE_SAMESITE diff --git a/python-mode/django/settings/language-cookie-secure b/python-mode/django/settings/language-cookie-secure new file mode 100644 index 00000000..8c0f92c2 --- /dev/null +++ b/python-mode/django/settings/language-cookie-secure @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_COOKIE_SECURE +# key: djs +# uuid: django-settings-language-cookie-secure +# group: django-settings +# -- +LANGUAGE_COOKIE_SECURE = False diff --git a/python-mode/django/settings/language-cookie-secure-dot b/python-mode/django/settings/language-cookie-secure-dot new file mode 100644 index 00000000..e67db774 --- /dev/null +++ b/python-mode/django/settings/language-cookie-secure-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGE_COOKIE_SECURE +# key: settings. +# uuid: django-settings-language-cookie-secure-dot +# group: django-settings-dot +# -- +settings.LANGUAGE_COOKIE_SECURE diff --git a/python-mode/django/settings/languages b/python-mode/django/settings/languages new file mode 100644 index 00000000..17c4443b --- /dev/null +++ b/python-mode/django/settings/languages @@ -0,0 +1,101 @@ +# -*- mode: snippet -*- +# name: LANGUAGES - Languages we provide translations for, out of the box. +# key: djs +# uuid: django-settings-languages +# group: django-settings +# -- +# Languages we provide translations for, out of the box. +LANGUAGES = [ + ('af', gettext_noop('Afrikaans')), + ('ar', gettext_noop('Arabic')), + ('ar-dz', gettext_noop('Algerian Arabic')), + ('ast', gettext_noop('Asturian')), + ('az', gettext_noop('Azerbaijani')), + ('bg', gettext_noop('Bulgarian')), + ('be', gettext_noop('Belarusian')), + ('bn', gettext_noop('Bengali')), + ('br', gettext_noop('Breton')), + ('bs', gettext_noop('Bosnian')), + ('ca', gettext_noop('Catalan')), + ('cs', gettext_noop('Czech')), + ('cy', gettext_noop('Welsh')), + ('da', gettext_noop('Danish')), + ('de', gettext_noop('German')), + ('dsb', gettext_noop('Lower Sorbian')), + ('el', gettext_noop('Greek')), + ('en', gettext_noop('English')), + ('en-au', gettext_noop('Australian English')), + ('en-gb', gettext_noop('British English')), + ('eo', gettext_noop('Esperanto')), + ('es', gettext_noop('Spanish')), + ('es-ar', gettext_noop('Argentinian Spanish')), + ('es-co', gettext_noop('Colombian Spanish')), + ('es-mx', gettext_noop('Mexican Spanish')), + ('es-ni', gettext_noop('Nicaraguan Spanish')), + ('es-ve', gettext_noop('Venezuelan Spanish')), + ('et', gettext_noop('Estonian')), + ('eu', gettext_noop('Basque')), + ('fa', gettext_noop('Persian')), + ('fi', gettext_noop('Finnish')), + ('fr', gettext_noop('French')), + ('fy', gettext_noop('Frisian')), + ('ga', gettext_noop('Irish')), + ('gd', gettext_noop('Scottish Gaelic')), + ('gl', gettext_noop('Galician')), + ('he', gettext_noop('Hebrew')), + ('hi', gettext_noop('Hindi')), + ('hr', gettext_noop('Croatian')), + ('hsb', gettext_noop('Upper Sorbian')), + ('hu', gettext_noop('Hungarian')), + ('hy', gettext_noop('Armenian')), + ('ia', gettext_noop('Interlingua')), + ('id', gettext_noop('Indonesian')), + ('io', gettext_noop('Ido')), + ('is', gettext_noop('Icelandic')), + ('it', gettext_noop('Italian')), + ('ja', gettext_noop('Japanese')), + ('ka', gettext_noop('Georgian')), + ('kab', gettext_noop('Kabyle')), + ('kk', gettext_noop('Kazakh')), + ('km', gettext_noop('Khmer')), + ('kn', gettext_noop('Kannada')), + ('ko', gettext_noop('Korean')), + ('lb', gettext_noop('Luxembourgish')), + ('lt', gettext_noop('Lithuanian')), + ('lv', gettext_noop('Latvian')), + ('mk', gettext_noop('Macedonian')), + ('ml', gettext_noop('Malayalam')), + ('mn', gettext_noop('Mongolian')), + ('mr', gettext_noop('Marathi')), + ('my', gettext_noop('Burmese')), + ('nb', gettext_noop('Norwegian Bokmål')), + ('ne', gettext_noop('Nepali')), + ('nl', gettext_noop('Dutch')), + ('nn', gettext_noop('Norwegian Nynorsk')), + ('os', gettext_noop('Ossetic')), + ('pa', gettext_noop('Punjabi')), + ('pl', gettext_noop('Polish')), + ('pt', gettext_noop('Portuguese')), + ('pt-br', gettext_noop('Brazilian Portuguese')), + ('ro', gettext_noop('Romanian')), + ('ru', gettext_noop('Russian')), + ('sk', gettext_noop('Slovak')), + ('sl', gettext_noop('Slovenian')), + ('sq', gettext_noop('Albanian')), + ('sr', gettext_noop('Serbian')), + ('sr-latn', gettext_noop('Serbian Latin')), + ('sv', gettext_noop('Swedish')), + ('sw', gettext_noop('Swahili')), + ('ta', gettext_noop('Tamil')), + ('te', gettext_noop('Telugu')), + ('th', gettext_noop('Thai')), + ('tr', gettext_noop('Turkish')), + ('tt', gettext_noop('Tatar')), + ('udm', gettext_noop('Udmurt')), + ('uk', gettext_noop('Ukrainian')), + ('ur', gettext_noop('Urdu')), + ('uz', gettext_noop('Uzbek')), + ('vi', gettext_noop('Vietnamese')), + ('zh-hans', gettext_noop('Simplified Chinese')), + ('zh-hant', gettext_noop('Traditional Chinese')), +] \ No newline at end of file diff --git a/python-mode/django/settings/languages-bidi b/python-mode/django/settings/languages-bidi new file mode 100644 index 00000000..e91a612b --- /dev/null +++ b/python-mode/django/settings/languages-bidi @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: LANGUAGES_BIDI - Languages using BiDi (right-to-left) layout +# key: djs +# uuid: django-settings-langages-bidi +# group: django-settings +# -- +# Languages using BiDi (right-to-left) layout +LANGUAGES_BIDI = ["he", "ar", "ar-dz", "fa", "ur"] diff --git a/python-mode/django/settings/languages-bidi-dot b/python-mode/django/settings/languages-bidi-dot new file mode 100644 index 00000000..d0bc56dc --- /dev/null +++ b/python-mode/django/settings/languages-bidi-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGES_BIDI - Languages using BiDi (right-to-left) layout +# key: settings. +# uuid: django-settings-langages-bidi-dot +# group: django-settings-dot +# -- +settings.LANGUAGES_BIDI diff --git a/python-mode/django/settings/languages-dot b/python-mode/django/settings/languages-dot new file mode 100644 index 00000000..3ed7edf1 --- /dev/null +++ b/python-mode/django/settings/languages-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LANGUAGES - Languages we provide translations for, out of the box. +# key: settings. +# uuid: django-settings-languages-dot +# group: django-settings-dot +# -- +settings.LANGUAGES \ No newline at end of file diff --git a/python-mode/django/settings/locale-paths b/python-mode/django/settings/locale-paths new file mode 100644 index 00000000..06bdc39e --- /dev/null +++ b/python-mode/django/settings/locale-paths @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LOCALE_PATHS +# key: djs +# uuid: django-settings-locale-paths +# group: django-settings +# -- +LOCALE_PATHS = [] \ No newline at end of file diff --git a/python-mode/django/settings/locale-paths-dot b/python-mode/django/settings/locale-paths-dot new file mode 100644 index 00000000..1f67c780 --- /dev/null +++ b/python-mode/django/settings/locale-paths-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LOCALE_PATHS +# key: settings. +# uuid: django-settings-locale-paths-dot +# group: django-settings-dot +# -- +settings.LOCALE_PATHS \ No newline at end of file diff --git a/python-mode/django/settings/logging b/python-mode/django/settings/logging new file mode 100644 index 00000000..ec48b765 --- /dev/null +++ b/python-mode/django/settings/logging @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: LOGGING - Custom logging configuration. +# key: djs +# uuid: django-settings-logging +# group: django-settings +# -- +# Custom logging configuration. +LOGGING = {} diff --git a/python-mode/django/settings/logging-config b/python-mode/django/settings/logging-config new file mode 100644 index 00000000..e48d6a56 --- /dev/null +++ b/python-mode/django/settings/logging-config @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: LOGGING_CONFIG - The callable to use to configure logging +# key: djs +# uuid: django-settings-logging-config +# group: django-settings +# -- +# The callable to use to configure logging +LOGGING_CONFIG = 'logging.config.dictConfig' \ No newline at end of file diff --git a/python-mode/django/settings/logging-config-dot b/python-mode/django/settings/logging-config-dot new file mode 100644 index 00000000..1de7f13c --- /dev/null +++ b/python-mode/django/settings/logging-config-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LOGGING_CONFIG - The callable to use to configure logging +# key: settings. +# uuid: django-settings-logging-config-dot +# group: django-settings-dot +# -- +settings.LOGGING_CONFIG \ No newline at end of file diff --git a/python-mode/django/settings/logging-dot b/python-mode/django/settings/logging-dot new file mode 100644 index 00000000..33b21aef --- /dev/null +++ b/python-mode/django/settings/logging-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LOGGING - Custom logging configuration. +# key: settings. +# uuid: django-settings-logging-dot +# group: django-settings-dot +# -- +settings.LOGGING diff --git a/python-mode/django/settings/login-redirect-url b/python-mode/django/settings/login-redirect-url new file mode 100644 index 00000000..a24cdd59 --- /dev/null +++ b/python-mode/django/settings/login-redirect-url @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LOGIN_REDIRECT_URL +# key: djs +# uuid: django-settings-login-redirect-url +# group: django-settings +# -- +LOGIN_REDIRECT_URL = '/accounts/profile/' \ No newline at end of file diff --git a/python-mode/django/settings/login-redirect-url-dot b/python-mode/django/settings/login-redirect-url-dot new file mode 100644 index 00000000..331e8d52 --- /dev/null +++ b/python-mode/django/settings/login-redirect-url-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LOGIN_REDIRECT_URL +# key: settings. +# uuid: django-settings-login-redirect-url-dot +# group: django-settings-dot +# -- +settings.LOGIN_REDIRECT_URL \ No newline at end of file diff --git a/python-mode/django/settings/login-url b/python-mode/django/settings/login-url new file mode 100644 index 00000000..539fbb6f --- /dev/null +++ b/python-mode/django/settings/login-url @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LOGIN_URL +# key: djs +# uuid: django-settings-login-url +# group: django-settings +# -- +LOGIN_URL = '/accounts/login/' \ No newline at end of file diff --git a/python-mode/django/settings/login-url-dot b/python-mode/django/settings/login-url-dot new file mode 100644 index 00000000..66f33c5b --- /dev/null +++ b/python-mode/django/settings/login-url-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LOGIN_URL +# key: settings. +# uuid: django-settings-login-url-dot +# group: django-settings-dot +# -- +settings.LOGIN_URL \ No newline at end of file diff --git a/python-mode/django/settings/logout-redirect-url b/python-mode/django/settings/logout-redirect-url new file mode 100644 index 00000000..57d555c1 --- /dev/null +++ b/python-mode/django/settings/logout-redirect-url @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LOGOUT_REDIRECT_URL +# key: djs +# uuid: django-settings-logout-redirect-url +# group: django-settings +# -- +LOGOUT_REDIRECT_URL = None \ No newline at end of file diff --git a/python-mode/django/settings/logout-redirect-url-dot b/python-mode/django/settings/logout-redirect-url-dot new file mode 100644 index 00000000..75c8281e --- /dev/null +++ b/python-mode/django/settings/logout-redirect-url-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: LOGOUT_REDIRECT_URL +# key: settings. +# uuid: django-settings-logout-redirect-url-dot +# group: django-settings-dot +# -- +settings.LOGOUT_REDIRECT_URL \ No newline at end of file diff --git a/python-mode/django/settings/managers b/python-mode/django/settings/managers new file mode 100644 index 00000000..1cd82d97 --- /dev/null +++ b/python-mode/django/settings/managers @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: MANAGERS - Not-necessarily-technical managers of the site. +# key: djs +# uuid: django-settings-managers +# group: django-settings +# -- +# Not-necessarily-technical managers of the site. They get broken link +# notifications and other various emails. +MANAGERS = ADMINS \ No newline at end of file diff --git a/python-mode/django/settings/managers-dot b/python-mode/django/settings/managers-dot new file mode 100644 index 00000000..2eba652c --- /dev/null +++ b/python-mode/django/settings/managers-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: MANAGERS - Not-necessarily-technical managers of the site. +# key: settings. +# uuid: django-settings-managers-dot +# group: django-settings-dot +# -- +settings.MANAGERS \ No newline at end of file diff --git a/python-mode/django/settings/media-root b/python-mode/django/settings/media-root new file mode 100644 index 00000000..59cf3111 --- /dev/null +++ b/python-mode/django/settings/media-root @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: MEDIA_ROOT - Absolute filesystem path to the directory that will hold user-uploaded files. +# key: djs +# uuid: django-settings-media-root +# group: django-settings +# -- +# Absolute filesystem path to the directory that will hold user-uploaded files. +# Example: "/var/www/example.com/media/" +MEDIA_ROOT = '$0' \ No newline at end of file diff --git a/python-mode/django/settings/media-root-dot b/python-mode/django/settings/media-root-dot new file mode 100644 index 00000000..a43376bd --- /dev/null +++ b/python-mode/django/settings/media-root-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: MEDIA_ROOT - Absolute filesystem path to the directory that will hold user-uploaded files. +# key: settings. +# uuid: django-settings-media-root-dot +# group: django-settings-dot +# -- +settings.MEDIA_ROOT \ No newline at end of file diff --git a/python-mode/django/settings/media-url b/python-mode/django/settings/media-url new file mode 100644 index 00000000..0e64b293 --- /dev/null +++ b/python-mode/django/settings/media-url @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: MEDIA_URL - URL that handles the media served from MEDIA_ROOT. +# key: djs +# uuid: django-settings-media-url +# group: django-settings +# -- +# URL that handles the media served from MEDIA_ROOT. +# Examples: "http://example.com/media/", "http://media.example.com/" +MEDIA_URL = '$0' \ No newline at end of file diff --git a/python-mode/django/settings/media-url-dot b/python-mode/django/settings/media-url-dot new file mode 100644 index 00000000..6fe21e22 --- /dev/null +++ b/python-mode/django/settings/media-url-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: MEDIA_URL - URL that handles the media served from MEDIA_ROOT. +# key: settings. +# uuid: django-settings-media-url-dot +# group: django-settings-dot +# -- +settings.MEDIA_URL \ No newline at end of file diff --git a/python-mode/django/settings/message-storage b/python-mode/django/settings/message-storage new file mode 100644 index 00000000..cfe74174 --- /dev/null +++ b/python-mode/django/settings/message-storage @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: MESSAGE_STORAGE - Class to use as messages backend +# key: djs +# uuid: django-settings-message-storage +# group: django-settings +# -- +# Class to use as messages backend +MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage' \ No newline at end of file diff --git a/python-mode/django/settings/message-storage-dot b/python-mode/django/settings/message-storage-dot new file mode 100644 index 00000000..89b621ed --- /dev/null +++ b/python-mode/django/settings/message-storage-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: MESSAGE_STORAGE - Class to use as messages backend +# key: settings. +# uuid: django-settings-message-storage-dot +# group: django-settings-dot +# -- +settings.MESSAGE_STORAGE \ No newline at end of file diff --git a/python-mode/django/settings/middleware b/python-mode/django/settings/middleware new file mode 100644 index 00000000..2fe8b453 --- /dev/null +++ b/python-mode/django/settings/middleware @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: MIDDLEWARE - List of middleware to use. +# key: djs +# uuid: django-settings-middleware +# group: django-settings +# -- +# List of middleware to use. Order is important; in the request phase, these +# middleware will be applied in the order given, and in the response +# phase the middleware will be applied in reverse order. +MIDDLEWARE = [] diff --git a/python-mode/django/settings/middleware-dot b/python-mode/django/settings/middleware-dot new file mode 100644 index 00000000..555e94cb --- /dev/null +++ b/python-mode/django/settings/middleware-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: MIDDLEWARE - List of middleware to use. +# key: settings. +# uuid: django-settings-middleware-dot +# group: django-settings-dot +# -- +settings.MIDDLEWARE diff --git a/python-mode/django/settings/migration-modules b/python-mode/django/settings/migration-modules new file mode 100644 index 00000000..26e5a60b --- /dev/null +++ b/python-mode/django/settings/migration-modules @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: MIGRATION_MODULES - Migration module overrides for apps, by app label. +# key: djs +# uuid: django-settings-migration-modules +# group: django-settings +# -- +# Migration module overrides for apps, by app label. +MIGRATION_MODULES = {} \ No newline at end of file diff --git a/python-mode/django/settings/migration-modules-dot b/python-mode/django/settings/migration-modules-dot new file mode 100644 index 00000000..766cf5d0 --- /dev/null +++ b/python-mode/django/settings/migration-modules-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: MIGRATION_MODULES - Migration module overrides for apps, by app label. +# key: settings. +# uuid: django-settings-migration-modules-dot +# group: django-settings-dot +# -- +settings.MIGRATION_MODULES \ No newline at end of file diff --git a/python-mode/django/settings/month-day-format b/python-mode/django/settings/month-day-format new file mode 100644 index 00000000..c180cde3 --- /dev/null +++ b/python-mode/django/settings/month-day-format @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: MONTH_DAY_FORMAT - Default formatting for date objects when only the month and day are relevant. +# key: djs +# uuid: django-settings-month-day-format +# group: django-settings +# -- +# Default formatting for date objects when only the month and day are relevant. +# See all available format strings here: +# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date +MONTH_DAY_FORMAT = 'F j' \ No newline at end of file diff --git a/python-mode/django/settings/month-day-format-dot b/python-mode/django/settings/month-day-format-dot new file mode 100644 index 00000000..12a8c83b --- /dev/null +++ b/python-mode/django/settings/month-day-format-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: MONTH_DAY_FORMAT - Default formatting for date objects when only the month and day are relevant. +# key: settings. +# uuid: django-settings-month-day-format-dot +# group: django-settings-dot +# -- +settings.MONTH_DAY_FORMAT \ No newline at end of file diff --git a/python-mode/django/settings/number-grouping b/python-mode/django/settings/number-grouping new file mode 100644 index 00000000..cc45f793 --- /dev/null +++ b/python-mode/django/settings/number-grouping @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: NUMBER_GROUPING - Number of digits that will be together +# key: djs +# uuid: django-settings-number-grouping +# group: django-settings +# -- +# Number of digits that will be together, when splitting them by +# THOUSAND_SEPARATOR. 0 means no grouping, 3 means splitting by thousands... +NUMBER_GROUPING = 0 \ No newline at end of file diff --git a/python-mode/django/settings/number-grouping-dot b/python-mode/django/settings/number-grouping-dot new file mode 100644 index 00000000..6e877b9a --- /dev/null +++ b/python-mode/django/settings/number-grouping-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: NUMBER_GROUPING - Number of digits that will be together +# key: settings. +# uuid: django-settings-number-grouping-dot +# group: django-settings-dot +# -- +settings.NUMBER_GROUPING \ No newline at end of file diff --git a/python-mode/django/settings/password-hashers b/python-mode/django/settings/password-hashers new file mode 100644 index 00000000..d72eca3d --- /dev/null +++ b/python-mode/django/settings/password-hashers @@ -0,0 +1,15 @@ +# -*- mode: snippet -*- +# name: PASSWORD_HASHERS +# key: djs +# uuid: django-settings-password-hashers +# group: django-settings +# -- +# the first hasher in this list is the preferred algorithm. any +# password using different algorithms will be converted automatically +# upon login +PASSWORD_HASHERS = [ + 'django.contrib.auth.hashers.PBKDF2PasswordHasher', + 'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher', + 'django.contrib.auth.hashers.Argon2PasswordHasher', + 'django.contrib.auth.hashers.BCryptSHA256PasswordHasher', +] \ No newline at end of file diff --git a/python-mode/django/settings/password-hashers-dot b/python-mode/django/settings/password-hashers-dot new file mode 100644 index 00000000..e8227f8c --- /dev/null +++ b/python-mode/django/settings/password-hashers-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: PASSWORD_HASHERS +# key: settings. +# uuid: django-settings-password-hashers-dot +# group: django-settings-dot +# -- +settings.PASSWORD_HASHERS \ No newline at end of file diff --git a/python-mode/django/settings/password-reset-timeout b/python-mode/django/settings/password-reset-timeout new file mode 100644 index 00000000..5b647e3a --- /dev/null +++ b/python-mode/django/settings/password-reset-timeout @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: PASSWORD_RESET_TIMEOUT - The minimum number of seconds a password reset link is valid for +# key: djs +# uuid: django-settings-password-reset-timeout +# group: django-settings +# -- +# The minimum number of seconds a password reset link is valid for +# (default: 3 days). +PASSWORD_RESET_TIMEOUT = 60 * 60 * 24 * 3 \ No newline at end of file diff --git a/python-mode/django/settings/password-reset-timeout-days b/python-mode/django/settings/password-reset-timeout-days new file mode 100644 index 00000000..c5be2113 --- /dev/null +++ b/python-mode/django/settings/password-reset-timeout-days @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: PASSWORD_RESET_TIMEOUT_DAYS - The number of days a password reset link is valid for +# key: djs +# uuid: django-settings-password-reset-timeout-days +# group: django-settings +# -- +# The number of days a password reset link is valid for +PASSWORD_RESET_TIMEOUT_DAYS = 3 \ No newline at end of file diff --git a/python-mode/django/settings/password-reset-timeout-days-dot b/python-mode/django/settings/password-reset-timeout-days-dot new file mode 100644 index 00000000..54000bde --- /dev/null +++ b/python-mode/django/settings/password-reset-timeout-days-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: PASSWORD_RESET_TIMEOUT_DAYS - The number of days a password reset link is valid for +# key: settings. +# uuid: django-settings-password-reset-timeout-days-dot +# group: django-settings-dot +# -- +settings.PASSWORD_RESET_TIMEOUT_DAYS \ No newline at end of file diff --git a/python-mode/django/settings/password-reset-timeout-dot b/python-mode/django/settings/password-reset-timeout-dot new file mode 100644 index 00000000..98b79b75 --- /dev/null +++ b/python-mode/django/settings/password-reset-timeout-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: PASSWORD_RESET_TIMEOUT - The minimum number of seconds a password reset link is valid for +# key: settings. +# uuid: django-settings-password-reset-timeout-dot +# group: django-settings-dot +# -- +settings.PASSWORD_RESET_TIMEOUT \ No newline at end of file diff --git a/python-mode/django/settings/prepend-www b/python-mode/django/settings/prepend-www new file mode 100644 index 00000000..39b9fc84 --- /dev/null +++ b/python-mode/django/settings/prepend-www @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: PREPEND_WWW - Whether to append trailing slashes to URLs. +# key: djs +# uuid: django-settings-prepend-www +# group: django-settings +# -- +# Whether to append trailing slashes to URLs. +APPEND_SLASH = True diff --git a/python-mode/django/settings/prepend-www-dot b/python-mode/django/settings/prepend-www-dot new file mode 100644 index 00000000..847838ca --- /dev/null +++ b/python-mode/django/settings/prepend-www-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: PREPEND_WWW - Whether to append trailing slashes to URLs. +# key: settings. +# uuid: django-settings-prepend-www-dot +# group: django-settings-dot +# -- +settings.PREPEND_WWW diff --git a/python-mode/django/settings/secret-key b/python-mode/django/settings/secret-key new file mode 100644 index 00000000..da9577f1 --- /dev/null +++ b/python-mode/django/settings/secret-key @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: SECRET_KEY - A secret key for this particular Django installation. +# key: djs +# uuid: django-settings-secert-key +# group: django-settings +# -- +# A secret key for this particular Django installation. Used in secret-key +# hashing algorithms. Set this in your settings, or Django will complain +# loudly. +SECRET_KEY = '' \ No newline at end of file diff --git a/python-mode/django/settings/secret-key-dot b/python-mode/django/settings/secret-key-dot new file mode 100644 index 00000000..58bd5cb9 --- /dev/null +++ b/python-mode/django/settings/secret-key-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECRET_KEY - A secret key for this particular Django installation. +# key: settings. +# uuid: django-settings-secert-key-dot +# group: django-settings-dot +# -- +settings.SECRET_KEY \ No newline at end of file diff --git a/python-mode/django/settings/secure-browser-xss-filter b/python-mode/django/settings/secure-browser-xss-filter new file mode 100644 index 00000000..e0273c75 --- /dev/null +++ b/python-mode/django/settings/secure-browser-xss-filter @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_BROWSER_XSS_FILTER +# key: djs +# uuid: django-settings-secure-browser-xss-filter +# group: django-settings +# -- +SECURE_BROWSER_XSS_FILTER = False \ No newline at end of file diff --git a/python-mode/django/settings/secure-browser-xss-filter-dot b/python-mode/django/settings/secure-browser-xss-filter-dot new file mode 100644 index 00000000..bb9ced00 --- /dev/null +++ b/python-mode/django/settings/secure-browser-xss-filter-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_BROWSER_XSS_FILTER +# key: settings. +# uuid: django-settings-secure-browser-xss-filter-dot +# group: django-settings-dot +# -- +settings.SECURE_BROWSER_XSS_FILTER \ No newline at end of file diff --git a/python-mode/django/settings/secure-content-type-nosniff b/python-mode/django/settings/secure-content-type-nosniff new file mode 100644 index 00000000..ec3159c5 --- /dev/null +++ b/python-mode/django/settings/secure-content-type-nosniff @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_CONTENT_TYPE_NOSNIFF +# key: djs +# uuid: django-settings-secure-content-type-nosniff +# group: django-settings +# -- +SECURE_CONTENT_TYPE_NOSNIFF = True \ No newline at end of file diff --git a/python-mode/django/settings/secure-content-type-nosniff-dot b/python-mode/django/settings/secure-content-type-nosniff-dot new file mode 100644 index 00000000..71ab01f4 --- /dev/null +++ b/python-mode/django/settings/secure-content-type-nosniff-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_CONTENT_TYPE_NOSNIFF +# key: settings. +# uuid: django-settings-secure-content-type-nosniff-dot +# group: django-settings-dot +# -- +settings.SECURE_CONTENT_TYPE_NOSNIFF \ No newline at end of file diff --git a/python-mode/django/settings/secure-hsts-include-subdomains b/python-mode/django/settings/secure-hsts-include-subdomains new file mode 100644 index 00000000..ea7b1960 --- /dev/null +++ b/python-mode/django/settings/secure-hsts-include-subdomains @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_HSTS_INCLUDE_SUBDOMAINS +# key: djs +# uuid: django-settings-secure-hsts-include-subdomains +# group: django-settings +# -- +SECURE_HSTS_INCLUDE_SUBDOMAINS = False \ No newline at end of file diff --git a/python-mode/django/settings/secure-hsts-include-subdomains-dot b/python-mode/django/settings/secure-hsts-include-subdomains-dot new file mode 100644 index 00000000..a15b250d --- /dev/null +++ b/python-mode/django/settings/secure-hsts-include-subdomains-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_HSTS_INCLUDE_SUBDOMAINS +# key: settings. +# uuid: django-settings-secure-hsts-include-subdomains-dot +# group: django-settings-dot +# -- +settings.SECURE_HSTS_INCLUDE_SUBDOMAINS \ No newline at end of file diff --git a/python-mode/django/settings/secure-hsts-preload b/python-mode/django/settings/secure-hsts-preload new file mode 100644 index 00000000..bd762461 --- /dev/null +++ b/python-mode/django/settings/secure-hsts-preload @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_HSTS_PRELOAD +# key: djs +# uuid: django-settings-secure-hsts-preload +# group: django-settings +# -- +SECURE_HSTS_PRELOAD = False \ No newline at end of file diff --git a/python-mode/django/settings/secure-hsts-preload-dot b/python-mode/django/settings/secure-hsts-preload-dot new file mode 100644 index 00000000..15d63c6f --- /dev/null +++ b/python-mode/django/settings/secure-hsts-preload-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_HSTS_PRELOAD +# key: settings. +# uuid: django-settings-secure-hsts-preload-dot +# group: django-settings-dot +# -- +settings.SECURE_HSTS_PRELOAD \ No newline at end of file diff --git a/python-mode/django/settings/secure-hsts-seconds b/python-mode/django/settings/secure-hsts-seconds new file mode 100644 index 00000000..6486f639 --- /dev/null +++ b/python-mode/django/settings/secure-hsts-seconds @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_HSTS_SECONDS +# key: djs +# uuid: django-settings-secure-hsts-seconds +# group: django-settings +# -- +SECURE_HSTS_SECONDS = 0 \ No newline at end of file diff --git a/python-mode/django/settings/secure-hsts-seconds-dot b/python-mode/django/settings/secure-hsts-seconds-dot new file mode 100644 index 00000000..0f81bb10 --- /dev/null +++ b/python-mode/django/settings/secure-hsts-seconds-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_HSTS_SECONDS +# key: settings. +# uuid: django-settings-secure-hsts-seconds-dot +# group: django-settings-dot +# -- +settings.SECURE_HSTS_SECONDS \ No newline at end of file diff --git a/python-mode/django/settings/secure-proxy-ssl-header b/python-mode/django/settings/secure-proxy-ssl-header new file mode 100644 index 00000000..c4c16827 --- /dev/null +++ b/python-mode/django/settings/secure-proxy-ssl-header @@ -0,0 +1,14 @@ +# -*- mode: snippet -*- +# name: SECURE_PROXY_SSL_HEADER - WARNING! Only set this if you fully understand what you're doing. +# key: djs +# uuid: django-settings-secure-proxy-ssl-header +# group: django-settings +# -- +# If your Django app is behind a proxy that sets a header to specify secure +# connections, AND that proxy ensures that user-submitted headers with the +# same name are ignored (so that people can't spoof it), set this value to +# a tuple of (header_name, header_value). For any requests that come in with +# that header/value, request.is_secure() will return True. +# WARNING! Only set this if you fully understand what you're doing. Otherwise, +# you may be opening yourself up to a security risk. +SECURE_PROXY_SSL_HEADER = None diff --git a/python-mode/django/settings/secure-proxy-ssl-header-dot b/python-mode/django/settings/secure-proxy-ssl-header-dot new file mode 100644 index 00000000..77eb1e04 --- /dev/null +++ b/python-mode/django/settings/secure-proxy-ssl-header-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_PROXY_SSL_HEADER - WARNING! Only set this if you fully understand what you're doing. +# key: settings. +# uuid: django-settings-secure-proxy-ssl-header-dot +# group: django-settings-dot +# -- +settings.SECURE_PROXY_SSL_HEADER diff --git a/python-mode/django/settings/secure-redirect-exempt b/python-mode/django/settings/secure-redirect-exempt new file mode 100644 index 00000000..2c0df779 --- /dev/null +++ b/python-mode/django/settings/secure-redirect-exempt @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_REDIRECT_EXEMPT +# key: djs +# uuid: django-settings-secure-redirect-exempt +# group: django-settings +# -- +SECURE_REDIRECT_EXEMPT = [] \ No newline at end of file diff --git a/python-mode/django/settings/secure-redirect-exempt-dot b/python-mode/django/settings/secure-redirect-exempt-dot new file mode 100644 index 00000000..47c0143a --- /dev/null +++ b/python-mode/django/settings/secure-redirect-exempt-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_REDIRECT_EXEMPT +# key: settings. +# uuid: django-settings-secure-redirect-exempt-dot +# group: django-settings-dot +# -- +settings.SECURE_REDIRECT_EXEMPT \ No newline at end of file diff --git a/python-mode/django/settings/secure-referrer-policy b/python-mode/django/settings/secure-referrer-policy new file mode 100644 index 00000000..7e1cd191 --- /dev/null +++ b/python-mode/django/settings/secure-referrer-policy @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_REFERRER_POLICY +# key: djs +# uuid: django-settings-secure-referrer-policy +# group: django-settings +# -- +SECURE_REFERRER_POLICY = 'same-origin' \ No newline at end of file diff --git a/python-mode/django/settings/secure-referrer-policy-dot b/python-mode/django/settings/secure-referrer-policy-dot new file mode 100644 index 00000000..05f43363 --- /dev/null +++ b/python-mode/django/settings/secure-referrer-policy-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_REFERRER_POLICY +# key: settings. +# uuid: django-settings-secure-referrer-policy-dot +# group: django-settings-dot +# -- +settings.SECURE_REFERRER_POLICY \ No newline at end of file diff --git a/python-mode/django/settings/secure-ssl-host b/python-mode/django/settings/secure-ssl-host new file mode 100644 index 00000000..40eeb96c --- /dev/null +++ b/python-mode/django/settings/secure-ssl-host @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_SSL_HOST +# key: djs +# uuid: django-settings-secure-ssl-host +# group: django-settings +# -- +SECURE_SSL_HOST = None \ No newline at end of file diff --git a/python-mode/django/settings/secure-ssl-host-dot b/python-mode/django/settings/secure-ssl-host-dot new file mode 100644 index 00000000..4172cd33 --- /dev/null +++ b/python-mode/django/settings/secure-ssl-host-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_SSL_HOST +# key: settings. +# uuid: django-settings-secure-ssl-host-dot +# group: django-settings-dot +# -- +settings.SECURE_SSL_HOST \ No newline at end of file diff --git a/python-mode/django/settings/secure-ssl-redirect b/python-mode/django/settings/secure-ssl-redirect new file mode 100644 index 00000000..31486aeb --- /dev/null +++ b/python-mode/django/settings/secure-ssl-redirect @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_SSL_REDIRECT +# key: djs +# uuid: django-settings-secure-ssl-redirect +# group: django-settings +# -- +SECURE_SSL_REDIRECT = False \ No newline at end of file diff --git a/python-mode/django/settings/secure-ssl-redirect-dot b/python-mode/django/settings/secure-ssl-redirect-dot new file mode 100644 index 00000000..72f58719 --- /dev/null +++ b/python-mode/django/settings/secure-ssl-redirect-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SECURE_SSL_REDIRECT +# key: settings. +# uuid: django-settings-secure-ssl-redirect-dot +# group: django-settings-dot +# -- +settings.SECURE_SSL_REDIRECT \ No newline at end of file diff --git a/python-mode/django/settings/server-email b/python-mode/django/settings/server-email new file mode 100644 index 00000000..b771ecd7 --- /dev/null +++ b/python-mode/django/settings/server-email @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: SERVER_EMAIL - Email address that error messages come from. +# key: djs +# uuid: django-settings- +# group: django-settings +# -- +# Email address that error messages come from. +SERVER_EMAIL = 'root@localhost' \ No newline at end of file diff --git a/python-mode/django/settings/server-email-dot b/python-mode/django/settings/server-email-dot new file mode 100644 index 00000000..38da109c --- /dev/null +++ b/python-mode/django/settings/server-email-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SERVER_EMAIL - Email address that error messages come from. +# key: settings. +# uuid: django-settings--dot +# group: django-settings-dot +# -- +settings.SERVER_EMAIL \ No newline at end of file diff --git a/python-mode/django/settings/session-cache-alias b/python-mode/django/settings/session-cache-alias new file mode 100644 index 00000000..91537b10 --- /dev/null +++ b/python-mode/django/settings/session-cache-alias @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: SESSION_CACHE_ALIAS - Cache to store session data if using the cache session backend. +# key: djs +# uuid: django-settings-session-cache-alias +# group: django-settings +# -- +# Cache to store session data if using the cache session backend. +SESSION_CACHE_ALIAS = 'default' \ No newline at end of file diff --git a/python-mode/django/settings/session-cache-alias-dot b/python-mode/django/settings/session-cache-alias-dot new file mode 100644 index 00000000..c48be28f --- /dev/null +++ b/python-mode/django/settings/session-cache-alias-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SESSION_CACHE_ALIAS - Cache to store session data if using the cache session backend. +# key: settings. +# uuid: django-settings-session-cache-alias-dot +# group: django-settings-dot +# -- +settings.SESSION_CACHE_ALIAS \ No newline at end of file diff --git a/python-mode/django/settings/session-cookie-age b/python-mode/django/settings/session-cookie-age new file mode 100644 index 00000000..b223af6a --- /dev/null +++ b/python-mode/django/settings/session-cookie-age @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: SESSION_COOKIE_AGE - Age of cookie, in seconds (default: 2 weeks). +# key: djs +# uuid: django-settings-session-cookie-age +# group: django-settings +# -- +# Age of cookie, in seconds (default: 2 weeks). +SESSION_COOKIE_AGE = 60 * 60 * 24 * 7 * 2 \ No newline at end of file diff --git a/python-mode/django/settings/session-cookie-age-dot b/python-mode/django/settings/session-cookie-age-dot new file mode 100644 index 00000000..91d35e63 --- /dev/null +++ b/python-mode/django/settings/session-cookie-age-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SESSION_COOKIE_AGE - Age of cookie, in seconds (default: 2 weeks). +# key: settings. +# uuid: django-settings-session-cookie-age-dot +# group: django-settings-dot +# -- +settings.SESSION_COOKIE_AGE \ No newline at end of file diff --git a/python-mode/django/settings/session-cookie-domain b/python-mode/django/settings/session-cookie-domain new file mode 100644 index 00000000..0c008f30 --- /dev/null +++ b/python-mode/django/settings/session-cookie-domain @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: SESSION_COOKIE_DOMAIN - A string like "example.com", or None for standard domain cookie. +# key: djs +# uuid: django-settings-session-cookie-domain +# group: django-settings +# -- +# A string like "example.com", or None for standard domain cookie. +SESSION_COOKIE_DOMAIN = None diff --git a/python-mode/django/settings/session-cookie-domain-dot b/python-mode/django/settings/session-cookie-domain-dot new file mode 100644 index 00000000..0f13e14d --- /dev/null +++ b/python-mode/django/settings/session-cookie-domain-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SESSION_COOKIE_DOMAIN - A string like "example.com", or None for standard domain cookie. +# key: settings. +# uuid: django-settings-session-cookie-domain-dot +# group: django-settings-dot +# -- +settings.SESSION_COOKIE_DOMAIN diff --git a/python-mode/django/settings/session-cookie-httponly b/python-mode/django/settings/session-cookie-httponly new file mode 100644 index 00000000..5e0b7aea --- /dev/null +++ b/python-mode/django/settings/session-cookie-httponly @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: SESSION_COOKIE_HTTPONLY - Whether to use the HttpOnly flag. +# key: djs +# uuid: django-settings-session-cookie-httponly +# group: django-settings +# -- +# Whether to use the HttpOnly flag. +SESSION_COOKIE_HTTPONLY = True \ No newline at end of file diff --git a/python-mode/django/settings/session-cookie-httponly-dot b/python-mode/django/settings/session-cookie-httponly-dot new file mode 100644 index 00000000..fb33ea30 --- /dev/null +++ b/python-mode/django/settings/session-cookie-httponly-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SESSION_COOKIE_HTTPONLY - Whether to use the HttpOnly flag. +# key: settings. +# uuid: django-settings-session-cookie-httponly-dot +# group: django-settings-dot +# -- +settings.SESSION_COOKIE_HTTPONLY \ No newline at end of file diff --git a/python-mode/django/settings/session-cookie-name b/python-mode/django/settings/session-cookie-name new file mode 100644 index 00000000..b7011828 --- /dev/null +++ b/python-mode/django/settings/session-cookie-name @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: SESSION_COOKIE_NAME - Cookie name. This can be whatever you want. +# key: djs +# uuid: django-settings-session-cookie-name +# group: django-settings +# -- +# Cookie name. This can be whatever you want. +SESSION_COOKIE_NAME = 'sessionid' \ No newline at end of file diff --git a/python-mode/django/settings/session-cookie-name-dot b/python-mode/django/settings/session-cookie-name-dot new file mode 100644 index 00000000..9621ace1 --- /dev/null +++ b/python-mode/django/settings/session-cookie-name-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SESSION_COOKIE_NAME - Cookie name. This can be whatever you want. +# key: settings. +# uuid: django-settings-session-cookie-name-dot +# group: django-settings-dot +# -- +settings.SESSION_COOKIE_NAME \ No newline at end of file diff --git a/python-mode/django/settings/session-cookie-path b/python-mode/django/settings/session-cookie-path new file mode 100644 index 00000000..01c53ef7 --- /dev/null +++ b/python-mode/django/settings/session-cookie-path @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: SESSION_COOKIE_PATH - The path of the session cookie. +# key: djs +# uuid: django-settings-session-cookie-path +# group: django-settings +# -- +# The path of the session cookie. +SESSION_COOKIE_PATH = '/' \ No newline at end of file diff --git a/python-mode/django/settings/session-cookie-path-dot b/python-mode/django/settings/session-cookie-path-dot new file mode 100644 index 00000000..95676a19 --- /dev/null +++ b/python-mode/django/settings/session-cookie-path-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SESSION_COOKIE_PATH - The path of the session cookie. +# key: settings. +# uuid: django-settings-session-cookie-path-dot +# group: django-settings-dot +# -- +settings.SESSION_COOKIE_PATH \ No newline at end of file diff --git a/python-mode/django/settings/session-cookie-samesite b/python-mode/django/settings/session-cookie-samesite new file mode 100644 index 00000000..b753e289 --- /dev/null +++ b/python-mode/django/settings/session-cookie-samesite @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: SESSION_COOKIE_SAMESITE - Whether to set the flag restricting cookie leaks on cross-site requests. +# key: djs +# uuid: django-settings-session-cookie-samesite +# group: django-settings +# -- +# Whether to set the flag restricting cookie leaks on cross-site requests. +# This can be 'Lax', 'Strict', or None to disable the flag. +SESSION_COOKIE_SAMESITE = 'Lax' \ No newline at end of file diff --git a/python-mode/django/settings/session-cookie-samesite-dot b/python-mode/django/settings/session-cookie-samesite-dot new file mode 100644 index 00000000..916995aa --- /dev/null +++ b/python-mode/django/settings/session-cookie-samesite-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SESSION_COOKIE_SAMESITE - Whether to set the flag restricting cookie leaks on cross-site requests. +# key: settings. +# uuid: django-settings-session-cookie-samesite-dot +# group: django-settings-dot +# -- +settings.SESSION_COOKIE_SAMESITE \ No newline at end of file diff --git a/python-mode/django/settings/session-cookie-secure b/python-mode/django/settings/session-cookie-secure new file mode 100644 index 00000000..93dbfae4 --- /dev/null +++ b/python-mode/django/settings/session-cookie-secure @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: SESSION_COOKIE_SECURE - Whether the session cookie should be secure (https:// only). +# key: djs +# uuid: django-settings-session-cookie-secure +# group: django-settings +# -- +# Whether the session cookie should be secure (https:// only). +SESSION_COOKIE_SECURE = False \ No newline at end of file diff --git a/python-mode/django/settings/session-cookie-secure-dot b/python-mode/django/settings/session-cookie-secure-dot new file mode 100644 index 00000000..67f66a5d --- /dev/null +++ b/python-mode/django/settings/session-cookie-secure-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SESSION_COOKIE_SECURE - Whether the session cookie should be secure (https:// only). +# key: settings. +# uuid: django-settings-session-cookie-secure-dot +# group: django-settings-dot +# -- +settings.SESSION_COOKIE_SECURE \ No newline at end of file diff --git a/python-mode/django/settings/session-engine b/python-mode/django/settings/session-engine new file mode 100644 index 00000000..a3a39860 --- /dev/null +++ b/python-mode/django/settings/session-engine @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: SESSION_ENGINE - The module to store session data +# key: djs +# uuid: django-settings-session-engine +# group: django-settings +# -- +# The module to store session data +SESSION_ENGINE = 'django.contrib.sessions.backends.db' \ No newline at end of file diff --git a/python-mode/django/settings/session-engine-dot b/python-mode/django/settings/session-engine-dot new file mode 100644 index 00000000..50fbf254 --- /dev/null +++ b/python-mode/django/settings/session-engine-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SESSION_ENGINE - The module to store session data +# key: settings. +# uuid: django-settings-session-engine-dot +# group: django-settings-dot +# -- +settings.SESSION_ENGINE \ No newline at end of file diff --git a/python-mode/django/settings/session-expire-at-browser-close b/python-mode/django/settings/session-expire-at-browser-close new file mode 100644 index 00000000..eda8da85 --- /dev/null +++ b/python-mode/django/settings/session-expire-at-browser-close @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: SESSION_EXPIRE_AT_BROWSER_CLOSE - Whether a user's session cookie expires when the Web browser is closed. +# key: djs +# uuid: django-settings-session-expire-at-browser-close +# group: django-settings +# -- +# Whether a user's session cookie expires when the Web browser is closed. +SESSION_EXPIRE_AT_BROWSER_CLOSE = False \ No newline at end of file diff --git a/python-mode/django/settings/session-expire-at-browser-close-dot b/python-mode/django/settings/session-expire-at-browser-close-dot new file mode 100644 index 00000000..97e25a55 --- /dev/null +++ b/python-mode/django/settings/session-expire-at-browser-close-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SESSION_EXPIRE_AT_BROWSER_CLOSE - Whether a user's session cookie expires when the Web browser is closed. +# key: settings. +# uuid: django-settings-session-expire-at-browser-close-dot +# group: django-settings-dot +# -- +settings.SESSION_EXPIRE_AT_BROWSER_CLOSE \ No newline at end of file diff --git a/python-mode/django/settings/session-file-path b/python-mode/django/settings/session-file-path new file mode 100644 index 00000000..b403d21e --- /dev/null +++ b/python-mode/django/settings/session-file-path @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: SESSION_FILE_PATH - Directory to store session files if using the file session module. +# key: djs +# uuid: django-settings-session-file-path +# group: django-settings +# -- +# Directory to store session files if using the file session module. If None, +# the backend will use a sensible default. +SESSION_FILE_PATH = None \ No newline at end of file diff --git a/python-mode/django/settings/session-file-path-dot b/python-mode/django/settings/session-file-path-dot new file mode 100644 index 00000000..e091faab --- /dev/null +++ b/python-mode/django/settings/session-file-path-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SESSION_FILE_PATH - Directory to store session files if using the file session module. +# key: settings. +# uuid: django-settings-session-file-path-dot +# group: django-settings-dot +# -- +settings.SESSION_FILE_PATH \ No newline at end of file diff --git a/python-mode/django/settings/session-save-every-request b/python-mode/django/settings/session-save-every-request new file mode 100644 index 00000000..da82f68e --- /dev/null +++ b/python-mode/django/settings/session-save-every-request @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: SESSION_SAVE_EVERY_REQUEST - Whether to save the session data on every request. +# key: djs +# uuid: django-settings-session-save-every-request +# group: django-settings +# -- +# Whether to save the session data on every request. +SESSION_SAVE_EVERY_REQUEST = False \ No newline at end of file diff --git a/python-mode/django/settings/session-save-every-request-dot b/python-mode/django/settings/session-save-every-request-dot new file mode 100644 index 00000000..4ad8e950 --- /dev/null +++ b/python-mode/django/settings/session-save-every-request-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SESSION_SAVE_EVERY_REQUEST - Whether to save the session data on every request. +# key: settings. +# uuid: django-settings-session-save-every-request-dot +# group: django-settings-dot +# -- +settings.SESSION_SAVE_EVERY_REQUEST \ No newline at end of file diff --git a/python-mode/django/settings/session-serializer b/python-mode/django/settings/session-serializer new file mode 100644 index 00000000..a8a9eb37 --- /dev/null +++ b/python-mode/django/settings/session-serializer @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: SESSION_SERIALIZER - class to serialize session data +# key: djs +# uuid: django-settings-session-serializer +# group: django-settings +# -- +# class to serialize session data +SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer' diff --git a/python-mode/django/settings/session-serializer-dot b/python-mode/django/settings/session-serializer-dot new file mode 100644 index 00000000..088d3722 --- /dev/null +++ b/python-mode/django/settings/session-serializer-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SESSION_SERIALIZER - class to serialize session data +# key: settings. +# uuid: django-settings-session-serializer-dot +# group: django-settings-dot +# -- +settings.SESSION_SERIALIZER diff --git a/python-mode/django/settings/short-date-format b/python-mode/django/settings/short-date-format new file mode 100644 index 00000000..7a268bae --- /dev/null +++ b/python-mode/django/settings/short-date-format @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: SHORT_DATE_FORMAT - DDefault short formatting for date objects. +# key: djs +# uuid: django-settings-short-date-format +# group: django-settings +# -- +# Default short formatting for date objects. See all available format strings here: +# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date +SHORT_DATE_FORMAT = 'm/d/Y' diff --git a/python-mode/django/settings/short-date-format-dot b/python-mode/django/settings/short-date-format-dot new file mode 100644 index 00000000..9617ade8 --- /dev/null +++ b/python-mode/django/settings/short-date-format-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SHORT_DATE_FORMAT - DDefault short formatting for date objects. +# key: settings. +# uuid: django-settings-short-date-format-dot +# group: django-settings-dot +# -- +settings.SHORT_DATE_FORMAT diff --git a/python-mode/django/settings/short-datetime-format b/python-mode/django/settings/short-datetime-format new file mode 100644 index 00000000..f022bf95 --- /dev/null +++ b/python-mode/django/settings/short-datetime-format @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: SHORT_DATETIME_FORMAT - Default short formatting for datetime objects. +# key: djs +# uuid: django-settings-short-datetime-format +# group: django-settings +# -- +# Default short formatting for datetime objects. +# See all available format strings here: +# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date +SHORT_DATETIME_FORMAT = 'm/d/Y P' \ No newline at end of file diff --git a/python-mode/django/settings/short-datetime-format-dot b/python-mode/django/settings/short-datetime-format-dot new file mode 100644 index 00000000..0ba3ceae --- /dev/null +++ b/python-mode/django/settings/short-datetime-format-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SHORT_DATETIME_FORMAT - Default short formatting for datetime objects. +# key: settings. +# uuid: django-settings-short-datetime-format-dot +# group: django-settings-dot +# -- +settings.SHORT_DATETIME_FORMAT \ No newline at end of file diff --git a/python-mode/django/settings/signing-backend b/python-mode/django/settings/signing-backend new file mode 100644 index 00000000..b3096f3e --- /dev/null +++ b/python-mode/django/settings/signing-backend @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SIGNING_BACKEND +# key: djs +# uuid: django-settings-signing-backend +# group: django-settings +# -- +SIGNING_BACKEND = 'django.core.signing.TimestampSigner' \ No newline at end of file diff --git a/python-mode/django/settings/signing-backend-dot b/python-mode/django/settings/signing-backend-dot new file mode 100644 index 00000000..cc751d57 --- /dev/null +++ b/python-mode/django/settings/signing-backend-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SIGNING_BACKEND +# key: settings. +# uuid: django-settings-signing-backend-dot +# group: django-settings-dot +# -- +settings.SIGNING_BACKEND \ No newline at end of file diff --git a/python-mode/django/settings/silenced-system-checks b/python-mode/django/settings/silenced-system-checks new file mode 100644 index 00000000..7cdf7e1e --- /dev/null +++ b/python-mode/django/settings/silenced-system-checks @@ -0,0 +1,13 @@ +# -*- mode: snippet -*- +# name: SILENCED_SYSTEM_CHECKS - List of all issues generated by system checks that should be silenced. +# key: djs +# uuid: django-settings-silenced-system-checks +# group: django-settings +# -- +# List of all issues generated by system checks that should be silenced. Light +# issues like warnings, infos or debugs will not generate a message. Silencing +# serious issues like errors and criticals does not result in hiding the +# message, but Django will not stop you from e.g. running server. +SILENCED_SYSTEM_CHECKS = [ + $0 +] \ No newline at end of file diff --git a/python-mode/django/settings/silenced-system-checks-dot b/python-mode/django/settings/silenced-system-checks-dot new file mode 100644 index 00000000..2e25e29d --- /dev/null +++ b/python-mode/django/settings/silenced-system-checks-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: SILENCED_SYSTEM_CHECKS - List of all issues generated by system checks that should be silenced. +# key: settings. +# uuid: django-settings-silenced-system-checks-dot +# group: django-settings-dot +# -- +settings.SILENCED_SYSTEM_CHECKS \ No newline at end of file diff --git a/python-mode/django/settings/static-root b/python-mode/django/settings/static-root new file mode 100644 index 00000000..d508bdd4 --- /dev/null +++ b/python-mode/django/settings/static-root @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: STATIC_ROOT - Absolute path to the directory static files should be collected to. +# key: djs +# uuid: django-settings-static-root +# group: django-settings +# -- +# Absolute path to the directory static files should be collected to. +# Example: "/var/www/example.com/static/" +STATIC_ROOT = None diff --git a/python-mode/django/settings/static-root-dot b/python-mode/django/settings/static-root-dot new file mode 100644 index 00000000..be137808 --- /dev/null +++ b/python-mode/django/settings/static-root-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: STATIC_ROOT - Absolute path to the directory static files should be collected to. +# key: settings. +# uuid: django-settings-static-root-dot +# group: django-settings-dot +# -- +settings.STATIC_ROOT diff --git a/python-mode/django/settings/static-url b/python-mode/django/settings/static-url new file mode 100644 index 00000000..2b4024f4 --- /dev/null +++ b/python-mode/django/settings/static-url @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: STATIC_URL - URL that handles the static files served from STATIC_ROOT. +# key: djs +# uuid: django-settings-static-url +# group: django-settings +# -- +# URL that handles the static files served from STATIC_ROOT. +# Example: "http://example.com/static/", "http://static.example.com/" +STATIC_URL = None \ No newline at end of file diff --git a/python-mode/django/settings/static-url-dot b/python-mode/django/settings/static-url-dot new file mode 100644 index 00000000..9cf51075 --- /dev/null +++ b/python-mode/django/settings/static-url-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: STATIC_URL - URL that handles the static files served from STATIC_ROOT. +# key: settings. +# uuid: django-settings-static-url-dot +# group: django-settings-dot +# -- +settings.STATIC_URL \ No newline at end of file diff --git a/python-mode/django/settings/staticfiles-dirs b/python-mode/django/settings/staticfiles-dirs new file mode 100644 index 00000000..94d6787d --- /dev/null +++ b/python-mode/django/settings/staticfiles-dirs @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: STATICFILES_DIRS - A list of locations of additional static files +# key: djs +# uuid: django-settings-staticfiles-dirs +# group: django-settings +# -- +# A list of locations of additional static files +STATICFILES_DIRS = [] \ No newline at end of file diff --git a/python-mode/django/settings/staticfiles-dirs-dot b/python-mode/django/settings/staticfiles-dirs-dot new file mode 100644 index 00000000..a92dde5d --- /dev/null +++ b/python-mode/django/settings/staticfiles-dirs-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: STATICFILES_DIRS - A list of locations of additional static files +# key: settings. +# uuid: django-settings-staticfiles-dirs-dot +# group: django-settings-dot +# -- +settings.STATICFILES_DIRS \ No newline at end of file diff --git a/python-mode/django/settings/staticfiles-finders b/python-mode/django/settings/staticfiles-finders new file mode 100644 index 00000000..fdaa8a9b --- /dev/null +++ b/python-mode/django/settings/staticfiles-finders @@ -0,0 +1,13 @@ +# -*- mode: snippet -*- +# name: STATICFILES_FINDERS - List of finder classes that know how to find static files in various locations. +# key: djs +# uuid: django-settings-staticfiles-finders +# group: django-settings +# -- +# List of finder classes that know how to find static files in +# various locations. +STATICFILES_FINDERS = [ + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', + # 'django.contrib.staticfiles.finders.DefaultStorageFinder', +] \ No newline at end of file diff --git a/python-mode/django/settings/staticfiles-finders-dot b/python-mode/django/settings/staticfiles-finders-dot new file mode 100644 index 00000000..01cc7865 --- /dev/null +++ b/python-mode/django/settings/staticfiles-finders-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: STATICFILES_FINDERS - List of finder classes that know how to find static files in various locations. +# key: settings. +# uuid: django-settings-staticfiles-finders-dot +# group: django-settings-dot +# -- +settings.STATICFILES_FINDERS \ No newline at end of file diff --git a/python-mode/django/settings/staticfiles-storage b/python-mode/django/settings/staticfiles-storage new file mode 100644 index 00000000..e47b0a61 --- /dev/null +++ b/python-mode/django/settings/staticfiles-storage @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: STATICFILES_STORAGE - The default file storage backend used during the build process +# key: djs +# uuid: django-settings-staticfiles-storage +# group: django-settings +# -- +# The default file storage backend used during the build process +STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' \ No newline at end of file diff --git a/python-mode/django/settings/staticfiles-storage-dot b/python-mode/django/settings/staticfiles-storage-dot new file mode 100644 index 00000000..5e907cca --- /dev/null +++ b/python-mode/django/settings/staticfiles-storage-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: STATICFILES_STORAGE - The default file storage backend used during the build process +# key: settings. +# uuid: django-settings-staticfiles-storage-dot +# group: django-settings-dot +# -- +settings.STATICFILES_STORAGE \ No newline at end of file diff --git a/python-mode/django/settings/templates b/python-mode/django/settings/templates new file mode 100644 index 00000000..255b2d56 --- /dev/null +++ b/python-mode/django/settings/templates @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: TEMPLATES +# key: djs +# uuid: django-settings-templates +# group: django-settings +# -- +TEMPLATES = [ + $0 +] \ No newline at end of file diff --git a/python-mode/django/settings/templates-dot b/python-mode/django/settings/templates-dot new file mode 100644 index 00000000..07788425 --- /dev/null +++ b/python-mode/django/settings/templates-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: TEMPLATES +# key: settings. +# uuid: django-settings-templates-dot +# group: django-settings-dot +# -- +settings.TEMPLATES \ No newline at end of file diff --git a/python-mode/django/settings/test-non-serialized-apps b/python-mode/django/settings/test-non-serialized-apps new file mode 100644 index 00000000..f4360584 --- /dev/null +++ b/python-mode/django/settings/test-non-serialized-apps @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: TEST_NON_SERIALIZED_APPS - Apps that don't need to be serialized at test database creation time +# key: djs +# uuid: django-settings-test-non-serialized-apps +# group: django-settings +# -- +# Apps that don't need to be serialized at test database creation time +# (only apps with migrations are to start with) +TEST_NON_SERIALIZED_APPS = [] diff --git a/python-mode/django/settings/test-non-serialized-apps-dot b/python-mode/django/settings/test-non-serialized-apps-dot new file mode 100644 index 00000000..eadfa156 --- /dev/null +++ b/python-mode/django/settings/test-non-serialized-apps-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: TEST_NON_SERIALIZED_APPS - Apps that don't need to be serialized at test database creation time +# key: settings. +# uuid: django-settings-test-non-serialized-apps-dot +# group: django-settings-dot +# -- +settings.TEST_NON_SERIALIZED_APPS diff --git a/python-mode/django/settings/test-runner b/python-mode/django/settings/test-runner new file mode 100644 index 00000000..6c786d5e --- /dev/null +++ b/python-mode/django/settings/test-runner @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: TEST_RUNNER - The name of the class to use to run the test suite +# key: djs +# uuid: django-settings-test-runner +# group: django-settings +# -- +# The name of the class to use to run the test suite +TEST_RUNNER = 'django.test.runner.DiscoverRunner' \ No newline at end of file diff --git a/python-mode/django/settings/test-runner-dot b/python-mode/django/settings/test-runner-dot new file mode 100644 index 00000000..95706b61 --- /dev/null +++ b/python-mode/django/settings/test-runner-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: TEST_RUNNER - The name of the class to use to run the test suite +# key: settings. +# uuid: django-settings-test-runner-dot +# group: django-settings-dot +# -- +settings.TEST_RUNNER diff --git a/python-mode/django/settings/thousand-separator b/python-mode/django/settings/thousand-separator new file mode 100644 index 00000000..70fb4afa --- /dev/null +++ b/python-mode/django/settings/thousand-separator @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: THOUSAND_SEPARATOR - Thousand separator symbol +# key: djs +# uuid: django-settings-thousand-separator +# group: django-settings +# -- +# Thousand separator symbol +THOUSAND_SEPARATOR = ',' \ No newline at end of file diff --git a/python-mode/django/settings/thousand-separator-dot b/python-mode/django/settings/thousand-separator-dot new file mode 100644 index 00000000..d0fc6907 --- /dev/null +++ b/python-mode/django/settings/thousand-separator-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: THOUSAND_SEPARATOR - Thousand separator symbol +# key: settings. +# uuid: django-settings-thousand-separator-dot +# group: django-settings-dot +# -- +settings.THOUSAND_SEPARATOR \ No newline at end of file diff --git a/python-mode/django/settings/time-format b/python-mode/django/settings/time-format new file mode 100644 index 00000000..78a312f1 --- /dev/null +++ b/python-mode/django/settings/time-format @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: TIME_FORMAT - Default formatting for time objects. +# key: djs +# uuid: django-settings-time-format +# group: django-settings +# -- +# Default formatting for time objects. See all available format strings here: +# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date +TIME_FORMAT = 'P' diff --git a/python-mode/django/settings/time-format-dot b/python-mode/django/settings/time-format-dot new file mode 100644 index 00000000..6bdd45f9 --- /dev/null +++ b/python-mode/django/settings/time-format-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: TIME_FORMAT - Default formatting for time objects. +# key: settings. +# uuid: django-settings-time-format-dot +# group: django-settings-dot +# -- +settings.TIME_FORMAT diff --git a/python-mode/django/settings/time-input-formats b/python-mode/django/settings/time-input-formats new file mode 100644 index 00000000..1d805452 --- /dev/null +++ b/python-mode/django/settings/time-input-formats @@ -0,0 +1,15 @@ +# -*- mode: snippet -*- +# name: TIME_INPUT_FORMATS - Default formats to be used when parsing times from input boxes, in order +# key: djs +# uuid: django-settings-datetime-input-formats +# group: django-settings +# -- +# Default formats to be used when parsing times from input boxes, in order +# See all available format string here: +# https://docs.python.org/library/datetime.html#strftime-behavior +# * Note that these format strings are different from the ones to display dates +TIME_INPUT_FORMATS = [ + '%H:%M:%S', # '14:30:59' + '%H:%M:%S.%f', # '14:30:59.000200' + '%H:%M', # '14:30' +] diff --git a/python-mode/django/settings/time-input-formats-dot b/python-mode/django/settings/time-input-formats-dot new file mode 100644 index 00000000..a00cd5a3 --- /dev/null +++ b/python-mode/django/settings/time-input-formats-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: TIME_INPUT_FORMATS - Default formats to be used when parsing times from input boxes, in order +# key: settings. +# uuid: django-settings-datetime-input-formats-dot +# group: django-settings-dot +# -- +settings.TIME_INPUT_FORMATS diff --git a/python-mode/django/settings/time-zone b/python-mode/django/settings/time-zone new file mode 100644 index 00000000..87eb1b28 --- /dev/null +++ b/python-mode/django/settings/time-zone @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: TIME_ZONE - Local time zone for this installation. +# key: djs +# uuid: django-settings-time-zone +# group: django-settings +# -- +# Local time zone for this installation. All choices can be found here: +# https://en.wikipedia.org/wiki/List_of_tz_zones_by_name (although not all +# systems may support all possibilities). When USE_TZ is True, this is +# interpreted as the default user time zone. +TIME_ZONE = 'America/Chicago' diff --git a/python-mode/django/settings/time-zone-dot b/python-mode/django/settings/time-zone-dot new file mode 100644 index 00000000..114a303d --- /dev/null +++ b/python-mode/django/settings/time-zone-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: TIME_ZONE - Local time zone for this installation. +# key: settings. +# uuid: django-settings-time-zone-dot +# group: django-settings-dot +# -- +settings.TIME_ZONE diff --git a/python-mode/django/settings/use-i18n b/python-mode/django/settings/use-i18n new file mode 100644 index 00000000..89126ea9 --- /dev/null +++ b/python-mode/django/settings/use-i18n @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: USE_I18N - If you set this to False, Django will make some optimizations so as not to load the internationalization machinery. +# key: djs +# uuid: django-settings-use-i18n +# group: djangosettings +# -- +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = True diff --git a/python-mode/django/settings/use-i18n-dot b/python-mode/django/settings/use-i18n-dot new file mode 100644 index 00000000..2cc8a9d3 --- /dev/null +++ b/python-mode/django/settings/use-i18n-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: USE_I18N - If you set this to False, Django will make some optimizations so as not to load the internationalization machinery. +# key: settings. +# uuid: django-settings-use-i18n-dot +# group: djangosettings-dot +# -- +settings.USE_I18N diff --git a/python-mode/django/settings/use-l10n b/python-mode/django/settings/use-l10n new file mode 100644 index 00000000..be9ce37a --- /dev/null +++ b/python-mode/django/settings/use-l10n @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: USE_L10N - If you set this to True, Django will format dates, numbers and calendars according to user current locale. +# key: djs +# uuid: django-settings-use-l10n +# group: django-settings +# -- +# If you set this to True, Django will format dates, numbers and calendars +# according to user current locale. +USE_L10N = False \ No newline at end of file diff --git a/python-mode/django/settings/use-l10n-dot b/python-mode/django/settings/use-l10n-dot new file mode 100644 index 00000000..3133d0e3 --- /dev/null +++ b/python-mode/django/settings/use-l10n-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: USE_L10N - If you set this to True, Django will format dates, numbers and calendars according to user current locale. +# key: settings. +# uuid: django-settings-use-l10n-dot +# group: django-settings-dot +# -- +settings.USE_L10N \ No newline at end of file diff --git a/python-mode/django/settings/use-thousand-separator b/python-mode/django/settings/use-thousand-separator new file mode 100644 index 00000000..e1674768 --- /dev/null +++ b/python-mode/django/settings/use-thousand-separator @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: USE_THOUSAND_SEPARATOR - Boolean that sets whether to add thousand separator when formatting numbers +# key: djs +# uuid: django-settings-use-thousand-separator +# group: django-settings +# -- +# Boolean that sets whether to add thousand separator when formatting numbers +USE_THOUSAND_SEPARATOR = False \ No newline at end of file diff --git a/python-mode/django/settings/use-thousand-separator-dot b/python-mode/django/settings/use-thousand-separator-dot new file mode 100644 index 00000000..1b93d993 --- /dev/null +++ b/python-mode/django/settings/use-thousand-separator-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: USE_THOUSAND_SEPARATOR - Boolean that sets whether to add thousand separator when formatting numbers +# key: settings. +# uuid: django-settings-use-thousand-separator-dot +# group: django-settings-dot +# -- +settings.USE_THOUSAND_SEPARATOR \ No newline at end of file diff --git a/python-mode/django/settings/use-tz b/python-mode/django/settings/use-tz new file mode 100644 index 00000000..af75fc1b --- /dev/null +++ b/python-mode/django/settings/use-tz @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: USE_TZ - If you set this to True, Django will use timezone-aware datetimes. +# key: djs +# uuid: django-settings-use-tz +# group: django-settings +# -- +# If you set this to True, Django will use timezone-aware datetimes. +USE_TZ = False diff --git a/python-mode/django/settings/use-tz-dot b/python-mode/django/settings/use-tz-dot new file mode 100644 index 00000000..7fc14268 --- /dev/null +++ b/python-mode/django/settings/use-tz-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: USE_TZ - If you set this to True, Django will use timezone-aware datetimes. +# key: settings. +# uuid: django-settings-use-tz-dot +# group: django-settings-dot +# -- +settings.USE_TZ diff --git a/python-mode/django/settings/use-x-forwarded-host b/python-mode/django/settings/use-x-forwarded-host new file mode 100644 index 00000000..900822ac --- /dev/null +++ b/python-mode/django/settings/use-x-forwarded-host @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: USE_X_FORWARDED_HOST +# key: djs +# uuid: django-settings-use-x-forwarded-host +# group: django-settings +# -- +USE_X_FORWARDED_HOST = False \ No newline at end of file diff --git a/python-mode/django/settings/use-x-forwarded-host-dot b/python-mode/django/settings/use-x-forwarded-host-dot new file mode 100644 index 00000000..d7e1682f --- /dev/null +++ b/python-mode/django/settings/use-x-forwarded-host-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: USE_X_FORWARDED_HOST +# key: settings. +# uuid: django-settings-use-x-forwarded-host-dot +# group: django-settings-dot +# -- +settings.USE_X_FORWARDED_HOST \ No newline at end of file diff --git a/python-mode/django/settings/use-x-forwarded-port b/python-mode/django/settings/use-x-forwarded-port new file mode 100644 index 00000000..bb134a1e --- /dev/null +++ b/python-mode/django/settings/use-x-forwarded-port @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: USE_X_FORWARDED_PORT +# key: djs +# uuid: django-settings-use-x-forwarded-port +# group: django-settings +# -- +USE_X_FORWARDED_PORT = False \ No newline at end of file diff --git a/python-mode/django/settings/use-x-forwarded-port-dot b/python-mode/django/settings/use-x-forwarded-port-dot new file mode 100644 index 00000000..1491f4c1 --- /dev/null +++ b/python-mode/django/settings/use-x-forwarded-port-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: USE_X_FORWARDED_PORT +# key: settings. +# uuid: django-settings-use-x-forwarded-port-dot +# group: django-settings-dot +# -- +settings.USE_X_FORWARDED_PORT \ No newline at end of file diff --git a/python-mode/django/settings/wsgi-application b/python-mode/django/settings/wsgi-application new file mode 100644 index 00000000..7e5d6dce --- /dev/null +++ b/python-mode/django/settings/wsgi-application @@ -0,0 +1,12 @@ +# -*- mode: snippet -*- +# name: WSGI_APPLICATION - The Python dotted path to the WSGI application that Django's internal server (runserver) will use. +# key: djs +# uuid: django-settings-wsgi-application +# group: django-settings +# -- +# The Python dotted path to the WSGI application that Django's internal server +# (runserver) will use. If `None`, the return value of +# 'django.core.wsgi.get_wsgi_application' is used, thus preserving the same +# behavior as previous versions of Django. Otherwise this should point to an +# actual WSGI application object. +WSGI_APPLICATION = None \ No newline at end of file diff --git a/python-mode/django/settings/wsgi-application-dot b/python-mode/django/settings/wsgi-application-dot new file mode 100644 index 00000000..904ac9f9 --- /dev/null +++ b/python-mode/django/settings/wsgi-application-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: WSGI_APPLICATION - The Python dotted path to the WSGI application that Django's internal server (runserver) will use. +# key: settings. +# uuid: django-settings-wsgi-application-dot +# group: django-settings-dot +# -- +settings.WSGI_APPLICATION \ No newline at end of file diff --git a/python-mode/django/settings/x-frame-options b/python-mode/django/settings/x-frame-options new file mode 100644 index 00000000..a9d7a680 --- /dev/null +++ b/python-mode/django/settings/x-frame-options @@ -0,0 +1,8 @@ +# -*- mode: snippet -*- +# name: X_FRAME_OPTIONS - Default X-Frame-Options header value +# key: djs +# uuid: django-settings-x-frame-options +# group: django-settings +# -- +# Default X-Frame-Options header value +X_FRAME_OPTIONS = 'DENY' diff --git a/python-mode/django/settings/x-frame-options-dot b/python-mode/django/settings/x-frame-options-dot new file mode 100644 index 00000000..9160118f --- /dev/null +++ b/python-mode/django/settings/x-frame-options-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: X_FRAME_OPTIONS - Default X-Frame-Options header value +# key: settings. +# uuid: django-settings-x-frame-options-dot +# group: django-settings-dot +# -- +settings.X_FRAME_OPTIONS diff --git a/python-mode/django/settings/year-month-format b/python-mode/django/settings/year-month-format new file mode 100644 index 00000000..376c7e55 --- /dev/null +++ b/python-mode/django/settings/year-month-format @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: YEAR_MONTH_FORMAT - Default formatting for date objects when only the year and month are relevant. +# key: djs +# uuid: django-settings-year-month-format +# group: django-settings +# -- +# Default formatting for date objects when only the year and month are relevant. +# See all available format strings here: +# https://docs.djangoproject.com/en/dev/ref/templates/builtins/#date +YEAR_MONTH_FORMAT = 'F Y' diff --git a/python-mode/django/settings/year-month-format-dot b/python-mode/django/settings/year-month-format-dot new file mode 100644 index 00000000..34b899d1 --- /dev/null +++ b/python-mode/django/settings/year-month-format-dot @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: YEAR_MONTH_FORMAT - Default formatting for date objects when only the year and month are relevant. +# key: settings. +# uuid: django-settings-year-month-format-dot +# group: django-settings-dot +# -- +settings.YEAR_MONTH_FORMAT diff --git a/python-mode/django/snippet-templates b/python-mode/django/snippet-templates new file mode 100644 index 00000000..b242c191 --- /dev/null +++ b/python-mode/django/snippet-templates @@ -0,0 +1,82 @@ +# -*- mode: fundamental -*- + +### Model Meta + +# -*- mode: snippet -*- +# name: +# key: djmeta +# uuid: django-meta- +# group: django-meta +# -- + +### Settings + +# -*- mode: snippet -*- +# name: +# key: djs +# uuid: django-settings- +# group: django-settings +# -- + +### Settings Dot + +# -*- mode: snippet -*- +# name: +# key: settings. +# uuid: django-settings-...-dot +# group: django-settings-dot +# -- + +### Imports + +# -*- mode: snippet -*- +# name: +# key: dji +# uuid: django-imports- +# group: django-imports +# -- + +### Views + +# -*- mode: snippet -*- +# name: +# key: djv +# uuid: django-views- +# group: django-views +# -- + +### Middleware + +# -*- mode: snippet -*- +# name: +# key: djmid +# uuid: django-middleware- +# group: django-middleware +# -- + +### Backends + +# -*- mode: snippet -*- +# name: +# key: djb +# uuid: django-backends- +# group: django-backends +# -- + +### Management Commands + +# -*- mode: snippet -*- +# name: +# key: djmc +# uuid: django-managment- +# group: django-management +# -- + +### Django Custom template tags / filters + +# -*- mode: snippet -*- +# name: +# key: djtt +# uuid: django-custom- +# group: django-custom +# -- diff --git a/python-mode/django/templatetags/filter b/python-mode/django/templatetags/filter new file mode 100644 index 00000000..6f22211b --- /dev/null +++ b/python-mode/django/templatetags/filter @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: template filter +# key: djtt +# uuid: django-custom +# group: django-custom +# -- +@register.filter(name='$1') +def ${1:NAME}(${2:VALUE NAME}): + $0 + return $2 \ No newline at end of file diff --git a/python-mode/django/templatetags/filter-with-arg b/python-mode/django/templatetags/filter-with-arg new file mode 100644 index 00000000..16412ccc --- /dev/null +++ b/python-mode/django/templatetags/filter-with-arg @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: template filter with arg +# key: djtt +# uuid: django-custom-filter-with-arg +# group: django-custom +# -- +@register.filter(name='$1') +def ${1:NAME}(${2:VALUE NAME}, ${3:ARGUMENT}): + $0 + return $2 diff --git a/python-mode/django/templatetags/simpletag b/python-mode/django/templatetags/simpletag new file mode 100644 index 00000000..73ffa7b4 --- /dev/null +++ b/python-mode/django/templatetags/simpletag @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: template simple tag +# key: djtt +# uuid: django-custom-simple-tag +# group: django-custom +# -- +@register.simple_tag +def ${1:NAME}({2:ARGUMENT}): + $0 + return \ No newline at end of file diff --git a/python-mode/django/views/basic-cbv b/python-mode/django/views/basic-cbv new file mode 100644 index 00000000..4b662fcc --- /dev/null +++ b/python-mode/django/views/basic-cbv @@ -0,0 +1,13 @@ +# -*- mode: snippet -*- +# name: Basic Class Based View +# key: djv +# uuid: django-views-basic-cbv +# group: django-views +# -- +# from django.http import HttpResponse +# from django.views import View +class $1(View): + """$2""" + def get(self, request, *args, **kwargs): + return HttpResponse('Hello, World!') + $0 \ No newline at end of file diff --git a/python-mode/django/views/basic-func-get-view b/python-mode/django/views/basic-func-get-view new file mode 100644 index 00000000..a698c304 --- /dev/null +++ b/python-mode/django/views/basic-func-get-view @@ -0,0 +1,12 @@ +# -*- mode: snippet -*- +# name: Basic Function Based View +# key: djv +# uuid: django-views-basiv-function-get-view +# group: django-views +# -- +# from django.views.decorators.http import require_http_methods +@require_http_methods(['GET']) +def ${1:VIEWNAME}(request, template_name='$1.html'): + """${2:DOCSTRING}""" + context = {}$0 + return render(request, template_name, context) \ No newline at end of file diff --git a/python-mode/django/views/basic-view b/python-mode/django/views/basic-view new file mode 100644 index 00000000..19f952c6 --- /dev/null +++ b/python-mode/django/views/basic-view @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: Basic View +# key: djv +# uuid: django-views-basic-view +# group: django-views +# -- +def ${1:VIEWNAME}(request, template_name='$1.html'): + """${2:DOCSTRING}""" + context = {}$0 + return render(request, template_name, context) \ No newline at end of file diff --git a/python-mode/django/views/detail-view-cbv b/python-mode/django/views/detail-view-cbv new file mode 100644 index 00000000..9cfa055b --- /dev/null +++ b/python-mode/django/views/detail-view-cbv @@ -0,0 +1,30 @@ +# -*- mode: snippet -*- +# name: Detail Class Based View +# key: djv +# uuid: django-views-detail-view-cbv +# group: django-views +# -- +# from django.utils import timezone +# from django.views.generic.detail import DetailView +class ${1:VIEW_NAME}DetailView(DetailView): + """$2 + + Ancestors (MRO) + + This view inherits methods and attributes from the following views: + - django.views.generic.detail.SingleObjectTemplateResponseMixin + - django.views.generic.base.TemplateResponseMixin + - django.views.generic.detail.BaseDetailView + - django.views.generic.detail.SingleObjectMixin + - django.views.generic.base.View + """ + model = $1 + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context['now'] = timezone.now() + return context + + def get_queryset(self, *args, **kwargs): + return super().get_queryset(*args, **kwargs) + $0 \ No newline at end of file diff --git a/python-mode/django/views/list-view-cbv b/python-mode/django/views/list-view-cbv new file mode 100644 index 00000000..da404eed --- /dev/null +++ b/python-mode/django/views/list-view-cbv @@ -0,0 +1,26 @@ +# -*- mode: snippet -*- +# name: List Class Based View +# key: djv +# uuid: django-views-list-view-cbv +# group: django-views +# -- +# from django.utils import timezone +# from django.views.generic.detail import DetailView +class ${1:VIEW_NAME}DetailView(DetailView): + """$2 + + Ancestors (MRO) + + This view inherits methods and attributes from the following views: + - django.views.generic.list.MultipleObjectTemplateResponseMixin + - django.views.generic.base.TemplateResponseMixin + - django.views.generic.list.BaseListView + - django.views.generic.list.MultipleObjectMixin + - django.views.generic.base.View + """ + model = $1 + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context['now'] = timezone.now() + return context \ No newline at end of file diff --git a/python-mode/django/views/redirect-cbv b/python-mode/django/views/redirect-cbv new file mode 100644 index 00000000..68c019bc --- /dev/null +++ b/python-mode/django/views/redirect-cbv @@ -0,0 +1,17 @@ +# -*- mode: snippet -*- +# name: Redirect Class Based View +# key: djv +# uuid: django-views-redirect-cbv +# group: django-views +# -- +# from django.shortcuts import get_object_or_404 +# from django.views.generic.base import RedirectView +class ${1:VIEW_PREFIX}RedirectView(RedirectView): + """$2""" + permanent = ${3:$$(yas-choose-value '("True" "False"))} + query_string = ${4:$$(yas-choose-value '("True" "False"))} + pattern_name = '$5' + + def get_redirect_url(self, *args, **kwargs): + return super().get_redirect_url(*args, **kwargs) + $0 \ No newline at end of file diff --git a/python-mode/django/views/template-cbv b/python-mode/django/views/template-cbv new file mode 100644 index 00000000..90c847af --- /dev/null +++ b/python-mode/django/views/template-cbv @@ -0,0 +1,16 @@ +# -*- mode: snippet -*- +# name: Template Class Based View +# key: djv +# uuid: django-views-template-cbv +# group: django-views +# -- +# from django.views.generic.base import TemplateView +class ${1:VIEW_NAME}(TemplateView): + """${2:DOC STRING}""" + template_name = "$1.html" + + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context['some_var'] = 'some value' + return context + $0 \ No newline at end of file diff --git a/web-mode/django/README.org b/web-mode/django/README.org new file mode 100644 index 00000000..f2824329 --- /dev/null +++ b/web-mode/django/README.org @@ -0,0 +1,88 @@ +#+TITLE: Django (web-mode) Snippets +#+DATE: April 1, 2020 +#+SINCE: {replace with next tagged release version} +#+STARTUP: inlineimages nofold + +* Table of Contents :TOC_3:noexport: +- [[#description][Description]] + - [[#maintainers][Maintainers]] +- [[#snippets][Snippets]] + - [[#template-tags-trigger-djt][Template Tags (:trigger djt)]] + - [[#template-filters-trigger--][Template Filters (:trigger | )]] + - [[#i18n-trigger-djt-or-][i18n (:trigger djt or |)]] + - [[#l10n-trigger-djt-or-][l10n (:trigger djt or |)]] + - [[#humanize-trigger-][humanize (:trigger |)]] + - [[#timezone-trigger-djt-or-][Timezone (:trigger djt or |)]] +- [[#faq][FAQ]] + - [[#q-when-i-try-to-use-filters-with-the-prefix--it-does-not-expand][Q: When I try to use filters with the prefix | it does not expand]] +- [[#contributing][Contributing]] +- [[#--todo-00][[ ] TODO]] + +* Description +A bunch of Django specific web-model snippets + ++ Complete template tags ++ Complete template filters + + This includes contrib apps, such as humanize + + [[*Q: When I try to use filters with the prefix | it does not expand][See note about using the ~|~ trigger]] + +These snippets are meant to act more of a auto-completion / quick look up +instead of expanding, therefore snippets are grouped as much as possible. + +** Maintainers ++ @jsoa (Author) + +* Snippets +** Template Tags (:trigger djt) +All Django template tags. + ++ ~:group django-templates~ ++ ~:trigger djt~ + + [[file:tags/][list of snippets]] + +** Template Filters (:trigger | ) +All Django template filters. + ++ ~:group django-templates~ ++ ~:trigger |~ + + [[file:filters/][list of snippets]] + +** i18n (:trigger djt or |) +All Django i18n template tags and filters. + ++ ~:group django-templates~ ++ ~:trigger djt or |~ + + [[file:i18n/][list of snippets]] + +** l10n (:trigger djt or |) +All Django l10n template tags and filters. + ++ ~:group django-templates~ ++ ~:trigger djt or |~ + + [[file:l10n/][list of snippets]] + +** humanize (:trigger |) +All Django humanize filters. + ++ ~:group django-templates~ ++ ~:trigger |~ + + [[file:humanize/][list of snippets]] + +** Timezone (:trigger djt or |) +All Django timezone template tags and filters + ++ ~:group django-templates~ ++ ~:trigger djt or |~ + + [[file:tz/][list of snippets]] + +* FAQ +** Q: When I try to use filters with the prefix | it does not expand +When you have something like ~{{ value| }}~ and try to expand it will cannot find +a trigger for ~value|~ instead you will need to include a space before the pipe +in order to get the expansion. i.e. ~{{ value | }}~ + +* Contributing +There is an included ~snippet-templates~ file that includes the templates used to +create the various tags and filters + +* [ ] TODO [0/0] diff --git a/web-mode/django/filters/filter-add b/web-mode/django/filters/filter-add new file mode 100644 index 00000000..02018d8d --- /dev/null +++ b/web-mode/django/filters/filter-add @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter add (django) +# key: | +# uuid: django-templates-filter-add +# group: django-templates +# -- +|add:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-addslashes b/web-mode/django/filters/filter-addslashes new file mode 100644 index 00000000..fe00f62c --- /dev/null +++ b/web-mode/django/filters/filter-addslashes @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter addslashes (django) +# key: | +# uuid: django-templates-filter-addslashes +# group: django-templates +# -- +|addslashes \ No newline at end of file diff --git a/web-mode/django/filters/filter-capfirst b/web-mode/django/filters/filter-capfirst new file mode 100644 index 00000000..fe15904a --- /dev/null +++ b/web-mode/django/filters/filter-capfirst @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter capfirst (django) +# key: | +# uuid: django-templates-filter-capfirst +# group: django-templates +# -- +|capfirst \ No newline at end of file diff --git a/web-mode/django/filters/filter-center b/web-mode/django/filters/filter-center new file mode 100644 index 00000000..ee43109b --- /dev/null +++ b/web-mode/django/filters/filter-center @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter center (django) +# key: | +# uuid: django-templates-filter-center +# group: django-templates +# -- +|center:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-cut b/web-mode/django/filters/filter-cut new file mode 100644 index 00000000..3bbf4f2f --- /dev/null +++ b/web-mode/django/filters/filter-cut @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter cut (django) +# key: | +# uuid: django-templates-filter-cut +# group: django-templates +# -- +|cut:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-date b/web-mode/django/filters/filter-date new file mode 100644 index 00000000..aaa57d1b --- /dev/null +++ b/web-mode/django/filters/filter-date @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter date (django) +# key: | +# uuid: django-templates-filter-date +# group: django-templates +# -- +|date:"${1:FORMAT}" \ No newline at end of file diff --git a/web-mode/django/filters/filter-default b/web-mode/django/filters/filter-default new file mode 100644 index 00000000..334be71e --- /dev/null +++ b/web-mode/django/filters/filter-default @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter default (django) +# key: | +# uuid: django-templates-filter-default +# group: django-templates +# -- +|default:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-default-if-none b/web-mode/django/filters/filter-default-if-none new file mode 100644 index 00000000..6af35b09 --- /dev/null +++ b/web-mode/django/filters/filter-default-if-none @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter default_if_none (django) +# key: | +# uuid: django-templates-filter-default-if-none +# group: django-templates +# -- +|default_if_none:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-dictsort b/web-mode/django/filters/filter-dictsort new file mode 100644 index 00000000..309b002d --- /dev/null +++ b/web-mode/django/filters/filter-dictsort @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter dict_sort (django) +# key: | +# uuid: django-templates-filter-dictsort +# group: django-templates +# -- +|dictsort:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-dictsortreversed b/web-mode/django/filters/filter-dictsortreversed new file mode 100644 index 00000000..5d2d93f8 --- /dev/null +++ b/web-mode/django/filters/filter-dictsortreversed @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter dictsortreversed (django) +# key: | +# uuid: django-templates-filter-dictsortreversed +# group: django-templates +# -- +|dictsortreversed:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-divisbleby b/web-mode/django/filters/filter-divisbleby new file mode 100644 index 00000000..59cc97a6 --- /dev/null +++ b/web-mode/django/filters/filter-divisbleby @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter divibleby (filter) +# key: | +# uuid: django-templates-filter-divisbleby +# group: django-templates +# -- +|divisibleby:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-escape b/web-mode/django/filters/filter-escape new file mode 100644 index 00000000..93306294 --- /dev/null +++ b/web-mode/django/filters/filter-escape @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter escape (django) +# key: | +# uuid: django-templates-filter-escape +# group: django-templates +# -- +|escape \ No newline at end of file diff --git a/web-mode/django/filters/filter-escapejs b/web-mode/django/filters/filter-escapejs new file mode 100644 index 00000000..8b5d8a56 --- /dev/null +++ b/web-mode/django/filters/filter-escapejs @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter escapejs (django) +# key: | +# uuid: django-templates-filter-escapejs +# group: django-templates +# -- +|escapejs \ No newline at end of file diff --git a/web-mode/django/filters/filter-filesizeformat b/web-mode/django/filters/filter-filesizeformat new file mode 100644 index 00000000..a085c6ba --- /dev/null +++ b/web-mode/django/filters/filter-filesizeformat @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter filesizeformat (django) +# key: | +# uuid: django-templates-filter-filesizeformat +# group: django-templates +# -- +|filesizeformat \ No newline at end of file diff --git a/web-mode/django/filters/filter-first b/web-mode/django/filters/filter-first new file mode 100644 index 00000000..e48cdb00 --- /dev/null +++ b/web-mode/django/filters/filter-first @@ -0,0 +1,6 @@ +# -*- mode: snippet -*- +# name: +# key: | +# uuid: django-templates-filter-first +# group: django-templates +# -- diff --git a/web-mode/django/filters/filter-floatformat b/web-mode/django/filters/filter-floatformat new file mode 100644 index 00000000..675245ff --- /dev/null +++ b/web-mode/django/filters/filter-floatformat @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter floatformat (django) +# key: | +# uuid: django-templates-filter-floatformat +# group: django-templates +# -- +|floatformat:$0 \ No newline at end of file diff --git a/web-mode/django/filters/filter-force-escape b/web-mode/django/filters/filter-force-escape new file mode 100644 index 00000000..0e7a69b5 --- /dev/null +++ b/web-mode/django/filters/filter-force-escape @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter force_escape (django) +# key: | +# uuid: django-templates-filter-force-escape +# group: django-templates +# -- +|force_escape \ No newline at end of file diff --git a/web-mode/django/filters/filter-get-digit b/web-mode/django/filters/filter-get-digit new file mode 100644 index 00000000..1db56feb --- /dev/null +++ b/web-mode/django/filters/filter-get-digit @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter get_digit (django) +# key: | +# uuid: django-templates-filter-get-digit +# group: django-templates +# -- +|get_digit:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-iriencode b/web-mode/django/filters/filter-iriencode new file mode 100644 index 00000000..e10ad6f7 --- /dev/null +++ b/web-mode/django/filters/filter-iriencode @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter iriencode (django) +# key: | +# uuid: django-templates-filter-iriencode +# group: django-templates +# -- +|iriencode \ No newline at end of file diff --git a/web-mode/django/filters/filter-join b/web-mode/django/filters/filter-join new file mode 100644 index 00000000..d4525357 --- /dev/null +++ b/web-mode/django/filters/filter-join @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter join (django) +# key: | +# uuid: django-templates-filter-join +# group: django-templates +# -- +|join"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-json-script b/web-mode/django/filters/filter-json-script new file mode 100644 index 00000000..3807ef3e --- /dev/null +++ b/web-mode/django/filters/filter-json-script @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter json_script (django) +# key: | +# uuid: django-templates-filter-json-script +# group: django-templates +# -- +|json_script:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-last b/web-mode/django/filters/filter-last new file mode 100644 index 00000000..2240bfd2 --- /dev/null +++ b/web-mode/django/filters/filter-last @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter last (django) +# key: | +# uuid: django-templates-filter-last +# group: django-templates +# -- +|last \ No newline at end of file diff --git a/web-mode/django/filters/filter-length b/web-mode/django/filters/filter-length new file mode 100644 index 00000000..77e5964d --- /dev/null +++ b/web-mode/django/filters/filter-length @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter length (django) +# key: | +# uuid: django-templates-filter-length +# group: django-templates +# -- +|length \ No newline at end of file diff --git a/web-mode/django/filters/filter-length-is b/web-mode/django/filters/filter-length-is new file mode 100644 index 00000000..3a5c1b00 --- /dev/null +++ b/web-mode/django/filters/filter-length-is @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter length_is (django) +# key: | +# uuid: django-templates-filter-length-is +# group: django-templates +# -- +|length_is:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-linebreaks b/web-mode/django/filters/filter-linebreaks new file mode 100644 index 00000000..183bb30a --- /dev/null +++ b/web-mode/django/filters/filter-linebreaks @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter linebreaks (django) +# key: | +# uuid: django-templates-filter-linebreaks +# group: django-templates +# -- +|linebreaks \ No newline at end of file diff --git a/web-mode/django/filters/filter-linebreaksbr b/web-mode/django/filters/filter-linebreaksbr new file mode 100644 index 00000000..03973dba --- /dev/null +++ b/web-mode/django/filters/filter-linebreaksbr @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter linebreaksbr (django) +# key: | +# uuid: django-templates-filter-linebreaksbr +# group: django-templates +# -- +|linebreaksbr \ No newline at end of file diff --git a/web-mode/django/filters/filter-ljust b/web-mode/django/filters/filter-ljust new file mode 100644 index 00000000..9d2157bf --- /dev/null +++ b/web-mode/django/filters/filter-ljust @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter ljust (django) +# key: | +# uuid: django-templates-filter-ljust +# group: django-templates +# -- +|ljust:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-lower b/web-mode/django/filters/filter-lower new file mode 100644 index 00000000..4625ecbb --- /dev/null +++ b/web-mode/django/filters/filter-lower @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter lower (django) +# key: | +# uuid: django-templates-filter-lower +# group: django-templates +# -- +|lower \ No newline at end of file diff --git a/web-mode/django/filters/filter-make-list b/web-mode/django/filters/filter-make-list new file mode 100644 index 00000000..dd61dc7e --- /dev/null +++ b/web-mode/django/filters/filter-make-list @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter make_list (django) +# key: | +# uuid: django-templates-filter-make-list +# group: django-templates +# -- +|make_list \ No newline at end of file diff --git a/web-mode/django/filters/filter-phone2numeric b/web-mode/django/filters/filter-phone2numeric new file mode 100644 index 00000000..42af3427 --- /dev/null +++ b/web-mode/django/filters/filter-phone2numeric @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter phone2numeric (django) +# key: | +# uuid: django-templates-filter-phone2numeric +# group: django-templates +# -- +|phone2numeric \ No newline at end of file diff --git a/web-mode/django/filters/filter-pluralize b/web-mode/django/filters/filter-pluralize new file mode 100644 index 00000000..41dc6ad5 --- /dev/null +++ b/web-mode/django/filters/filter-pluralize @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter pluralize (django) +# key: | +# uuid: django-templates-filter-pluralize +# group: django-templates +# -- +|pluralize:"${1:singual},${2:plural}" \ No newline at end of file diff --git a/web-mode/django/filters/filter-pprint b/web-mode/django/filters/filter-pprint new file mode 100644 index 00000000..0bcef0a0 --- /dev/null +++ b/web-mode/django/filters/filter-pprint @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter pprint (django) +# key: | +# uuid: django-templates-filter-pprint +# group: django-templates +# -- +|pprint \ No newline at end of file diff --git a/web-mode/django/filters/filter-random b/web-mode/django/filters/filter-random new file mode 100644 index 00000000..0bb5a721 --- /dev/null +++ b/web-mode/django/filters/filter-random @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter random (django) +# key: | +# uuid: django-templates-filter-random +# group: django-templates +# -- +|random \ No newline at end of file diff --git a/web-mode/django/filters/filter-rjust b/web-mode/django/filters/filter-rjust new file mode 100644 index 00000000..940a7d24 --- /dev/null +++ b/web-mode/django/filters/filter-rjust @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter rjust (django) +# key: | +# uuid: django-templates-filter-rjust +# group: django-templates +# -- +|rjust:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-safe b/web-mode/django/filters/filter-safe new file mode 100644 index 00000000..96ec699b --- /dev/null +++ b/web-mode/django/filters/filter-safe @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter safe (django) +# key: | +# uuid: django-templates-filter-safe +# group: django-templates +# -- +|safe \ No newline at end of file diff --git a/web-mode/django/filters/filter-safeseq b/web-mode/django/filters/filter-safeseq new file mode 100644 index 00000000..d348335c --- /dev/null +++ b/web-mode/django/filters/filter-safeseq @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter safeseq (django) +# key: | +# uuid: django-templates-filter-safeseq +# group: django-templates +# -- +|safeseq \ No newline at end of file diff --git a/web-mode/django/filters/filter-slice b/web-mode/django/filters/filter-slice new file mode 100644 index 00000000..15a9cad9 --- /dev/null +++ b/web-mode/django/filters/filter-slice @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter slice (django) +# key: | +# uuid: django-templates-filter-slice +# group: django-templates +# -- +|slice:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-slugify b/web-mode/django/filters/filter-slugify new file mode 100644 index 00000000..f23dac04 --- /dev/null +++ b/web-mode/django/filters/filter-slugify @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter slugify (django) +# key: | +# uuid: django-templates-filter-slugify +# group: django-templates +# -- +|slugify \ No newline at end of file diff --git a/web-mode/django/filters/filter-stringformat b/web-mode/django/filters/filter-stringformat new file mode 100644 index 00000000..ad071c90 --- /dev/null +++ b/web-mode/django/filters/filter-stringformat @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter stringformat (django) +# key: | +# uuid: django-templates-filter-stringformat +# group: django-templates +# -- +|stringformat:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-striptags b/web-mode/django/filters/filter-striptags new file mode 100644 index 00000000..b1a28914 --- /dev/null +++ b/web-mode/django/filters/filter-striptags @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter striptags (django) +# key: | +# uuid: django-templates-filter-striptags +# group: django-templates +# -- +|striptags \ No newline at end of file diff --git a/web-mode/django/filters/filter-time b/web-mode/django/filters/filter-time new file mode 100644 index 00000000..4d1e30ac --- /dev/null +++ b/web-mode/django/filters/filter-time @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter time (django) +# key: | +# uuid: django-templates-filter-time +# group: django-templates +# -- +|time:"$0" \ No newline at end of file diff --git a/web-mode/django/filters/filter-timesince b/web-mode/django/filters/filter-timesince new file mode 100644 index 00000000..5f2415d1 --- /dev/null +++ b/web-mode/django/filters/filter-timesince @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter timesince (django) +# key: | +# uuid: django-templates-filter-timesince +# group: django-templates +# -- +|timesince:$0 \ No newline at end of file diff --git a/web-mode/django/filters/filter-timeuntil b/web-mode/django/filters/filter-timeuntil new file mode 100644 index 00000000..def49d2a --- /dev/null +++ b/web-mode/django/filters/filter-timeuntil @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter timeuntil (django) +# key: | +# uuid: django-templates-filter-timeuntil +# group: django-templates +# -- +|timeuntil:$0 \ No newline at end of file diff --git a/web-mode/django/filters/filter-title b/web-mode/django/filters/filter-title new file mode 100644 index 00000000..17494b93 --- /dev/null +++ b/web-mode/django/filters/filter-title @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter title (django) +# key: | +# uuid: django-templates-filter-title +# group: django-templates +# -- +|title \ No newline at end of file diff --git a/web-mode/django/filters/filter-truncatechars b/web-mode/django/filters/filter-truncatechars new file mode 100644 index 00000000..bac186e6 --- /dev/null +++ b/web-mode/django/filters/filter-truncatechars @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter truncatechars (django) +# key: | +# uuid: django-templates-filter-truncatechars +# group: django-templates +# -- +|truncatechars:$0 \ No newline at end of file diff --git a/web-mode/django/filters/filter-truncatechars-html b/web-mode/django/filters/filter-truncatechars-html new file mode 100644 index 00000000..49a346e0 --- /dev/null +++ b/web-mode/django/filters/filter-truncatechars-html @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter truncatechars_html (django) +# key: | +# uuid: django-templates-filter-truncatechars-html +# group: django-templates +# -- +|truncatechars_html:$0 diff --git a/web-mode/django/filters/filter-truncatewords b/web-mode/django/filters/filter-truncatewords new file mode 100644 index 00000000..d3eb3f27 --- /dev/null +++ b/web-mode/django/filters/filter-truncatewords @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter truncatewords (django) +# key: | +# uuid: django-templates-filter-truncatewords +# group: django-templates +# -- +|truncatewords:$0 \ No newline at end of file diff --git a/web-mode/django/filters/filter-truncatewords-html b/web-mode/django/filters/filter-truncatewords-html new file mode 100644 index 00000000..52037e18 --- /dev/null +++ b/web-mode/django/filters/filter-truncatewords-html @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter truncatewords_html (django) +# key: | +# uuid: django-templates-filter-truncatewords-html +# group: django-templates +# -- +|truncatewords_html:$0 diff --git a/web-mode/django/filters/filter-unordered-list b/web-mode/django/filters/filter-unordered-list new file mode 100644 index 00000000..bb16c663 --- /dev/null +++ b/web-mode/django/filters/filter-unordered-list @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter unordered_list (django) +# key: | +# uuid: django-templates-filter-unordered-list +# group: django-templates +# -- +|unordered_list \ No newline at end of file diff --git a/web-mode/django/filters/filter-upper b/web-mode/django/filters/filter-upper new file mode 100644 index 00000000..35139f6d --- /dev/null +++ b/web-mode/django/filters/filter-upper @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter upper (django) +# key: | +# uuid: django-templates-filter-upper +# group: django-templates +# -- +|upper \ No newline at end of file diff --git a/web-mode/django/filters/filter-urlencode b/web-mode/django/filters/filter-urlencode new file mode 100644 index 00000000..66633b20 --- /dev/null +++ b/web-mode/django/filters/filter-urlencode @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter urlencode (django) +# key: | +# uuid: django-templates-filter-urlencode +# group: django-templates +# -- +|urlencode \ No newline at end of file diff --git a/web-mode/django/filters/filter-urlize b/web-mode/django/filters/filter-urlize new file mode 100644 index 00000000..c4b96b5c --- /dev/null +++ b/web-mode/django/filters/filter-urlize @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter urlize (django) +# key: | +# uuid: django-templates-filter-urlize +# group: django-templates +# -- +|urlize \ No newline at end of file diff --git a/web-mode/django/filters/filter-urlizetrunc b/web-mode/django/filters/filter-urlizetrunc new file mode 100644 index 00000000..f944ef4b --- /dev/null +++ b/web-mode/django/filters/filter-urlizetrunc @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter urlizetrunc (django) +# key: | +# uuid: django-templates-filter-urlizetrunc +# group: django-templates +# -- +|urlizetrunc:$0 \ No newline at end of file diff --git a/web-mode/django/filters/filter-wordcount b/web-mode/django/filters/filter-wordcount new file mode 100644 index 00000000..8195adce --- /dev/null +++ b/web-mode/django/filters/filter-wordcount @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter wordcount (django) +# key: | +# uuid: django-templates-filter-wordcount +# group: django-templates +# -- +|wordcount \ No newline at end of file diff --git a/web-mode/django/filters/filter-wordwrap b/web-mode/django/filters/filter-wordwrap new file mode 100644 index 00000000..4e9ccc4c --- /dev/null +++ b/web-mode/django/filters/filter-wordwrap @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter wordwrap (django) +# key: | +# uuid: django-templates-filter-wordwrap +# group: django-templates +# -- +|wordwrap:$0 \ No newline at end of file diff --git a/web-mode/django/filters/filter-yesno b/web-mode/django/filters/filter-yesno new file mode 100644 index 00000000..ddbec57b --- /dev/null +++ b/web-mode/django/filters/filter-yesno @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter yesno (django) +# key: | +# uuid: django-templates-filter-yesno +# group: django-templates +# -- +|yesno:"${1:YES},${2:NO},${3:MAYBE}" \ No newline at end of file diff --git a/web-mode/django/humanize/filter-humanize-apnumber b/web-mode/django/humanize/filter-humanize-apnumber new file mode 100644 index 00000000..368c482c --- /dev/null +++ b/web-mode/django/humanize/filter-humanize-apnumber @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: humanize apnumber (django) +# key: | +# uuid: django-templates-filter-humanize-apnumber +# group: django-templates +# -- +|apnumber \ No newline at end of file diff --git a/web-mode/django/humanize/filter-humanize-intcomma b/web-mode/django/humanize/filter-humanize-intcomma new file mode 100644 index 00000000..774b8dcf --- /dev/null +++ b/web-mode/django/humanize/filter-humanize-intcomma @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: humanize filter intcomma (django) +# key: | +# uuid: django-templates-filter-humanize-intcomma +# group: django-templates +# -- +|intcomma \ No newline at end of file diff --git a/web-mode/django/humanize/filter-humanize-intword b/web-mode/django/humanize/filter-humanize-intword new file mode 100644 index 00000000..8c9cffd5 --- /dev/null +++ b/web-mode/django/humanize/filter-humanize-intword @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: humanize filter intword (django) +# key: | +# uuid: django-templates-filter-humanize-intword +# group: django-templates +# -- +|intword \ No newline at end of file diff --git a/web-mode/django/humanize/filter-humanize-naturalday b/web-mode/django/humanize/filter-humanize-naturalday new file mode 100644 index 00000000..15488e3c --- /dev/null +++ b/web-mode/django/humanize/filter-humanize-naturalday @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: humanize filter naturalday (django) +# key: | +# uuid: django-templates-filter-humanize-naturalday +# group: django-templates +# -- +|naturalday \ No newline at end of file diff --git a/web-mode/django/humanize/filter-humanize-naturaltime b/web-mode/django/humanize/filter-humanize-naturaltime new file mode 100644 index 00000000..8e710706 --- /dev/null +++ b/web-mode/django/humanize/filter-humanize-naturaltime @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: humanize filter naturaltime (django) +# key: | +# uuid: django-templates-filter-humanize-naturaltime +# group: django-templates +# -- +|naturaltime \ No newline at end of file diff --git a/web-mode/django/humanize/filter-humanize-ordinal b/web-mode/django/humanize/filter-humanize-ordinal new file mode 100644 index 00000000..a2f979d1 --- /dev/null +++ b/web-mode/django/humanize/filter-humanize-ordinal @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: humanize filter ordinal (django) +# key: | +# uuid: django-templates-filter-humanize-ordinal +# group: django-templates +# -- +|ordinal \ No newline at end of file diff --git a/web-mode/django/i18n/i18n-blocktrans b/web-mode/django/i18n/i18n-blocktrans new file mode 100644 index 00000000..cd82c035 --- /dev/null +++ b/web-mode/django/i18n/i18n-blocktrans @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: i18n blocktrans (django) +# key: djt +# uuid: django-templates-i18n-blocktrans +# group: django-templates +# -- +{% blocktrans${1: with ${2:KEY}=${3:VALUE}} %} + $0 +{% endblocktrans %} \ No newline at end of file diff --git a/web-mode/django/i18n/i18n-filter-language-bidi b/web-mode/django/i18n/i18n-filter-language-bidi new file mode 100644 index 00000000..1c1e2971 --- /dev/null +++ b/web-mode/django/i18n/i18n-filter-language-bidi @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: i18n filter language_bidi +# key: | +# uuid: django-templates-i18n-filter-language-bidi +# group: django-templates +# -- +|language_bidi \ No newline at end of file diff --git a/web-mode/django/i18n/i18n-filter-language-name b/web-mode/django/i18n/i18n-filter-language-name new file mode 100644 index 00000000..1d8921fd --- /dev/null +++ b/web-mode/django/i18n/i18n-filter-language-name @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: i18n filter language_name (django) +# key: | +# uuid: django-templates-i18n-filter-language-name +# group: django-templates +# -- +|language_name \ No newline at end of file diff --git a/web-mode/django/i18n/i18n-filter-language-name-local b/web-mode/django/i18n/i18n-filter-language-name-local new file mode 100644 index 00000000..7c0392ad --- /dev/null +++ b/web-mode/django/i18n/i18n-filter-language-name-local @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: i18n filter language_name_local +# key: | +# uuid: django-templates-i18n-filter-language-name-local +# group: django-templates +# -- +|language_name_local \ No newline at end of file diff --git a/web-mode/django/i18n/i18n-get-available-languages b/web-mode/django/i18n/i18n-get-available-languages new file mode 100644 index 00000000..85d1845d --- /dev/null +++ b/web-mode/django/i18n/i18n-get-available-languages @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: i18n get_available_languages (django) +# key: djt +# uuid: django-templates-i18n-get-available-languages +# group: django-templates +# -- +{% get_available_languages as $0 %} \ No newline at end of file diff --git a/web-mode/django/i18n/i18n-get-current-language b/web-mode/django/i18n/i18n-get-current-language new file mode 100644 index 00000000..8d239c07 --- /dev/null +++ b/web-mode/django/i18n/i18n-get-current-language @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: i18n get_current_language (django) +# key: djt +# uuid: django-templates-i18n-get-current-language +# group: django-templates +# -- +{% get_current_language as $0 %} \ No newline at end of file diff --git a/web-mode/django/i18n/i18n-get-current-language-bidi b/web-mode/django/i18n/i18n-get-current-language-bidi new file mode 100644 index 00000000..16e80243 --- /dev/null +++ b/web-mode/django/i18n/i18n-get-current-language-bidi @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: i18n get_current_language_bidi +# key: djt +# uuid: django-templates-i18n-get-current-language-bidi +# group: django-templates +# -- +{% get_current_language_bidi as $0 %} diff --git a/web-mode/django/i18n/i18n-get-language-info b/web-mode/django/i18n/i18n-get-language-info new file mode 100644 index 00000000..be80bec8 --- /dev/null +++ b/web-mode/django/i18n/i18n-get-language-info @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: i18n get_language_info (django) +# key: djt +# uuid: django-templates-i18n-get-language-info +# group: django-templates +# -- +{% get_language_info for ${1:LANGUAGE CODE} as ${2:VARIABLE} %} diff --git a/web-mode/django/i18n/i18n-get-language-info-list b/web-mode/django/i18n/i18n-get-language-info-list new file mode 100644 index 00000000..9a7f9390 --- /dev/null +++ b/web-mode/django/i18n/i18n-get-language-info-list @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: i18n get_language_list (django) +# key: djt +# uuid: django-templates-i18n-get-language-info-list +# group: django-templates +# -- +{% get_language_info_list for ${1:AVAILABLE LANGUAGESS} as ${2:VARIABLE} %} \ No newline at end of file diff --git a/web-mode/django/i18n/i18n-trans b/web-mode/django/i18n/i18n-trans new file mode 100644 index 00000000..500e4e83 --- /dev/null +++ b/web-mode/django/i18n/i18n-trans @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: i18n trans (django) +# key: djt +# uuid: django-templates-i18n-trans +# group: django-templates +# -- +{% trans ${1:VALUE or STRING}${2: noop}${3: as ${4:VARIABLE}} %} \ No newline at end of file diff --git a/web-mode/django/l10n/l10n-localize b/web-mode/django/l10n/l10n-localize new file mode 100644 index 00000000..fe8da43d --- /dev/null +++ b/web-mode/django/l10n/l10n-localize @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: l10n localize +# key: djt +# uuid: django-templates-l10n-localize +# group: django-templates +# -- +{% localize ${1:$$(yas-select-value '("on" "off"))} %} + $0 +{% endlocalize %} \ No newline at end of file diff --git a/web-mode/django/l10n/l10n-unlocalize b/web-mode/django/l10n/l10n-unlocalize new file mode 100644 index 00000000..7c923965 --- /dev/null +++ b/web-mode/django/l10n/l10n-unlocalize @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: l10n filter unlocalize (django) +# key: | +# uuid: django-templates-l10n-unlocalize +# group: django-templates +# -- +|unlocalize \ No newline at end of file diff --git a/web-mode/django/snippet-templates b/web-mode/django/snippet-templates new file mode 100644 index 00000000..b73ea3cc --- /dev/null +++ b/web-mode/django/snippet-templates @@ -0,0 +1,20 @@ +# -*- mode: fundamental -*- + +### Template tags + +# -*- mode: snippet -*- +# name: +# key: | +# uuid: django-templates- +# group: django-templates + +# -- + +### Template filters + +# -*- mode: snippet -*- +# name: +# key: | +# uuid: django-templates- +# group: django-templates +# -- diff --git a/web-mode/django/tags/autoescape b/web-mode/django/tags/autoescape new file mode 100644 index 00000000..96a2d876 --- /dev/null +++ b/web-mode/django/tags/autoescape @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: autoescape (django) +# key: djt +# uuid: django-templates-autoescape +# group: django-templates +# -- +{% autoescape ${1:$$(yas-choose-value '("on" "off"))} %} + $0 +{% endautoescape %} \ No newline at end of file diff --git a/web-mode/django/tags/block b/web-mode/django/tags/block new file mode 100644 index 00000000..6d231853 --- /dev/null +++ b/web-mode/django/tags/block @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: block (django) +# key: djt +# uuid: django-templates-block +# group: django-templates +# -- +{% block ${1:NAME} %} + $0 +{% endblock %} \ No newline at end of file diff --git a/web-mode/django/tags/comment b/web-mode/django/tags/comment new file mode 100644 index 00000000..a2e30e7d --- /dev/null +++ b/web-mode/django/tags/comment @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: common (django) +# key: djt +# uuid: django-templates-comment +# group: django-templates +# -- +{% comment "${1:NOTE}" %} + ${2:COMMENT}$0 +{% endcomment %} diff --git a/web-mode/django/tags/csrf-token b/web-mode/django/tags/csrf-token new file mode 100644 index 00000000..bfd83497 --- /dev/null +++ b/web-mode/django/tags/csrf-token @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: csrf-token (django) +# key: djt +# uuid: django-templates-csrf-token +# group: django-templates +# -- +{% csrf_token %} \ No newline at end of file diff --git a/web-mode/django/tags/cycle b/web-mode/django/tags/cycle new file mode 100644 index 00000000..62c35079 --- /dev/null +++ b/web-mode/django/tags/cycle @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: cycle (django) +# key: djt +# uuid: django-templates-cycle +# group: django-templates +# -- +{% cycle "${1:CYCLE 1}" "${2:CYCLE 2}" %}$0 \ No newline at end of file diff --git a/web-mode/django/tags/extends b/web-mode/django/tags/extends new file mode 100644 index 00000000..1e559338 --- /dev/null +++ b/web-mode/django/tags/extends @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: extends (django) +# key: djt +# uuid: django-templates-extends +# group: django-templates +# -- +{% extends "${1:TEMPLATE}" %}$0 \ No newline at end of file diff --git a/web-mode/django/tags/filter b/web-mode/django/tags/filter new file mode 100644 index 00000000..601e978f --- /dev/null +++ b/web-mode/django/tags/filter @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: filter (django) +# key: djt +# uuid: django-templates-filter +# group: django-templates +# -- +{% filter ${1:FILTER 1}|${2:FILTER 2} %} + $0 +{% endfilter %} \ No newline at end of file diff --git a/web-mode/django/tags/first b/web-mode/django/tags/first new file mode 100644 index 00000000..c4afefdb --- /dev/null +++ b/web-mode/django/tags/first @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter first (django) +# key: djt +# uuid: django-templates-first +# group: django-templates +# -- +|first diff --git a/web-mode/django/tags/firstof b/web-mode/django/tags/firstof new file mode 100644 index 00000000..c99c4583 --- /dev/null +++ b/web-mode/django/tags/firstof @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: firstof (django) +# key: djt +# uuid: django-templates-firstof +# group: django-templates +# -- +{% firstof ${1:VALUE 1} ${2: VALUE 2} $0 %} \ No newline at end of file diff --git a/web-mode/django/tags/for b/web-mode/django/tags/for new file mode 100644 index 00000000..dca0d8fa --- /dev/null +++ b/web-mode/django/tags/for @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: for (django) +# key: djt +# uuid: django-templates-for +# group: django-templates +# -- +{% for ${1:KEY} in ${2:ITERABLE}} %} + $0 +{% endfor %} diff --git a/web-mode/django/tags/for-empty b/web-mode/django/tags/for-empty new file mode 100644 index 00000000..43bce993 --- /dev/null +++ b/web-mode/django/tags/for-empty @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: for ... empty (django) +# key: djt +# uuid: django-templates-for-empty +# group: django-templates +# -- +{% for ${1:KEY} in ${2:ITERABLE} %} + $0 +{% empty %} + +{% endfor %} \ No newline at end of file diff --git a/web-mode/django/tags/for-reversed b/web-mode/django/tags/for-reversed new file mode 100644 index 00000000..d2c06dbe --- /dev/null +++ b/web-mode/django/tags/for-reversed @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: for reversed (django) +# key: djt +# uuid: django-templates-for-reversed +# group: django-templates +# -- +{% for ${1:KEY} in ${2:ITERABLE}} reversed %} + $0 +{% endfor %} diff --git a/web-mode/django/tags/for-with-doc b/web-mode/django/tags/for-with-doc new file mode 100644 index 00000000..8546768a --- /dev/null +++ b/web-mode/django/tags/for-with-doc @@ -0,0 +1,19 @@ +# -*- mode: snippet -*- +# name: for with doc (django) +# key: djt +# uuid: django-templates-for-with-doc +# group: django-templates +# -- +{% comment "For Loop Variables" %} + forloop.counter The current iteration of the loop (1-indexed) + forloop.counter0 The current iteration of the loop (0-indexed) + forloop.revcounter The number of iterations from the end of the loop (1-indexed) + forloop.revcounter0 The number of iterations from the end of the loop (0-indexed) + forloop.first True if this is the first time through the loop + forloop.last True if this is the last time through the loop + forloop.parentloop For nested loops, this is the loop surrounding the current one +{% endcomment %} + +{% for ${1:KEY} in ${2:ITERABLE}} %} + $0 +{% endfor %} \ No newline at end of file diff --git a/web-mode/django/tags/get-media-prefix b/web-mode/django/tags/get-media-prefix new file mode 100644 index 00000000..f5dcc9fe --- /dev/null +++ b/web-mode/django/tags/get-media-prefix @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: get_media_prefix (django) +# key: djt +# uuid: django-templates-get-media-prefix +# group: django-templates +# -- +{% get_media_prefix${1: as ${2:MEDIA PREFIX} %} diff --git a/web-mode/django/tags/get-static-prefix b/web-mode/django/tags/get-static-prefix new file mode 100644 index 00000000..50f16b39 --- /dev/null +++ b/web-mode/django/tags/get-static-prefix @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: get_static_prefix (django) +# key: djt +# uuid: django-templates-get-static-prefix +# group: django-templates +# -- +{% get_static_prefix${1: as ${2:STATIC PREFIX} %} \ No newline at end of file diff --git a/web-mode/django/tags/if b/web-mode/django/tags/if new file mode 100644 index 00000000..a934dfb6 --- /dev/null +++ b/web-mode/django/tags/if @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: if (django) +# key: djt +# uuid: django-templates-if +# group: django-templates +# -- +{% if ${1:CONDITION} ${2:and ${3:CONDIITION}} %} + $0 +${4:{% elif ${5:CONDITION} %}} +${6:{% else %}} +{% endif %} \ No newline at end of file diff --git a/web-mode/django/tags/ifchanged b/web-mode/django/tags/ifchanged new file mode 100644 index 00000000..01dee7d4 --- /dev/null +++ b/web-mode/django/tags/ifchanged @@ -0,0 +1,11 @@ +# -*- mode: snippet -*- +# name: ifchanged (django) +# key: djt +# uuid: django-templates-ifchanged +# group: django-templates +# -- +{% ifchanged $(1: VARIABLE} ${2: VARIABLE} %} + $0 +{% else %} + +{% endifchanged %} \ No newline at end of file diff --git a/web-mode/django/tags/ifequal b/web-mode/django/tags/ifequal new file mode 100644 index 00000000..2b9c6c6e --- /dev/null +++ b/web-mode/django/tags/ifequal @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: ifequal (django) +# key: djt +# uuid: django-templates-ifequal +# group: django-templates +# -- +{% ifequal ${1:VALUE 1} ${2:VALUE 2} %} + $0 +{% endifequal %} \ No newline at end of file diff --git a/web-mode/django/tags/include b/web-mode/django/tags/include new file mode 100644 index 00000000..34e48657 --- /dev/null +++ b/web-mode/django/tags/include @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: include (django) +# key: djt +# uuid: django-templates-include +# group: django-templates +# -- +{% include "${1: TEMPLATE NAME}"${2: with ${3:key}=${4:value}} ${5:only} %} \ No newline at end of file diff --git a/web-mode/django/tags/language-name-translated b/web-mode/django/tags/language-name-translated new file mode 100644 index 00000000..d00eb346 --- /dev/null +++ b/web-mode/django/tags/language-name-translated @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: i18n filter language_name_translated +# key: djt +# uuid: django-templates-i18n-filter-language-name-translated +# group: django-templates +# -- +|language_name_translated \ No newline at end of file diff --git a/web-mode/django/tags/linenumbers b/web-mode/django/tags/linenumbers new file mode 100644 index 00000000..75c61cc9 --- /dev/null +++ b/web-mode/django/tags/linenumbers @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: filter linenumbers (django) +# key: djt +# uuid: django-templates-filter-linenumbers +# group: django-templates +# -- +|linenumbers \ No newline at end of file diff --git a/web-mode/django/tags/load b/web-mode/django/tags/load new file mode 100644 index 00000000..af10fe30 --- /dev/null +++ b/web-mode/django/tags/load @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: load (django) +# key: djt +# uuid: django-templates-load +# group: django-templates +# -- +{% load ${1:MODULE} ${2:from ${3:MODULE}} %} \ No newline at end of file diff --git a/web-mode/django/tags/lorem b/web-mode/django/tags/lorem new file mode 100644 index 00000000..015302a5 --- /dev/null +++ b/web-mode/django/tags/lorem @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: lorem (django) +# key: djt +# uuid: django-templates-lorem +# group: django-templates +# -- +{% lorem ${1:COUNT}${2: METHOD$$(yas-choose-value '(" w" " p" " b"))}${3: random} %} \ No newline at end of file diff --git a/web-mode/django/tags/now b/web-mode/django/tags/now new file mode 100644 index 00000000..8b839773 --- /dev/null +++ b/web-mode/django/tags/now @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: now (django) +# key: djt +# uuid: django-templates-now +# group: django-templates +# -- +{% now "${1:FORMAT}"${2: as ${3:VARIABLE}} %} \ No newline at end of file diff --git a/web-mode/django/tags/regroup b/web-mode/django/tags/regroup new file mode 100644 index 00000000..82791fa8 --- /dev/null +++ b/web-mode/django/tags/regroup @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: regroup (django) +# key: djt +# uuid: django-templates-regroup +# group: django-templates +# -- +{% regroup ${1:DICT} by ${2:FIELD} as ${3:VARIABLE} %} diff --git a/web-mode/django/tags/resetcycle b/web-mode/django/tags/resetcycle new file mode 100644 index 00000000..8ec527b3 --- /dev/null +++ b/web-mode/django/tags/resetcycle @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: resetcycle (django) +# key: djt +# uuid: django-templates-resetcycle +# group: django-templates +# -- +{% resetcycle %} \ No newline at end of file diff --git a/web-mode/django/tags/spaceless b/web-mode/django/tags/spaceless new file mode 100644 index 00000000..7d05551c --- /dev/null +++ b/web-mode/django/tags/spaceless @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: spaceless (django) +# key: djt +# uuid: django-templates-spaceless +# group: django-templates +# -- +{% spaceless %} + $0 +{% endspaceless %} \ No newline at end of file diff --git a/web-mode/django/tags/static b/web-mode/django/tags/static new file mode 100644 index 00000000..59b1f04f --- /dev/null +++ b/web-mode/django/tags/static @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: static (django) +# key: djt +# uuid: django-templates-static +# group: django-templates +# -- +{% static "${1:FILE}" %} \ No newline at end of file diff --git a/web-mode/django/tags/templatetag b/web-mode/django/tags/templatetag new file mode 100644 index 00000000..4c6f2ff8 --- /dev/null +++ b/web-mode/django/tags/templatetag @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: templatetag (django) +# key: djt +# uuid: django-templates-templatetag +# group: django-templates +# -- +{% templatetag ${1:$$(yas-choose-value '("openblock" "closeblock" "openvariable" "closevariable" "openbrace" "closebrace" "opencomment" "closecomment"))} %} \ No newline at end of file diff --git a/web-mode/django/tags/url b/web-mode/django/tags/url new file mode 100644 index 00000000..059f906c --- /dev/null +++ b/web-mode/django/tags/url @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: url (django) +# key: djt +# uuid: django-templates-url +# group: django-templates +# -- +{% url '${1:URL NAME}' ${2:ARG1}${3: as ${4:VARIABLE}} %} \ No newline at end of file diff --git a/web-mode/django/tags/verbatim b/web-mode/django/tags/verbatim new file mode 100644 index 00000000..5e5e5a77 --- /dev/null +++ b/web-mode/django/tags/verbatim @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: verbatim (django) +# key: djt +# uuid: django-templates-verbatim +# group: django-templates +# -- +{% verbatim %} + $0 +{% endverbatim %} \ No newline at end of file diff --git a/web-mode/django/tags/widthratio b/web-mode/django/tags/widthratio new file mode 100644 index 00000000..10c5bfd5 --- /dev/null +++ b/web-mode/django/tags/widthratio @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: widthratio (django) +# key: djt +# uuid: django-templates-widthratio +# group: django-templates +# -- +{% widthratio ${1:VALUE} ${2:MAX VALUE} ${3:MAX WIDTH} %} \ No newline at end of file diff --git a/web-mode/django/tags/with b/web-mode/django/tags/with new file mode 100644 index 00000000..1da1a144 --- /dev/null +++ b/web-mode/django/tags/with @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: with (django) +# key: djt +# uuid: django-templates-with +# group: django-templates +# -- +{% with ${1:KEY}=${2:VALUE} %} \ No newline at end of file diff --git a/web-mode/django/tz/tz-filter-localtime b/web-mode/django/tz/tz-filter-localtime new file mode 100644 index 00000000..7ba86a1d --- /dev/null +++ b/web-mode/django/tz/tz-filter-localtime @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: tz filter localtime (django) +# key: | +# uuid: django-templates-tz-filter-localtime +# group: django-templates +# -- +|localtime \ No newline at end of file diff --git a/web-mode/django/tz/tz-filter-timezone b/web-mode/django/tz/tz-filter-timezone new file mode 100644 index 00000000..b2b74c56 --- /dev/null +++ b/web-mode/django/tz/tz-filter-timezone @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: tz filter timezone (django) +# key: | +# uuid: django-templates-tz-filter-timezone +# group: django-templates +# -- +|timezone:"${1:TIME ZONE}" \ No newline at end of file diff --git a/web-mode/django/tz/tz-filter-utc b/web-mode/django/tz/tz-filter-utc new file mode 100644 index 00000000..98e461f0 --- /dev/null +++ b/web-mode/django/tz/tz-filter-utc @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: tz filter utc (django) +# key: | +# uuid: django-templates-tz-filter-utc +# group: django-templates +# -- +|utc \ No newline at end of file diff --git a/web-mode/django/tz/tz-get-current-timezone b/web-mode/django/tz/tz-get-current-timezone new file mode 100644 index 00000000..24a07ed5 --- /dev/null +++ b/web-mode/django/tz/tz-get-current-timezone @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: tz get_current_timezone (django) +# key: djt +# uuid: django-templates-tz-get-current-timezone +# group: django-templates +# -- +{% get_current_timezone as $0 %} \ No newline at end of file diff --git a/web-mode/django/tz/tz-localtime b/web-mode/django/tz/tz-localtime new file mode 100644 index 00000000..dd328729 --- /dev/null +++ b/web-mode/django/tz/tz-localtime @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: tz localtime (django) +# key: djt +# uuid: django-templates-tz-localtime +# group: django-templates +# -- +{% localtime ${1:$$(yas-select-valye '("on" "off"))} %} + $0 +{% endlocaltime %} \ No newline at end of file diff --git a/web-mode/django/tz/tz-timezone b/web-mode/django/tz/tz-timezone new file mode 100644 index 00000000..bb907375 --- /dev/null +++ b/web-mode/django/tz/tz-timezone @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: tz timezone (django) +# key: djt +# uuid: django-templates-tz-timezone +# group: django-templates +# -- +{% timezone ${1:TIME ZONE} %} + $0 +{% endtimezone %} \ No newline at end of file From 56af8070f17ed298d5b1085ac8c1f07b743a91e0 Mon Sep 17 00:00:00 2001 From: Jose Soares Date: Fri, 10 Apr 2020 09:30:55 -0400 Subject: [PATCH 2/5] [-] Readme tweaks --- python-mode/django/README.org | 26 +++++--------------------- web-mode/django/README.org | 5 +++-- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/python-mode/django/README.org b/python-mode/django/README.org index 815c3591..e463ba97 100644 --- a/python-mode/django/README.org +++ b/python-mode/django/README.org @@ -18,17 +18,8 @@ - [[#common][Common]] - [[#faq][FAQ]] - [[#q-holy-settings-snippets-batman][Q: Holy settings snippets batman!?!]] + - [[#what-version-of-django-was-these-snippets-created][What version of Django was these snippets created?]] - [[#contributing][Contributing]] -- [[#--todo-89][[ ] TODO]] - - [[#x-model-admin-attributes][[X] Model Admin Attributes]] - - [[#x-model-admin-methods][[X] Model Admin Methods]] - - [[#x-forms-meta-attributes][[X] Forms Meta attributes]] - - [[#x-middleware-strings-for-middleware-setting-usage][[X] Middleware strings (for MIDDLEWARE setting usage)]] - - [[#x-backends--engines][[X] Backend's / Engines]] - - [[#--more-class-based-views][[ ] More class based views]] - - [[#x-common-models][[X] Common Models]] - - [[#x-generic-model][[X] Generic Model]] - - [[#x-basic-management-command][[X] Basic Management Command]] * Description A bunch of Django specific python-mode snippets, including ~settings~, ~imports~ @@ -211,24 +202,17 @@ Other common snippets + ~ugettextify~ - Wraps selection in the common ugettext function, i.e. ~'test'~ becomes ~_('test')_~. You will need to insert snippet after selecting text (i.e. via doom ~~SPC s i~) + + ~modeladmin~ - A common model admin class with commented out extra + attributes * FAQ ** Q: Holy settings snippets batman!?! yea there is a lot, and since ~django~ collects and caches all these settings in a class at run-time, they are not usually available for auto-completing +** What version of Django was these snippets created? +Version ~3.0~ * Contributing There is an included ~snippet-templates~ file the includes the templates used to create the various groups of snippets - -* [ ] TODO [8/9] -** [X] Model Admin Attributes -** [X] Model Admin Methods -** [X] Forms Meta attributes -** [X] Middleware strings (for MIDDLEWARE setting usage) -** [X] Backend's / Engines -** [ ] More class based views -** [X] Common Models -** [X] Generic Model -** [X] Basic Management Command diff --git a/web-mode/django/README.org b/web-mode/django/README.org index f2824329..f533e6ee 100644 --- a/web-mode/django/README.org +++ b/web-mode/django/README.org @@ -15,8 +15,8 @@ - [[#timezone-trigger-djt-or-][Timezone (:trigger djt or |)]] - [[#faq][FAQ]] - [[#q-when-i-try-to-use-filters-with-the-prefix--it-does-not-expand][Q: When I try to use filters with the prefix | it does not expand]] + - [[#what-version-of-django-was-these-snippets-created][What version of Django was these snippets created?]] - [[#contributing][Contributing]] -- [[#--todo-00][[ ] TODO]] * Description A bunch of Django specific web-model snippets @@ -80,9 +80,10 @@ All Django timezone template tags and filters When you have something like ~{{ value| }}~ and try to expand it will cannot find a trigger for ~value|~ instead you will need to include a space before the pipe in order to get the expansion. i.e. ~{{ value | }}~ +** What version of Django was these snippets created? +Version ~3.0~ * Contributing There is an included ~snippet-templates~ file that includes the templates used to create the various tags and filters -* [ ] TODO [0/0] From cecf45461da50007c051627e17027eb820c485e0 Mon Sep 17 00:00:00 2001 From: Jose Soares Date: Fri, 10 Apr 2020 12:34:09 -0400 Subject: [PATCH 3/5] [-] Fixes issue with localtime --- web-mode/django/tz/tz-localtime | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web-mode/django/tz/tz-localtime b/web-mode/django/tz/tz-localtime index dd328729..446d6599 100644 --- a/web-mode/django/tz/tz-localtime +++ b/web-mode/django/tz/tz-localtime @@ -4,6 +4,6 @@ # uuid: django-templates-tz-localtime # group: django-templates # -- -{% localtime ${1:$$(yas-select-valye '("on" "off"))} %} +{% localtime ${1:$$(yas-select-value '("on" "off"))} %} $0 {% endlocaltime %} \ No newline at end of file From 5fa86acb20743d7dd3d14cda3017d871dbdb92e2 Mon Sep 17 00:00:00 2001 From: Jose Soares Date: Sat, 11 Apr 2020 09:40:40 -0400 Subject: [PATCH 4/5] [-] Tweaks / Updates/ Additions - adds more common imports - adds inclusion tag (python) - fixes issue with `first` filter - updates various tags to allow for selection - updates various tags to allow for chooses - updates readme --- python-mode/django/README.org | 19 +++++++++++++++++-- python-mode/django/imports/http-response | 7 +++++++ python-mode/django/imports/reciever | 7 +++++++ python-mode/django/management/command | 2 +- python-mode/django/meta/forms-error-messages | 1 - python-mode/django/meta/required-db-vendor | 2 +- python-mode/django/settings/.yas-parents | 1 - python-mode/django/templatetags/inclusion-tag | 10 ++++++++++ .../templatetags/inclusion-tag-with-context | 10 ++++++++++ python-mode/django/templatetags/simpletag | 2 +- .../templatetags/simpletag-with-context | 9 +++++++++ web-mode/django/README.org | 4 ++-- web-mode/django/filters/filter-first | 3 ++- .../i18n/i18n-get-current-language-bidi | 2 +- web-mode/django/l10n/l10n-localize | 4 ++-- web-mode/django/tags/autoescape | 2 +- web-mode/django/tags/block | 2 +- web-mode/django/tags/comment | 2 +- web-mode/django/tags/filter | 2 +- web-mode/django/tags/for | 2 +- web-mode/django/tags/verbatim | 2 +- web-mode/django/tz/tz-localtime | 4 ++-- web-mode/django/tz/tz-timezone | 2 +- 23 files changed, 79 insertions(+), 22 deletions(-) create mode 100644 python-mode/django/imports/http-response create mode 100644 python-mode/django/imports/reciever delete mode 100644 python-mode/django/settings/.yas-parents create mode 100644 python-mode/django/templatetags/inclusion-tag create mode 100644 python-mode/django/templatetags/inclusion-tag-with-context create mode 100644 python-mode/django/templatetags/simpletag-with-context diff --git a/python-mode/django/README.org b/python-mode/django/README.org index e463ba97..8d239a5d 100644 --- a/python-mode/django/README.org +++ b/python-mode/django/README.org @@ -15,10 +15,11 @@ - [[#backends-trigger-djb][Backends (:trigger djb)]] - [[#model-form-meta-trigger-djmeta][Model Form Meta (:trigger djmeta)]] - [[#models-trigger-djmod][Models (:trigger djmod)]] + - [[#django-template-tags][Django Template Tags]] - [[#common][Common]] - [[#faq][FAQ]] - [[#q-holy-settings-snippets-batman][Q: Holy settings snippets batman!?!]] - - [[#what-version-of-django-was-these-snippets-created][What version of Django was these snippets created?]] + - [[#what-version-of-django-are-these-snippets-for][What version of Django are these snippets for?]] - [[#contributing][Contributing]] * Description @@ -45,8 +46,10 @@ Common imports + ~:group django-imports~ + ~:trigger dji~ + + ~http-response~ + ~mark-safe~ + ~models~ + + ~receiver~ + ~reverse-url~ + ~safe-string~ + ~settings~ @@ -195,6 +198,18 @@ Common django models + ~common~ + ~generic~ +** Django Template Tags +Common template tag creation + ++ ~:group django-custom~ ++ ~:trigger djtt~ + + ~filter~ - python code to create a filter + + ~filter-with_arg~ - same as above, but with an argument + + ~inclusion-tag~ - python code to create an inclusion tag + + ~inclusion-tag-with-context~ - same as above, but with context + + ~simpletag~ - python code to create a simple template tag + + ~simpletag-with-context~ - same as above, but with context + ** Common Other common snippets @@ -210,7 +225,7 @@ Other common snippets yea there is a lot, and since ~django~ collects and caches all these settings in a class at run-time, they are not usually available for auto-completing -** What version of Django was these snippets created? +** What version of Django are these snippets for? Version ~3.0~ * Contributing diff --git a/python-mode/django/imports/http-response b/python-mode/django/imports/http-response new file mode 100644 index 00000000..3a0edc28 --- /dev/null +++ b/python-mode/django/imports/http-response @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: http response +# key: dji +# uuid: django-imports-http-response +# group: django-imports +# -- +from django.http import HttpResponse diff --git a/python-mode/django/imports/reciever b/python-mode/django/imports/reciever new file mode 100644 index 00000000..b86a172c --- /dev/null +++ b/python-mode/django/imports/reciever @@ -0,0 +1,7 @@ +# -*- mode: snippet -*- +# name: signal receiver +# key: dji +# uuid: django-imports-signal-receiver +# group: django-imports +# -- +from django.dispatch import receiver diff --git a/python-mode/django/management/command b/python-mode/django/management/command index 86ed83b1..26b525e0 100644 --- a/python-mode/django/management/command +++ b/python-mode/django/management/command @@ -1,7 +1,7 @@ # -*- mode: snippet -*- # name: Basic Management Command # key: djmc -# uuid: django-managment- +# uuid: django-managment-basic-management-command # group: django-management # -- from django.core.management.base import BaseCommand, CommandError diff --git a/python-mode/django/meta/forms-error-messages b/python-mode/django/meta/forms-error-messages index 339c6018..73a26e64 100644 --- a/python-mode/django/meta/forms-error-messages +++ b/python-mode/django/meta/forms-error-messages @@ -17,5 +17,4 @@ error_messages = { # 'name': { # 'max_length': _("This writer's name is too long."), # }, - } diff --git a/python-mode/django/meta/required-db-vendor b/python-mode/django/meta/required-db-vendor index 74e7bc98..6662be7c 100644 --- a/python-mode/django/meta/required-db-vendor +++ b/python-mode/django/meta/required-db-vendor @@ -5,4 +5,4 @@ # group: django-meta # -- # Built in options 'sqlite', 'postgresql', 'mysql', 'oracle' -required_db_vendor = '$1'$0 \ No newline at end of file +required_db_vendor = '${1:$$(yas-choose-value '("sqlite" "postgresql" "mysql" "orcale"))}'$0 \ No newline at end of file diff --git a/python-mode/django/settings/.yas-parents b/python-mode/django/settings/.yas-parents deleted file mode 100644 index 49fb9bbc..00000000 --- a/python-mode/django/settings/.yas-parents +++ /dev/null @@ -1 +0,0 @@ -python-mode diff --git a/python-mode/django/templatetags/inclusion-tag b/python-mode/django/templatetags/inclusion-tag new file mode 100644 index 00000000..b84abfa1 --- /dev/null +++ b/python-mode/django/templatetags/inclusion-tag @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: inclusion tag +# key: djtt +# uuid: django-custom-inclusion-tag +# group: django-custom +# -- +@register.inclusion_tag('$1.html') +def ${1:NAME}(${2:ARGUMENT}): + """${3:DOC STRING}""" + $0 diff --git a/python-mode/django/templatetags/inclusion-tag-with-context b/python-mode/django/templatetags/inclusion-tag-with-context new file mode 100644 index 00000000..124a6bba --- /dev/null +++ b/python-mode/django/templatetags/inclusion-tag-with-context @@ -0,0 +1,10 @@ +# -*- mode: snippet -*- +# name: inclusion tag with context +# key: djtt +# uuid: django-custom-inclusion-tag-with-context +# group: django-custom +# -- +@register.inclusion_tag('$1.html', takes_context=True) +def ${1:NAME}(context): + """${3:DOC STRING}""" + $0 diff --git a/python-mode/django/templatetags/simpletag b/python-mode/django/templatetags/simpletag index 73ffa7b4..f56b61f6 100644 --- a/python-mode/django/templatetags/simpletag +++ b/python-mode/django/templatetags/simpletag @@ -5,6 +5,6 @@ # group: django-custom # -- @register.simple_tag -def ${1:NAME}({2:ARGUMENT}): +def ${1:NAME}(${2:ARGUMENT}): $0 return \ No newline at end of file diff --git a/python-mode/django/templatetags/simpletag-with-context b/python-mode/django/templatetags/simpletag-with-context new file mode 100644 index 00000000..8e761d40 --- /dev/null +++ b/python-mode/django/templatetags/simpletag-with-context @@ -0,0 +1,9 @@ +# -*- mode: snippet -*- +# name: template simple tag with context +# key: djtt +# uuid: django-custom-simple-tag +# group: django-custom +# -- +@register.simple_tag(takes_context=True) +def ${1:NAME}(context): + $0 diff --git a/web-mode/django/README.org b/web-mode/django/README.org index f533e6ee..86e520cf 100644 --- a/web-mode/django/README.org +++ b/web-mode/django/README.org @@ -15,7 +15,7 @@ - [[#timezone-trigger-djt-or-][Timezone (:trigger djt or |)]] - [[#faq][FAQ]] - [[#q-when-i-try-to-use-filters-with-the-prefix--it-does-not-expand][Q: When I try to use filters with the prefix | it does not expand]] - - [[#what-version-of-django-was-these-snippets-created][What version of Django was these snippets created?]] + - [[#what-version-of-django-are-these-snippets-for][What version of Django are these snippets for?]] - [[#contributing][Contributing]] * Description @@ -80,7 +80,7 @@ All Django timezone template tags and filters When you have something like ~{{ value| }}~ and try to expand it will cannot find a trigger for ~value|~ instead you will need to include a space before the pipe in order to get the expansion. i.e. ~{{ value | }}~ -** What version of Django was these snippets created? +** What version of Django are these snippets for? Version ~3.0~ * Contributing diff --git a/web-mode/django/filters/filter-first b/web-mode/django/filters/filter-first index e48cdb00..ffe48572 100644 --- a/web-mode/django/filters/filter-first +++ b/web-mode/django/filters/filter-first @@ -1,6 +1,7 @@ # -*- mode: snippet -*- -# name: +# name: filter first (django) # key: | # uuid: django-templates-filter-first # group: django-templates # -- +|first \ No newline at end of file diff --git a/web-mode/django/i18n/i18n-get-current-language-bidi b/web-mode/django/i18n/i18n-get-current-language-bidi index 16e80243..db9c1336 100644 --- a/web-mode/django/i18n/i18n-get-current-language-bidi +++ b/web-mode/django/i18n/i18n-get-current-language-bidi @@ -1,5 +1,5 @@ # -*- mode: snippet -*- -# name: i18n get_current_language_bidi +# name: i18n get_current_language_bidi (django) # key: djt # uuid: django-templates-i18n-get-current-language-bidi # group: django-templates diff --git a/web-mode/django/l10n/l10n-localize b/web-mode/django/l10n/l10n-localize index fe8da43d..dc272fe7 100644 --- a/web-mode/django/l10n/l10n-localize +++ b/web-mode/django/l10n/l10n-localize @@ -4,6 +4,6 @@ # uuid: django-templates-l10n-localize # group: django-templates # -- -{% localize ${1:$$(yas-select-value '("on" "off"))} %} - $0 +{% localize ${1:$$(yas-choose-value '("on" "off"))} %} + `(yas-selected-text)` {% endlocalize %} \ No newline at end of file diff --git a/web-mode/django/tags/autoescape b/web-mode/django/tags/autoescape index 96a2d876..341f004c 100644 --- a/web-mode/django/tags/autoescape +++ b/web-mode/django/tags/autoescape @@ -5,5 +5,5 @@ # group: django-templates # -- {% autoescape ${1:$$(yas-choose-value '("on" "off"))} %} - $0 + `(yas-selected-text)`$0 {% endautoescape %} \ No newline at end of file diff --git a/web-mode/django/tags/block b/web-mode/django/tags/block index 6d231853..18865e53 100644 --- a/web-mode/django/tags/block +++ b/web-mode/django/tags/block @@ -5,5 +5,5 @@ # group: django-templates # -- {% block ${1:NAME} %} - $0 + `(yas-selected-text)`$0 {% endblock %} \ No newline at end of file diff --git a/web-mode/django/tags/comment b/web-mode/django/tags/comment index a2e30e7d..175b5263 100644 --- a/web-mode/django/tags/comment +++ b/web-mode/django/tags/comment @@ -5,5 +5,5 @@ # group: django-templates # -- {% comment "${1:NOTE}" %} - ${2:COMMENT}$0 + `(yas-selected-text)`$0 {% endcomment %} diff --git a/web-mode/django/tags/filter b/web-mode/django/tags/filter index 601e978f..0f21a508 100644 --- a/web-mode/django/tags/filter +++ b/web-mode/django/tags/filter @@ -5,5 +5,5 @@ # group: django-templates # -- {% filter ${1:FILTER 1}|${2:FILTER 2} %} - $0 + `(yas-selected-text)`$0 {% endfilter %} \ No newline at end of file diff --git a/web-mode/django/tags/for b/web-mode/django/tags/for index dca0d8fa..fe8e99e3 100644 --- a/web-mode/django/tags/for +++ b/web-mode/django/tags/for @@ -5,5 +5,5 @@ # group: django-templates # -- {% for ${1:KEY} in ${2:ITERABLE}} %} - $0 + `(yas-selected-text)`$0 {% endfor %} diff --git a/web-mode/django/tags/verbatim b/web-mode/django/tags/verbatim index 5e5e5a77..bdd3d11c 100644 --- a/web-mode/django/tags/verbatim +++ b/web-mode/django/tags/verbatim @@ -5,5 +5,5 @@ # group: django-templates # -- {% verbatim %} - $0 + `(yas-selected-text)`$0 {% endverbatim %} \ No newline at end of file diff --git a/web-mode/django/tz/tz-localtime b/web-mode/django/tz/tz-localtime index 446d6599..68d8b25d 100644 --- a/web-mode/django/tz/tz-localtime +++ b/web-mode/django/tz/tz-localtime @@ -4,6 +4,6 @@ # uuid: django-templates-tz-localtime # group: django-templates # -- -{% localtime ${1:$$(yas-select-value '("on" "off"))} %} - $0 +{% localtime ${1:$$(yas-choose-value '("on" "off"))} %} + `(yas-selected-text)`$0 {% endlocaltime %} \ No newline at end of file diff --git a/web-mode/django/tz/tz-timezone b/web-mode/django/tz/tz-timezone index bb907375..ed288597 100644 --- a/web-mode/django/tz/tz-timezone +++ b/web-mode/django/tz/tz-timezone @@ -5,5 +5,5 @@ # group: django-templates # -- {% timezone ${1:TIME ZONE} %} - $0 + `(yas-selected-text)`$0 {% endtimezone %} \ No newline at end of file From 1df0e1f186cf56f434c1b5c41dd9b2783fe229b9 Mon Sep 17 00:00:00 2001 From: Jose Soares Date: Mon, 4 Jan 2021 08:06:58 -0500 Subject: [PATCH 5/5] [-] Updates / Fixes - Fixes issue with `modeladmin` snippet - Updates `__str__` for generic model snippet so its more pratical - Renamed some view snippet variables to be more clear --- python-mode/django/common/modeladmin | 2 +- python-mode/django/imports/http-response | 2 +- python-mode/django/models/common | 2 +- python-mode/django/views/basic-cbv | 4 ++-- python-mode/django/views/detail-view-cbv | 2 +- python-mode/django/views/list-view-cbv | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/python-mode/django/common/modeladmin b/python-mode/django/common/modeladmin index 89e9a16c..0c073038 100644 --- a/python-mode/django/common/modeladmin +++ b/python-mode/django/common/modeladmin @@ -5,7 +5,7 @@ # -- @admin.register($1) class ${1:MODEL NAME}Admin(admin.ModelAdmin): - list_display = ('${2:FIELD}'${3:, '${4:FIELD}'${5:, '${6:FIELD}'}}}') + list_display = ('${2:FIELD}'${3:, '${4:FIELD}'${5:, '${6:FIELD}'}}) list_filter = ('${7:FIELD}', ) search_fields = ('${8:FIELD}', ) diff --git a/python-mode/django/imports/http-response b/python-mode/django/imports/http-response index 3a0edc28..31644464 100644 --- a/python-mode/django/imports/http-response +++ b/python-mode/django/imports/http-response @@ -1,4 +1,4 @@ -# -*- mode: snippet -*- +# -*- mode: snippet -*- # name: http response # key: dji # uuid: django-imports-http-response diff --git a/python-mode/django/models/common b/python-mode/django/models/common index aa9ad60a..08b07c89 100644 --- a/python-mode/django/models/common +++ b/python-mode/django/models/common @@ -12,7 +12,7 @@ class ${1:MODEL NAME}(models.Model): $0 def __str__(self): - return str(self.id) + return str(self.content_object) def save(self, *args, **kwargs): super().save(*args, **kwargs) diff --git a/python-mode/django/views/basic-cbv b/python-mode/django/views/basic-cbv index 4b662fcc..ac78b20e 100644 --- a/python-mode/django/views/basic-cbv +++ b/python-mode/django/views/basic-cbv @@ -6,8 +6,8 @@ # -- # from django.http import HttpResponse # from django.views import View -class $1(View): - """$2""" +class ${1:Name}(View): + """${2:Doc String}""" def get(self, request, *args, **kwargs): return HttpResponse('Hello, World!') $0 \ No newline at end of file diff --git a/python-mode/django/views/detail-view-cbv b/python-mode/django/views/detail-view-cbv index 9cfa055b..105ba3ac 100644 --- a/python-mode/django/views/detail-view-cbv +++ b/python-mode/django/views/detail-view-cbv @@ -6,7 +6,7 @@ # -- # from django.utils import timezone # from django.views.generic.detail import DetailView -class ${1:VIEW_NAME}DetailView(DetailView): +class ${1:MODEL_NAME}DetailView(DetailView): """$2 Ancestors (MRO) diff --git a/python-mode/django/views/list-view-cbv b/python-mode/django/views/list-view-cbv index da404eed..415adeb4 100644 --- a/python-mode/django/views/list-view-cbv +++ b/python-mode/django/views/list-view-cbv @@ -6,7 +6,7 @@ # -- # from django.utils import timezone # from django.views.generic.detail import DetailView -class ${1:VIEW_NAME}DetailView(DetailView): +class ${1:MODEL_NAME}DetailView(DetailView): """$2 Ancestors (MRO)