Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-splash
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-splash
Commits
c2a4eb32
Commit
c2a4eb32
authored
Feb 10, 2014
by
Xavier Antoviaque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update documentation with new configuration method
parent
2faba856
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
22 deletions
+21
-22
README.md
+21
-22
No files found.
README.md
View file @
c2a4eb32
...
@@ -6,26 +6,20 @@ if they don't have the proper cookie set. This can be used to display a small
...
@@ -6,26 +6,20 @@ if they don't have the proper cookie set. This can be used to display a small
marketing landing page, protect an alpha website from the public eye, make an
marketing landing page, protect an alpha website from the public eye, make an
announcement, etc.
announcement, etc.
Meant to be used with https://github.com/edx/edx-platform/
Meant to be used with https://github.com/edx/edx-platform/ -- or you will need
to import the config_models application to your Django application:
https://github.com/edx/edx-platform/tree/master/common/djangoapps/config_models
### Installation
### Installation
Add the
following configuration variables
:
Add the
application to the
`INSTALLED_APPS`
:
```
python
```
python
############################### Splash screen ####################################
INSTALLED_APPS
=
(
...
SPLASH_SCREEN_COOKIE_NAME
=
'edx_splash_screen'
# Splash screen
'splash'
,
# The user cookie value must match one of the values to not be redirected to the
)
# splash screen URL
SPLASH_SCREEN_COOKIE_ALLOWED_VALUES
=
[
'seen'
]
# Users which should never be redirected (usernames)
SPLASH_SCREEN_UNAFFECTED_USERS
=
[]
# The URL the users should be redirected to when they don't have the right cookie
SPLASH_SCREEN_REDIRECT_URL
=
'http://edx.org'
```
```
Add the middleware to the configuration:
Add the middleware to the configuration:
...
@@ -37,13 +31,18 @@ MIDDLEWARE_CLASSES = (
...
@@ -37,13 +31,18 @@ MIDDLEWARE_CLASSES = (
)
)
```
```
And to the
`INSTALLED_APPS`
:
Run the migrations
:
```
python
INSTALLED_APPS
=
(
...
# Splash screen
'splash'
,
)
```
```
$ ./manage.py migrate splash
```
Then go to your Django admin, in http://yourserver/admin/splash/splashconfig/add/
and configure the following variables:
*
`enabled`
: To activate the feature
*
`cookie_name`
: The name of the cookie
*
`cookie_allowed_values`
: The user cookie value must match one of the values to not be redirected to the splash screen URL
*
`unaffected_users`
: Users which should never be redirected (usernames)
*
`redirect_url`
: The URL the users should be redirected to when they don't have the right cookie
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