Try using django-swiftbrowser

** Continued from Try using vagrant-swift-all-in-one **


django-swiftbrowser

I built a Swift server with Try using vagrant-swift-all-in-one, but I also want to prepare the GUI on the server side. OpenStack dashboard service (Horizon) and authentication service (Keystone) You can use it, but it's very tedious to install it just to use Swift. So, let's use django-swiftbrowser which is a simple GUI for Swift.

#Get repository
git clone git://github.com/cschwede/django-swiftbrowser.git
#Installation
cd django-swiftbrowser
sudo python setup.py install

swiftbrowser settings

Create a suitable project.

django-admin.py startproject myproj
cd myproj
cp ~/django-swiftbrowser/example/settings.py myproj/settings.py

Modify myproj / settings.py.

myproj/settings.py


#Change Swift authentication URL to fixed IP of Swift server
SWIFT_AUTH_URL = 'http://192.168.0.1:8080/auth/v1.0'
SWIFT_AUTH_VERSION = 1 # 2 for keystone
STORAGE_URL = 'http://192.168.0.1:8080/v1/'
BASE_URL = 'http://192.168.0.1'
SWAUTH_URL = 'http://192.168.0.1:8080/auth/v2'
STATIC_DIR = '/var/www/myproj/static'

#Corrected timezone and language from Berlin to Japan
- TIME_ZONE = 'Europe/Berlin'
- LANGUAGE_CODE = 'de-de'
+ TIME_ZONE = 'Asia/Tokyo'
+ LANGUAGE_CODE = 'ja-jp'

# ALLOWED_Added Swift server static IP to HOSTS
ALLOWED_HOSTS = ['127.0.0.1', '192.168.0.1', 'insert_your_hostname_here']

Add the URL setting to myproj / urls.py.

myproj/urls.py


  from django.conf.urls import patterns, include, url
  from django.contrib import admin
+ import swiftbrowser.urls

  urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
+   url(r'^', include(swiftbrowser.urls)),
)

Copy the static file.

sudo python manage.py collectstatic
(Because you will be asked if you want to overwrite the existing file'yes'Enter the)

Start swift browser and log in

Start Swiftbrowser.

python manage.py runserver 192.168.0.1:8000 --insecure &

If you can start it without any problem, access http://192.168.0.1:8000/login/ from your browser and the login screen will be displayed. To log in as a test user, enter username: test: tester and password: testing.

You can now use Swift from your browser.

* Where it didn't work

It becomes Unauthorized when uploading the file. If you find the cause, fix it.

Recommended Posts

Try using django-swiftbrowser
Try using docker-py
Try using cookiecutter
Try using PDFMiner
Try using Selenium
Try using scipy
Try using pandas.DataFrame
Try using matplotlib
Try using tf.metrics
Try using PyODE
[Azure] Try using Azure Functions
Try using virtualenv now
Try using W & B
Try using Django templates.html
[Kaggle] Try using LGBM
Try using Python's Tkinter
Try using Tweepy [Python2.7]
Try using Pytorch's collate_fn
Try using PythonTex with Texpad.
[Python] Try using Tkinter's canvas
Try using Jupyter's Docker image
Try using scikit-learn (1) --K-means clustering
Try function optimization using Hyperopt
Try using matplotlib with PyCharm
Try using Azure Logic Apps
Try using Kubernetes Client -Python-
[Kaggle] Try using xg boost
Try using the Twitter API
Try using OpenCV on Windows
Try using Jupyter Notebook dynamically
Try using AWS SageMaker Studio
Try tweeting automatically using Selenium.
Try using SQLAlchemy + MySQL (Part 1)
Try using the Twitter API
Try using SQLAlchemy + MySQL (Part 2)
Try using Django's template feature
Try using the PeeringDB 2.0 API
Try using Pelican's draft feature
Try using pytest-Overview and Samples-
Try using folium with anaconda
Try using Janus gateway's Admin API
[Statistics] [R] Try using quantile regression.
Try using Spyder included in Anaconda
Try using design patterns (exporter edition)
Try using Pillow on iPython (Part 1)
Try using Pillow on iPython (Part 2)
Try using Pleasant's API (python / FastAPI)
Try using LevelDB in Python (plyvel)
Try using pynag to configure Nagios
Try using PyCharm's remote debugging feature
Try using ArUco on Raspberry Pi
Try using cheap LiDAR (Camsense X1)
[Sakura rental server] Try using flask.
Try using Pillow on iPython (Part 3)
Reinforcement learning 8 Try using Chainer UI
Try to get statistics using e-Stat
Try using Python argparse's action API
Try using the Python Cmd module
Try using Python's networkx with AtCoder
Try using Leap Motion in Python
Try using GCP Handwriting Recognition (OCR)