]> crepu.dev Git - config.git/blame - djavu-asus/elpa/elpy-20230803.1455/elpy-django.elc
ActualizaciĆ³n de Readme
[config.git] / djavu-asus / elpa / elpy-20230803.1455 / elpy-django.elc
CommitLineData
53e6db90
DC
1;ELC\1c\0\0\0
2;;; Compiled
3;;; in Emacs version 28.2
4;;; with all optimizations.
5
6
7
8(byte-code "\300\301!\210\302\303\304\305\306\307\310\311\312\313& \210\314\303!\210\302\315\316\317\306\307\310\311\312\313& \210\314\315!\210\302\320\321\322\306\307\310\311\312\313& \210\314\320!\210\302\323\324\325\306\307\310\311\312\313& \210\314\323!\210\302\326\327\330\306\331\310\332\312\313& \210\314\326!\210\302\333\334\335\306\336\310\337\312\313& \210\314\333!\210\302\340\341\342\306\336\310\337\312\313& \210\314\340!\210\302\343\344\345\306\346\312\313&\a\210\314\343!\210\302\347\327\350\306\351\312\313&\a\210\352\347\327\353#\210\302\354\327\355\306\356\312\313&\a\210\352\354\327\353#\210\302\357\327\360\306\331\312\313&\a\210\352\357\327\353#\207" [require s custom-declare-variable elpy-django-command "django-admin.py" "Command to use when running Django specific commands.\nBest to set it to full path to 'manage.py' if it's available." :type string :safe stringp :group elpy-django make-variable-buffer-local elpy-django-server-ipaddr "127.0.0.1" "What address Django will use when running the dev server." elpy-django-server-port "8000" "What port Django will use when running the dev server." elpy-django-server-command "runserver" "When executing `elpy-django-runserver' what should be the server\ncommand to use." elpy-django-always-prompt nil "When non-nil, it will always prompt for extra arguments\nto pass with the chosen command." boolean booleanp elpy-django-commands-with-req-arg '("startapp" "startproject" "loaddata" "sqlmigrate" "sqlsequencereset" "squashmigrations") "Used to determine if we should prompt for arguments. Some commands\nrequire arguments in order for it to work." list listp elpy-django-test-runner-formats '(("django_nose.NoseTestSuiteRunner" . ":") (".*" . ".")) "List of test runners and their format for calling tests.\n\n The keys are the regular expressions to match the runner used in test,\nwhile the values are the separators to use to build test target path.\nSome tests runners are called differently. For example, Nose requires a ':' when calling specific tests,\nbut the default Django test runner uses '.'" elpy-django-test-runner-args '("test" "--noinput") "Arguments to pass to the test runner when calling tests." (repeat string) elpy-test-django-runner-command "Deprecated. Please define Django command in `elpy-django-command' and\ntest arguments in `elpy-django-test-runner-args'" (repeat string) make-obsolete-variable "March 2018" elpy-test-django-runner-manage-command "Deprecated. Please define Django command in `elpy-django-command' and\ntest arguments in `elpy-django-test-runner-args'." (repeat string) elpy-test-django-with-manage "Deprecated. Please define Django command in `elpy-django-command' and\ntest arguments in `elpy-django-test-runner-args'."] 10)
9#@30 Key map for django extension\1f
10(defvar elpy-django-mode-map (byte-code "\301 \18\302\b\303\304#\210\302\b\305\306#\210\b)\207" [map make-sparse-keymap define-key "c" elpy-django-command "r" elpy-django-runserver] 4) (#$ . 2829))
11#@49 Decides whether to start the minor mode or not.\1f
12(defalias 'elpy-django-setup #[nil "\302\b\303\"\205\13\0\304\302\b\303\"\303P!\11\305\306!\207" [default-directory elpy-django-command locate-dominating-file "manage.py" expand-file-name elpy-django 1] 4 (#$ . 3057)])
13#@104 Return the current Django project root, if any.
14
15This is marked with 'manage.py' or 'django-admin.py'.\1f
16(defalias 'elpy-project-find-django-root #[nil "\301\b\302\"\206\v\0\301\b\303\"\207" [default-directory locate-dominating-file "django-admin.py" "manage.py"] 3 (#$ . 3324)])
17#@33 Return list of django commands.\1f
18(defalias 'elpy-django--get-commands #[nil "\304\305\b\306P!\19\1a\307\310\311\"\er\vq\210\312\216 c\210eb\210`\313\314\304\211\211$|\210eb\210\212\315\316\304\311#\2037\0\317\320\304\211#\210\202&\0)\321 +\12\322\n\323\"\12\324\325\n\"\12\326\327\n\"\12\330\n\331\"*\207" [elpy-django-command help-output dj-commands-str #1=#:temp-buffer nil shell-command-to-string " -h" generate-new-buffer " *temp*" t #[nil "\301\b!\205 \0\302\b!\207" [#1# buffer-name kill-buffer] 2] search-forward "Available subcommands:" re-search-forward "\\[.*\\]" replace-match #2="" buffer-string split-string "\n" cl-remove-if #[(x) "\b\301\230\207" [x #2#] 2] mapcar #[(x) "\301\b!\207" [x s-trim] 2] sort string-lessp] 6 (#$ . 3604)])
19#@120 Internal cache for elpy-django--get-test-runner.
20The cache is keyed on project root and DJANGO_SETTINGS_MODULE env var\1f
21(defvar elpy-django--test-runner-cache nil (#$ . 4337))
22#@48 Maximum number of entries in test runner cache\1f
23(defvar elpy-django--test-runner-cache-max-size 100 (#$ . 4518))
24#@171 Return the name of the django test runner.
25Needs `DJANGO_SETTINGS_MODULE' to be set in order to work.
26The result is memoized on project root and `DJANGO_SETTINGS_MODULE'\1f
27(defalias 'elpy-django--get-test-runner #[nil "\305\306\307!\310 \18\19\1a \204\11\0\311\312!\210\b D\e\313\v!\206!\0\314\v\315 !\"\1c\316 \210\f-\207" [default-directory django-settings-env django-import-cmd runner-key runner "import django;django.setup();from django.conf import settings;print(settings.TEST_RUNNER)" getenv "DJANGO_SETTINGS_MODULE" elpy-project-root error "Please set environment variable `DJANGO_SETTINGS_MODULE' if you'd like to run the test runner" elpy-django--get-test-runner-from-cache elpy-django--cache-test-runner elpy-django--detect-test-runner elpy-django--limit-test-runner-cache-size] 4 (#$ . 4637)])
28#@126 When running a Django test, some test runners require a different format than others.
29Return the correct string format here.\1f
30(defalias 'elpy-django--get-test-format #[nil "\306 \307\b\19\1a\e \203'\0\n\204'\0 @\211\1c@\1d\310\r\v\"\203\1f\0\fA\12* A\211\11\204\v\0\n\2062\0\311\312\313\306 \"!+\207" [elpy-django-test-runner-formats formats found runner entry regex elpy-django--get-test-runner nil string-match error format "Unable to find test format for `%s'"] 5 (#$ . 5431)])
31#@53 Detects django test runner in current configuration\1f
32(defalias 'elpy-django--detect-test-runner #[(django-settings-env) "\303\b\304\211\211\305\306\307 \"&\ 6\310U\204\18\0\311\306\312 \"!\210\313\314\306\315\b\n#!!\207" [elpy-rpc-python-command django-settings-env django-import-cmd call-process nil "-c" format "import %s" 0 error "Unable to import DJANGO_SETTINGS_MODULE: '%s'" s-trim shell-command-to-string "%s -c '%s'"] 9 (#$ . 5893)])
33#@102 Retrieve from cache test runner with given caching key.
34Return nil if the runner is missing in cache\1f
35(defalias 'elpy-django--get-test-runner-from-cache #[(key) "\303\b \"A\211\1a\205\ e\0\304\b\n\")\207" [key elpy-django--test-runner-cache runner assoc elpy-django--cache-test-runner] 4 (#$ . 6334)])
36#@48 Store in test runner cache a runner with a key\1f
37(defalias 'elpy-django--cache-test-runner #[(key runner) "\b B\nB\12 \207" [key runner elpy-django--test-runner-cache] 2 (#$ . 6634)])
38#@70 Ensure elpy-django--test-runner-cache does not overflow a fixed size\1f
39(defalias 'elpy-django--limit-test-runner-cache-size #[nil "\bG V\205\ e\0\bA\211\10\202\ 1\0\207" [elpy-django--test-runner-cache elpy-django--test-runner-cache-max-size] 3 (#$ . 6819)])
40#@104 Prompt user for Django command. If called with `C-u',
41it will prompt for other flags/arguments to run.\1f
42(defalias 'elpy-django-command #[(cmd) "\b\204\ e\0 \204\ e\0\n\v\235\203\18\0\n\306\307\n\310P\311\"Q\12\n\312\230\203&\0\313\f\314P\315\211#\207\316\f!@\1d\316\f!A\1e\19\317\320\316\n!@\"\1e\1a\321\317\322\ e\1a\"!\203L\0\323\317\322\ e\1a\"!\210\324\325\326\ e\1a\r\327\330\ e\19\316\n!\"%!+\207" [current-prefix-arg elpy-django-always-prompt cmd elpy-django-commands-with-req-arg elpy-django-command program " " read-shell-command ": " "--noinput" "shell" run-python " shell -i python" t split-string format "django-%s" get-buffer "*%s*" kill-buffer pop-to-buffer apply make-comint nil append args buffer-name] 10 (#$ . 7073) (list (completing-read "Command: " (elpy-django--get-commands) nil nil))])
43#@225 Start the server and automatically add the ipaddr and port.
44Also create it's own special buffer so that we can have multiple
45servers running per project.
46
47When called with a prefix (C-u), it will prompt for additional args.\1f
48(defalias 'elpy-django-runserver #[(arg) "\b\306 Q\1a\307 \203\13\0\310\311\307 !!\202\19\0\312\313\v\"\210\v\1c\314\315\f\"\1d\316\r!\203)\0\317\r!\210\n\306\ e\16\320\ e\17\260\ 5\12\ e\18\204=\0\ e\19\203F\0\n\306\321\n\322P!Q\12\323\n!\210r\324q\210\325\r!,\207" [elpy-django-command elpy-django-server-command cmd default-directory proj-root buff-name " " elpy-project-root file-name-base directory-file-name message "Elpy cannot find the root of the current django project. Starting the server in the current directory: '%s'." format "*runserver[%s]*" get-buffer kill-buffer ":" read-shell-command ": " compile "*compilation*" rename-buffer elpy-django-server-ipaddr elpy-django-server-port arg elpy-django-always-prompt] 5 (#$ . 7846) "P"])
49#@176 Test the project using the Django discover runner,
50or with manage.py if elpy-test-django-with-manage is true.
51
52This requires Django 1.6 or the django-discover-runner package.\1f
53(defalias 'elpy-test-django-runner #[(top _file module test) "\b\203\1e\0\305\306 \307\nC\v\f\203\19\0\310\311\b\312 \f$\202\1a\0\bC##\207\305\306 \307\nC\v\"#\207" [module top elpy-django-command elpy-django-test-runner-args test apply elpy-test-run append format "%s%s%s" elpy-django--get-test-format] 11 (#$ . 8782) (elpy-test-at-point)])
54(put 'elpy-test-django-runner 'elpy-test-runner-p t)
55#@96 Non-nil if Elpy-Django mode is enabled.
56Use the command `elpy-django' to change this variable.\1f
57(defvar elpy-django nil (#$ . 9344))
58(make-variable-buffer-local 'elpy-django)
59#@564 Minor mode for Django commands.
60
61This is a minor mode. If called interactively, toggle the
62`Elpy-Django mode' mode. If the prefix argument is positive,
63enable the mode, and if it is zero or negative, disable the mode.
64
65If called from Lisp, toggle the mode if ARG is `toggle'. Enable
66the mode if ARG is nil, omitted, or is a positive number.
67Disable the mode if ARG is a negative number.
68
69To check whether the minor mode is enabled in the current buffer,
70evaluate `elpy-django'.
71
72The mode's hook is called both when the mode is enabled and when
73it is disabled.\1f
74(defalias 'elpy-django #[(&optional arg) "\305 \18 \306=\203\ e\0\n?\202\1e\0 \247\203\1d\0 \307W\203\1d\0\310\202\1e\0\311\12\312\303!\2032\0\313\302\v\"\13\n\2032\0\302\vB\13\314\315\n\203<\0\316\202=\0\317\"\210\320\321!\203b\0\305 \203Q\0\b\305 \232\203b\0\322\1c\323\324\n\203]\0\325\202^\0\326\f#\210))\327 \210\n\207" [#1=#:last-message arg elpy-django local-minor-modes local current-message toggle 1 nil t boundp delq run-hooks elpy-django-hook elpy-django-on-hook elpy-django-off-hook called-interactively-p any " in current buffer" message "Elpy-Django mode %sabled%s" "en" "dis" force-mode-line-update] 4 (#$ . 9525) (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) 'toggle))])
75(defvar elpy-django-hook nil)
76(byte-code "\301\302N\204\f\0\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205#\0\b\310\211%\210\314\312!\207" [elpy-django-map elpy-django-hook variable-documentation put "Hook run after entering or leaving `elpy-django'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode elpy-django boundp provide] 6)