summaryrefslogtreecommitdiff
path: root/docs/howto/static-files
diff options
context:
space:
mode:
authorSrinivas Reddy Thatiparthy <thatiparthysreenivas@gmail.com>2018-04-30 05:18:34 +0530
committerTim Graham <timograham@gmail.com>2018-04-29 22:12:40 -0400
commitd0b04c6308fdd0909630fc1ed9f466082ed1d38f (patch)
treee7fb311b34b27f79fd43d91ac773487d1c8121ea /docs/howto/static-files
parent5d022eae747b9e6432cea4fe5e6e87cd8e627141 (diff)
Fixed #29360 -- Removed Fabric examples in docs.
Diffstat (limited to 'docs/howto/static-files')
-rw-r--r--docs/howto/static-files/deployment.txt45
1 files changed, 1 insertions, 44 deletions
diff --git a/docs/howto/static-files/deployment.txt b/docs/howto/static-files/deployment.txt
index 94b7157a90..a9777c0f1b 100644
--- a/docs/howto/static-files/deployment.txt
+++ b/docs/howto/static-files/deployment.txt
@@ -38,30 +38,7 @@ serving your site, the process may look something like:
:ref:`how to do this with Apache and mod_wsgi <serving-files>`.
You'll probably want to automate this process, especially if you've got
-multiple web servers. There's any number of ways to do this automation, but
-one option that many Django developers enjoy is `Fabric
-<http://fabfile.org/>`_.
-
-Below, and in the following sections, we'll show off a few example fabfiles
-(i.e. Fabric scripts) that automate these file deployment options. The syntax
-of a fabfile is fairly straightforward but won't be covered here; consult
-`Fabric's documentation <http://docs.fabfile.org/>`_, for a complete
-explanation of the syntax.
-
-So, a fabfile to deploy static files to a couple of web servers might look
-something like::
-
- from fabric.api import *
-
- # Hosts to deploy onto
- env.hosts = ['www1.example.com', 'www2.example.com']
-
- # Where your project code lives on the server
- env.project_root = '/home/www/myproject'
-
- def deploy_static():
- with cd(env.project_root):
- run('./manage.py collectstatic -v0 --noinput')
+multiple web servers.
Serving static files from a dedicated server
--------------------------------------------
@@ -89,26 +66,6 @@ the deployment strategy to look something like:
common choice for this step since it only needs to transfer the bits of
static files that have changed.
-Here's how this might look in a fabfile::
-
- from fabric.api import *
- from fabric.contrib import project
-
- # Where the static files get collected locally. Your STATIC_ROOT setting.
- env.local_static_root = '/path/to/static'
-
- # Where the static files should go remotely
- env.remote_static_root = '/home/www/static.example.com'
-
- @roles('static')
- def deploy_static():
- local('./manage.py collectstatic')
- project.rsync_project(
- remote_dir=env.remote_static_root,
- local_dir=env.local_static_root,
- delete=True,
- )
-
.. _staticfiles-from-cdn:
Serving static files from a cloud service or CDN