~notmyname/swift/saio_reference

« back to all changes in this revision

Viewing changes to swift/common/middleware/staticweb.py

  • Committer: John Dickinson
  • Date: 2011-06-14 16:04:06 UTC
  • mto: This revision was merged to the branch mainline in revision 311.
  • Revision ID: john.dickinson@rackspace.com-20110614160406-ce8i4ahvpseccvj4
renamed st to swift

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
listing page, you will see the well defined document structure that can be
75
75
styled.
76
76
 
77
 
Example usage of this middleware via ``st``:
 
77
Example usage of this middleware via ``swift``:
78
78
 
79
79
    Make the container publicly readable::
80
80
 
81
 
        st post -r '.r:*' container
 
81
        swift post -r '.r:*' container
82
82
 
83
83
    You should be able to get objects directly, but no index.html resolution or
84
84
    listings.
85
85
 
86
86
    Set an index file directive::
87
87
 
88
 
        st post -m 'web-index:index.html' container
 
88
        swift post -m 'web-index:index.html' container
89
89
 
90
90
    You should be able to hit paths that have an index.html without needing to
91
91
    type the index.html part.
92
92
 
93
93
    Turn on listings::
94
94
 
95
 
        st post -m 'web-listings: true' container
 
95
        swift post -m 'web-listings: true' container
96
96
 
97
97
    Now you should see object listings for paths and pseudo paths that have no
98
98
    index.html.
99
99
 
100
100
    Enable a custom listings style sheet::
101
101
 
102
 
        st post -m 'web-listings-css:listings.css' container
 
102
        swift post -m 'web-listings-css:listings.css' container
103
103
 
104
104
    Set an error file::
105
105
 
106
 
        st post -m 'web-error:error.html' container
 
106
        swift post -m 'web-error:error.html' container
107
107
 
108
108
    Now 401's should load 401error.html, 404's should load 404error.html, etc.
109
109
"""