Skip to content
Browse files

Update docs and improve dostrings for custom vars

  • Loading branch information...
1 parent 02a18be commit cd8641e69afeb9ee38625b6f28d38e84e217ef82 @davidmiller committed
Showing with 120 additions and 23 deletions.
  1. +2 −1 .gitignore
  2. +82 −0 doc/source/configuration.rst
  3. +15 −15 doc/source/details.rst
  4. +18 −4 doc/source/index.rst
  5. +2 −2 fabfile.py
  6. +1 −1 src/pony-mode.el
View
3 .gitignore
@@ -2,4 +2,5 @@
.#*
*elc
*~
-build
+build
+*.pyc
View
82 doc/source/configuration.rst
@@ -0,0 +1,82 @@
+.. _configuration:
+
+=====================
+Configuring Pony Mode
+=====================
+
+Pony Mode has a number of configuration values that you, the User can set to make your life more pleasant!
+
+Global configuration
+====================
+
+There are a number of custom variables...
+
+pony-etags-command
+------------------
+Command to generate tags table for project
+
+Default: "find . | grep .py | xargs etags"
+
+.. _pony-server-host:
+
+pony-server-host
+----------------
+Host to run pony dev server
+
+default: "localhost"
+
+.. _pony-server-port:
+
+pony-server-port
+----------------
+Port to run pony dev server
+
+Default: 8000
+
+
+pony-settings-module
+--------------------
+Settings module to use with manage.py
+
+default: "settings"
+
+
+pony-test-failfast
+------------------
+
+Run pony tests with failfast?
+Defaultt
+
+pony-sqlite-program
+-------------------
+
+Name of the executable to use when running a database REPL for Django
+projects using sqlite.
+Default: "sqlite3"
+
+pony-snippet-dir
+----------------
+
+Directory in which to locate Yasnippet snippets for Pony Mode
+
+Default: /path/to/pony-mode/snippets
+
+
+
+
+Per - Project configuration
+----------------------------
+
+Pony projects are defined in the .dir-locals.el file at the root of your current project.
+
+The file should look something like this::
+
+ ;; Pony mode config for the megacorp project
+ ((nil ;; This applies these settings regardless of major mode
+
+ (pony-settings . (make-pony-project
+ :python "/home/david/virtualenvs/megacorp/production/bin/python"
+ :settings "local_settings_file")
+ )))
+
+
View
30 doc/source/details.rst
@@ -5,6 +5,21 @@ Pony Mode Details
Pony Mode has at least more than twelve features for helping you work on your Django projects from Emacs
+.. _dev-server:
+
+Development server
+------------------
+
+The command::
+
+ M-x pony-runserver
+
+(Which is bound by default to C-c C-p r) Will start the dev server for your current project
+
+Pony Mode will check to see if runserver_plus is available, and will prefer to use that, falling back to the basic Django runserver.
+
+You can configure the :ref:`pony-server-host` and :ref:`pony-server-port` your server runs on by configuring the custom variables.
+
Fabric Integration
------------------
@@ -62,18 +77,3 @@ If your setup is different to this, then the implicit Virtualenv detection may f
Fear not though! - you can customise the interpreter used by Pony-mode with a pony-project.
-Projects
---------
-Pony projects are defined in the .dir-locals.el file at the root of your current project.
-
-The file should look something like this::
-
- ;; Pony mode config for the megacorp project
- ((nil ;; This applies these settings regardless of major mode
-
- (pony-settings . (make-pony-project
- :python "/home/david/virtualenvs/megacorp/production/bin/python"
- :settings "local_settings_file")
- )))
-
-
View
22 doc/source/index.rst
@@ -6,9 +6,7 @@ A Django mode for emacs.
Features (Non-exhaustive):
--------------------------
-* Run dev server in an emacs buffer [C-c C-p r]
- * Checks to see if runserver_plus is available
- * If not uses in-built runserver
+* Run the :ref:`dev-server` in an emacs buffer [C-c C-p r]
* Jump to current project in browser (start server if required) [C-c C-p b]
* Run test case at point in buffer [C-c C-p t]
* Run tests for current app in buffer [C-c C-p t]
@@ -40,7 +38,23 @@ How do I install Pony Mode?
Features
--------
-:ref:`details`
+Pony Mode has at least more than 3 features that make working on your Django projects from Emacs easier:
+
+.. toctree::
+ :maxdepth: 2
+
+ details
+
+Configuration
+-------------
+
+Configuration options for Pony Mode
+
+.. toctree::
+ :maxdepth: 2
+
+ configuration
+
Bugs
----
View
4 fabfile.py
@@ -25,6 +25,6 @@ def upload_docs():
local("rm -rf pony-mode-docs.tar.gz")
local("tar zcvf pony-mode-docs.tar.gz *")
operations.put("pony-mode-docs.tar.gz",
- "/home/happenup/webapps/pony-mode-docs/pony-mode-docs.tar.gz")
- with cd("/home/happenup/webapps/pony-mode-docs/"):
+ "/home/happenup/webapps/ponydocs/pony-mode-docs.tar.gz")
+ with cd("/home/happenup/webapps/ponydocs/"):
run("tar zxvf pony-mode-docs.tar.gz")
View
2 src/pony-mode.el
@@ -53,7 +53,7 @@
:type 'string)
(defcustom pony-settings-module "settings"
- "Settings file to use with manage.py"
+ "Settings module to use with manage.py"
:group 'pony
:type 'string)

0 comments on commit cd8641e

Please sign in to comment.
Something went wrong with that request. Please try again.