This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/!frameworks/django
syl20bnr 6b33031dc5 core: dotspacemacs-distribution, spacemacs-core layer and rename contrib
- Rename contrib directory to layers
- Add new variable dotspacemacs-distribution
- Move spacemacs layer to layers/!distribution
- New layer spacemacs-core in layers/!distribution
- User can now set dotspacemacs-distribution to spacemacs or
  spacemacs-core (default spacemacs)

spacemacs-core is very lightweight layer sufficient to build upon
spacemacs.
2015-09-07 23:44:43 -04:00
..
img core: dotspacemacs-distribution, spacemacs-core layer and rename contrib 2015-09-07 23:44:43 -04:00
packages.el core: dotspacemacs-distribution, spacemacs-core layer and rename contrib 2015-09-07 23:44:43 -04:00
README.org core: dotspacemacs-distribution, spacemacs-core layer and rename contrib 2015-09-07 23:44:43 -04:00

Python contribution layer for Spacemacs

/TakeV/spacemacs/media/commit/c17db0dcb021d2a446a7a856f17e1bfdec38f680/layers/!frameworks/django/img/django.png

Description

This layer adds support for the Python Django framework via pony-mode.

Install

To use this contribution add it to your ~/.spacemacs

  (setq-default dotspacemacs-configuration-layers '(django))

Key Bindings

Django related key bindings uses pony-mode and are behind the prefix SPC m j.

Configuration options for pony-mode are documented at deadpansincerity.com

Manage Django with SPC m j m.

Fabric

Key Binding Description
SPC m j a f Run a fabric command
SPC m j a d Deploy project with fab deploy

Files

Key Binding Description
SPC m j f s Open the settings.py for this project
SPC m j f c Interactively display a setting value in the minibuffer
SPC m j f t Jump to template at point
SPC m j f r Jump to the view file that the URL resolves to (experimental)

Interactive

Key Binding Description
SPC m j i d Run interpreter for this project's default database as an inferior process
SPC m j i s Open a Python shell with the current pony project's context loaded. If the project has the django_extras package installed, then use the excellent shell_plus command. Otherwise, fall back to manage.py shell

Server

Key Binding Description
SPC m j r d Stop the dev server
SPC m j r o Open a tab at the dev server
SPC m j r r Restart the dev server (works better with django_extras/werkzeug)
SPC m j r u Start or open the dev server
SPC m j r t Open a second server with a "throwaway" host/port

South/Syncdb

Key Binding Description
SPC m j s c Convert an existing app to south
SPC m j s h Create migration for modification
SPC m j s i Run the initial south migration for an app
SPC m j s m Migrate an app
SPC m j s s Run syncdb on the current project

Test

Key Binding Description
SPC m j t d Move down the traceback one level
SPC m j t e Go to the file and line of the last stack trace in a test buffer
SPC m j t o Open the file in a traceback at the line specified
SPC m j t t Run the test(s) given by command
SPC m j t u Move up the traceback one level