Google drive to Wikimedia Commons
Upload your files directly from Google drive to Wikimedia Commons. Currently deployed at [Toollabs](https://tools.wmflabs .org/google-drive-photos-to-commons/).
python 3.5.3 on production. Make sure you have this installed on
your machine, or use
pyenv as described later in this documentation.
Steps for local development
- Install pyenv and its virtualenv manager using
This will create a pyenv-virtualenv for you and probably place it on your
$ brew install pyenv $ brew install pyenv-virtualenv $ pyenv install 3.5.3 $ eval "$(pyenv init -)" gdrive_to_commons/$ pyenv virtualenv 3.5.3 gdrive-env-3.5.3
~/home/<username>/.pyenv/versions/. You can activate that manually using
or even better:
gdrive_to_commons/$ source ~/.pyenv/versions/gdrive-env-3.5.3/bin/activate
or, there are better ways to do this if you follow https://github .com/pyenv/pyenv-virtualenv
gdrive_to_commons/$ pyenv activate gdrive-env-3.5.3
- Now you are in the right environment, install dependencies using:
(gdrive-env-3.5.3) gdrive_to_commons/$ pip install -r requirements.txt
- We use
pre-commithooks to format code. See that you install it using https://pre-commit.com/. Later, install our pre-commit hooks using
(gdrive-env-3.5.3) gdrive_to_commons/$ pre-commit install
- There are some
localsettingsyou need to have as part of running the server. You can copy a template using:
(gdrive-env-3.5.3) gdrive_to_commons/$ cp gdrive_to_commons/local_settings_sample.py gdrive_to_commons/local_settings.pyYou need to modify the values there to use the applicaiton in full.
- Run the Django standard runserver steps:
or even better, run it from pyCharm using your debugger.
(gdrive-env-3.5.3) gdrive_to_commons/$ python manage.py migrate (gdrive-env-3.5.3) gdrive_to_commons/$ python manage.py collectstatic (gdrive-env-3.5.3) gdrive_to_commons/$ python manage.py runserver