Skip to content

This cookiecutter project serves as a starting point for using the Django Globus Portal Framework.

Notifications You must be signed in to change notification settings

NickolausDS/cookiecutter-django-globus-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cookiecutter Django Globus App

This cookiecutter project serves as a starting point for using the Django Globus Portal Framework (DGPF). Documentation for DGPF can be found here. Please see the installation instructions below to get an example application running using DGPF.

This project along with DGPF also showcases using three of Globus's APIs in a custom application - Auth, Search, and Transfer. This is just one example of many different ways Globus APIs can be used.

To see what is installed on the backend for the running the local API, check the requirements.txt file for more info. For the transfer portion of the project, check the package.json file to see what is running on the client.

Requirements

Initial Setup (OPTIONAL)

The Installation below will set default values for the Globus CLIENT_ID and SECRET_KEY. If you want to use your own, go to developers.globus.org, create a new app, and ensure the following:

The Installation process creates a file for storing your credentials called {{ cookiecutter.project_slug }}/settings/local.py. It resides next to the 'settings.py' file. When asked for the globus_client_id and globus_secret_key below, use the ones created from the process above.

For Transfer to work, you will also need to add a globus_portal_endpoint ID. If left blank (the default), the application will attempt to set it to the value of your Globus Connect Personal endpoint. You can update this at any time in your settings files, but only one endpoint can be associated with the transfer portal for transferring to other searched endpoints.

Installation

(Optional) Create a venv for installing modules:

python3 -m venv <path_to_venv> 
source <path_to_venv>/bin/activate
  1. Install cookiecutter
    pip install cookiecutter
    
  2. Point cookiecutter to this repository:
    cookiecutter https://github.com/globus/cookiecutter-django-globus-app
    
  3. Answer the questions (defaults are provided)
    project_name [Globus Portal]: 
    project_slug [django_globus_portal]: 
    description [A web app for managing project data]: 
    author_name [researcher]: 
    email [researcher@example.com]: 
    version [0.1.0]: 
    globus_client_id [f44c948b-8aa5-4881-85c5-e0a2300d96c4]:
    globus_secret_key [ScsmAsf/0yhP9/uI1vxAsmuRywWW1JLgCbxyKsnd0u8]:
    globus_search_index [25ad7f95-1c21-4f8e-a478-ebdfbdfba7ec]:
    globus_portal_endpoint [ddb59aef-6d04-11e5-ba46-22000b92c6ec]:
    
  4. cd ./<project_slug>
  5. Run the following Django and NPM related commands to build the application
    # Run this first before any of the optional node and npm commands below
    pip install -r requirements.txt
    
    # Below is needed to build the transfer client, which is built using React - https://reactjs.org/
    npm install
    ./node_modules/.bin/webpack
    
    python manage.py migrate
    python manage.py collectstatic --no-input # If using runserver locally, this step does not need to be run
    python manage.py runserver
    
  6. Head to http://localhost:8000 and click the Globus Login link in the upper right-hand corner

Containerized Environment

Coming Soon! :)

About

This cookiecutter project serves as a starting point for using the Django Globus Portal Framework.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 36.7%
  • Python 34.5%
  • HTML 27.0%
  • Other 1.8%