Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
66a0d674
Commit
66a0d674
authored
Oct 17, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add script to generate secret key
parent
610f9671
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
docs/admin/install.rst
docs/admin/install.rst
+5
-4
examples/generate-secret-key
examples/generate-secret-key
+25
-0
No files found.
docs/admin/install.rst
View file @
66a0d674
...
...
@@ -178,10 +178,8 @@ options:
``SECRET_KEY``
Key used by Django to sign some information in cookies. If you don't
change this, the cookies can be spoofed by anyone.
.. seealso:: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-SECRET_KEY
Key used by Django to sign some information in cookies, see
:ref:`production-secret` for more information.
``SERVER_EMAIL``
...
...
@@ -374,6 +372,9 @@ Django secret key
The ``SECRET_KEY`` setting is used by Django to sign cookies and you should
really use own value rather than using the one coming from example setup.
You can generate new key using :file:`examples/generate-secret-key` shipped
with Weblate.
.. seealso:: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-SECRET_KEY
.. _production-admin-files:
...
...
examples/generate-secret-key
0 → 100755
View file @
66a0d674
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2013 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from
django.utils.crypto
import
get_random_string
chars
=
'abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)'
print
get_random_string
(
50
,
chars
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment