Skip to content

Commit

Permalink
Update example project.
Browse files Browse the repository at this point in the history
  • Loading branch information
juanifioren committed Mar 23, 2018
1 parent 8545ada commit b803f89
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 16 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion example_project/Dockerfile → example/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:2-onbuild
FROM python:3-onbuild

RUN [ "python", "manage.py", "migrate" ]
RUN [ "python", "manage.py", "creatersakey" ]
Expand Down
11 changes: 4 additions & 7 deletions example_project/README.md → example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Example Project](https://s17.postimg.org/4jjj8lavj/Screen_Shot_2016_09_07_at_15_58_43.png)

Run your own OIDC provider in a second. This is a Django app with all the necessary things to work with `django-oidc-provider` package.
On this example you'll be running your own OIDC provider in a second. This is a Django app with all the necessary things to work with `django-oidc-provider` package.

## Setup & Running

Expand All @@ -14,15 +14,12 @@ Run your own OIDC provider in a second. This is a Django app with all the necess
Setup project environment with [virtualenv](https://virtualenv.pypa.io) and [pip](https://pip.pypa.io).

```bash
# For Python 2.7.
$ virtualenv project_env
# Or Python 3.
$ virtualenv -p /usr/bin/python3.4 project_env
$ virtualenv -p /usr/bin/python3 project_env

$ source project_env/bin/activate

$ git clone https://github.com/juanifioren/django-oidc-provider.git
$ cd django-oidc-provider/example_project
$ cd django-oidc-provider/example
$ pip install -r requirements.txt
```

Expand Down Expand Up @@ -53,7 +50,7 @@ After you run `pip install -r requirements.txt`.
# Remove pypi package.
$ pip uninstall django-oidc-provider

# Go back and add the package again.
# Go back to django-oidc-provider/ folder and add the package on editable mode.
$ cd ..
$ pip install -e .
```
File renamed without changes.
6 changes: 3 additions & 3 deletions example_project/myapp/settings.py → example/app/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'myapp',
'app',
'oidc_provider',
]

Expand Down Expand Up @@ -51,9 +51,9 @@
},
]

ROOT_URLCONF = 'myapp.urls'
ROOT_URLCONF = 'app.urls'

WSGI_APPLICATION = 'myapp.wsgi.application'
WSGI_APPLICATION = 'app.wsgi.application'

# Database

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{% block content %}

<section class="text-xs-center">
<section>
<div class="container">
<h1 class="jumbotron-heading">{% trans 'Welcome' %}{% if user.is_authenticated %} {{ user.username }}{% endif %}!</h1>
<p class="lead text-muted">{% trans 'This is an example of an OpenID Connect 1.0 Provider. Built with the <a href="https://www.djangoproject.com/" target="_BLANK"><u>Django Framework</u></a> and <a href="https://github.com/juanifioren/django-oidc-provider" target="_BLANK"><u>django-oidc-provider</u></a> package.' %}</p>
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion example_project/myapp/wsgi.py → example/app/wsgi.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myapp.settings')

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'app.settings')

application = get_wsgi_application()
2 changes: 1 addition & 1 deletion example_project/manage.py → example/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys

if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'myapp.settings')
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'app.settings')

from django.core.management import execute_from_command_line

Expand Down
2 changes: 2 additions & 0 deletions example/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
django
https://github.com/juanifioren/django-oidc-provider/archive/master.zip
2 changes: 0 additions & 2 deletions example_project/requirements.txt

This file was deleted.

0 comments on commit b803f89

Please sign in to comment.