From 898ed2b63f3d276ed7659bc466fae2c6a48bd4a1 Mon Sep 17 00:00:00 2001 From: winkidney Date: Thu, 14 Apr 2022 07:35:46 -0800 Subject: [PATCH] Deployed 72f19df with MkDocs version: 1.1.2 --- 404.html | 2 +- api/index.html | 10 +-- assets/index.html | 2 +- contributing/index.html | 2 +- development/index.html | 22 +++--- docs/index.html | 2 +- extensions/index.html | 2 +- index.html | 2 +- install-with-docker/index.html | 38 +++++----- license/index.html | 2 +- passwords/index.html | 2 +- plugin-system/index.html | 14 ++-- screenshots/index.html | 2 +- search/search_index.json | 2 +- sitemap.xml | 126 +++++++++++++++------------------ sitemap.xml.gz | Bin 322 -> 320 bytes theories/index.html | 6 +- upgrade-guide/index.html | 28 ++++++-- 18 files changed, 133 insertions(+), 131 deletions(-) diff --git a/404.html b/404.html index 393bc85..5bb110f 100644 --- a/404.html +++ b/404.html @@ -14,7 +14,7 @@ - + diff --git a/api/index.html b/api/index.html index 19ca7ec..8a5c24c 100644 --- a/api/index.html +++ b/api/index.html @@ -16,7 +16,7 @@ - + @@ -458,12 +458,12 @@

token-accessing

Access API via Token

Here is an example for curl to access user-profile API:

-
curl -X GET http://192.168.1.101:8080/api/v2/profile/users/ -H 'Authorization: Token fa3b0ed2b8a87c81323688c288642288c9570aca'
-
+
curl -X GET http://192.168.1.101:8080/api/v2/profile/users/ -H 'Authorization: Token fa3b0ed2b8a87c81323688c288642288c9570aca'
+

You will get response like this:

-
[
+
[
     {
     "username": "winkidney",
     "token": "fa3b0ed2b8a87c81323688c288642288c9570aca",
@@ -472,7 +472,7 @@
     "resource_link": "http://localhost:8000/api/v2/profile/users/1/"
     }
 ]
-
+

API reference

diff --git a/assets/index.html b/assets/index.html index e70db4c..286ab31 100644 --- a/assets/index.html +++ b/assets/index.html @@ -16,7 +16,7 @@ - + diff --git a/contributing/index.html b/contributing/index.html index d894da5..73c8b60 100644 --- a/contributing/index.html +++ b/contributing/index.html @@ -16,7 +16,7 @@ - + diff --git a/development/index.html b/development/index.html index 2ada220..6c908e4 100644 --- a/development/index.html +++ b/development/index.html @@ -16,7 +16,7 @@ - + @@ -508,28 +508,28 @@ are not the defaults for these languages:

  • Node, yarn
  • To install these is pretty simple, you can just run:

    -
    cd pinry
    +
    cd pinry
     pip install pipenv
     npm install -g yarn
    -
    +

    After that you can install this project with:

    -
    pipenv install --dev
    +
    pipenv install --dev
     cd pinry-spa; yarn install
    -
    +

    You will need to run two separate items as of right now, the SPA and the backend:

    -
    pipenv run python manage.py migrate
    +
    pipenv run python manage.py migrate
     pipenv run python manage.py runserver
    -
    +

    And from another terminal:

    -
    cd pinry-spa; yarn serve
    -
    +
    cd pinry-spa; yarn serve
    +

    Testing

    @@ -538,8 +538,8 @@ anything. If you are live dangerously and have cutting edge new Pinry features first you can use our master branch for your own instance. We recommend using our tags/versions though.

    To run Pinry's tests inside the Pinry repo run:

    -
    pipenv run python manage.py test
    -
    +
    pipenv run python manage.py test
    +

    Docker

    diff --git a/docs/index.html b/docs/index.html index 172c83c..b24717f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -16,7 +16,7 @@ - + diff --git a/extensions/index.html b/extensions/index.html index b6691ee..cdde674 100644 --- a/extensions/index.html +++ b/extensions/index.html @@ -16,7 +16,7 @@ - + diff --git a/index.html b/index.html index 6d6eba1..0b77e58 100644 --- a/index.html +++ b/index.html @@ -16,7 +16,7 @@ - + diff --git a/install-with-docker/index.html b/install-with-docker/index.html index 8000528..5bb3db6 100644 --- a/install-with-docker/index.html +++ b/install-with-docker/index.html @@ -16,7 +16,7 @@ - + @@ -458,42 +458,42 @@ the end of this page.

    Get Image form DockerHub

    The image is here: getpinry/pinry, or you could simply pull the image from DockerHub's registry via

    -
    docker pull getpinry/pinry
    -
    +
    docker pull getpinry/pinry
    +

    Then use the command line like:

    -
    # this should be an abs-path not relative path like "."
    -export DATA_PATH=/abs/path/to/your/data/directory
    +
    # this should be an abs-path not relative path like "."
    +export DATA_PATH=/abs/path/to/your/data/directory
     
    -sudo docker run -d=true -p=80:80 \
    -    -v=${DATA_PATH}:/data \
    -    getpinry/pinry
    -
    +sudo docker run -d=true -p=80:80 \ + -v=${DATA_PATH}:/data \ + getpinry/pinry +

    Build Docker from Source

    Running this will get the latest version of pinry itself

    -
    git clone https://github.com/pinry/pinry
    +
    git clone https://github.com/pinry/pinry
     cd pinry/docker
     ./build_docker.sh
    -
    +

    Now you can start your container by command like this

    -
    # this is where your database, local_settings and pins located
    +
    # this is where your database, local_settings and pins located
     mkdir data
     # use absolute path for docker to avoid using default data-volume (we use directory instead)
     ./start_docker.sh `readlink -f data`
    -
    +

    Also, if you want to use a "named volume" instead, you can do this:

    -
    docker volume create pinry
    +
    docker volume create pinry
     docker run -d=true -p=80:80 \
         -v pinry:/data \
         getpinry/pinry
    -
    +

    Please visit http://your-ip to visit your instance and register a new account, enjoy it.

    @@ -506,16 +506,16 @@ via docker exec and any way like Enable signups for new users

    Please edit /data/local_settings.py in docker and remove the container then restart it.

    -
    ALLOW_NEW_REGISTRATIONS = True
    -
    +
    ALLOW_NEW_REGISTRATIONS = True
    +

    Building docker-pinry again (with latest version)

    Running this will build you a docker image with the latest version of pinry

    -
    git pull --rebase
    +
    git pull --rebase
     cd ./docker/
     ./build_docker.sh
    -
    +

    Backup

    diff --git a/license/index.html b/license/index.html index 2c13836..82ac631 100644 --- a/license/index.html +++ b/license/index.html @@ -16,7 +16,7 @@ - + diff --git a/passwords/index.html b/passwords/index.html index 7728035..eadb90a 100644 --- a/passwords/index.html +++ b/passwords/index.html @@ -16,7 +16,7 @@ - + diff --git a/plugin-system/index.html b/plugin-system/index.html index 96a5c67..66a2836 100644 --- a/plugin-system/index.html +++ b/plugin-system/index.html @@ -16,7 +16,7 @@ - + @@ -457,7 +457,7 @@ The plugin loader will call the Plugin target only once and use the plugin instance after specified events triggered just like the way django-middleware works.

    You could create a plugin as python-package with content below:

    -
    from core.models import Image
    +
    from core.models import Image
     from django_images.models import Thumbnail
     
     
    @@ -472,17 +472,17 @@ instance after specified events triggered just like the way django-middleware wo
     
         def process_thumbnail_pre_creation(self, django_settings, thumbnail_instance: Thumbnail):
             pass
    -
    +

    You could make some changes on Image object and Thumbnail object before they actually be saved (for example, add water-mark to them).

    You could access example plugin via pinry_plugins/batteries/plugin_example.py.

    After all, enable the plugin in local_settings.py:

    -
    ENABLED_PLUGINS = [
    +
    ENABLED_PLUGINS = [
         'pinry_plugins.batteries.plugin_example.Plugin',
     ]
    -
    +

    Now the plugin will work like a charm!

    @@ -492,10 +492,10 @@ before they actually be saved (for example, add water-mark to them).

    If you have a plugin named hello.py and it have a Plugin class inside.

    You could just copy it to directory pinry_plugins/batteries.

    Now add config to local_settings.py

    -
    ENABLED_PLUGINS = [
    +
    ENABLED_PLUGINS = [
         'pinry_plugins.batteries.hello.Plugin',
     ]
    -
    +

    Then, rebuild your docker image, the plugin will work diff --git a/screenshots/index.html b/screenshots/index.html index ecdc0e2..2a491ff 100644 --- a/screenshots/index.html +++ b/screenshots/index.html @@ -16,7 +16,7 @@ - + diff --git a/search/search_index.json b/search/search_index.json index 4c1cd8f..ab74fa7 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Pinry, the open-source tiling image board. \u00b6 The open-source core of Pinry, a tiling image board system for people who want to save, tag, and share images, videos and webpages in an easy to skim through format. Demo Site \u00b6 We currently have a few demos up at: https://pin.37soloist.com/ https://pinry-demo.lapo.it/ If you'd like to showcase your Pinry website toss us a link! As Seen On \u00b6","title":"Home"},{"location":"#pinry-the-open-source-tiling-image-board","text":"The open-source core of Pinry, a tiling image board system for people who want to save, tag, and share images, videos and webpages in an easy to skim through format.","title":"Pinry, the open-source tiling image board."},{"location":"#demo-site","text":"We currently have a few demos up at: https://pin.37soloist.com/ https://pinry-demo.lapo.it/ If you'd like to showcase your Pinry website toss us a link!","title":"Demo Site"},{"location":"#as-seen-on","text":"","title":"As Seen On"},{"location":"api/","text":"API Support \u00b6 Pinry support API accessing via token so that you could write your own client or import any pin format to your instance. Get Token \u00b6 Just go to My -> Profile page to get the token. Access API via Token \u00b6 Here is an example for curl to access user-profile API: curl -X GET http://192.168.1.101:8080/api/v2/profile/users/ -H 'Authorization: Token fa3b0ed2b8a87c81323688c288642288c9570aca' You will get response like this: [ { \"username\": \"winkidney\", \"token\": \"fa3b0ed2b8a87c81323688c288642288c9570aca\", \"email\": \"winkidney@gmail.com\", \"gravatar\": \"0d7161ac663cdb21108502cd4051149c\", \"resource_link\": \"http://localhost:8000/api/v2/profile/users/1/\" } ] API reference \u00b6 Just use the interactive API interface by DRF or follow the file api.js","title":"API support"},{"location":"api/#api-support","text":"Pinry support API accessing via token so that you could write your own client or import any pin format to your instance.","title":"API Support"},{"location":"api/#get-token","text":"Just go to My -> Profile page to get the token.","title":"Get Token"},{"location":"api/#access-api-via-token","text":"Here is an example for curl to access user-profile API: curl -X GET http://192.168.1.101:8080/api/v2/profile/users/ -H 'Authorization: Token fa3b0ed2b8a87c81323688c288642288c9570aca' You will get response like this: [ { \"username\": \"winkidney\", \"token\": \"fa3b0ed2b8a87c81323688c288642288c9570aca\", \"email\": \"winkidney@gmail.com\", \"gravatar\": \"0d7161ac663cdb21108502cd4051149c\", \"resource_link\": \"http://localhost:8000/api/v2/profile/users/1/\" } ]","title":"Access API via Token"},{"location":"api/#api-reference","text":"Just use the interactive API interface by DRF or follow the file api.js","title":"API reference"},{"location":"assets/","text":"Assets \u00b6 Logos \u00b6 Pinry has two logos, a light and dark variant:","title":"Assets"},{"location":"assets/#assets","text":"","title":"Assets"},{"location":"assets/#logos","text":"Pinry has two logos, a light and dark variant:","title":"Logos"},{"location":"contributing/","text":"Contributing \u00b6 We welcome any and all types of contributions, even if it's just fixing a single small spelling mistake.","title":"Contributing"},{"location":"contributing/#contributing","text":"We welcome any and all types of contributions, even if it's just fixing a single small spelling mistake.","title":"Contributing"},{"location":"development/","text":"Developing Pinry \u00b6 Pinry currently has two major requirements: Python 3.6+ Node 10+ For minor requirements you need two have installed two package managers that are not the defaults for these languages: Python, pipenv Node, yarn To install these is pretty simple, you can just run: cd pinry pip install pipenv npm install -g yarn After that you can install this project with: pipenv install --dev cd pinry-spa; yarn install You will need to run two separate items as of right now, the SPA and the backend: pipenv run python manage.py migrate pipenv run python manage.py runserver And from another terminal: cd pinry-spa; yarn serve Testing \u00b6 We have many tests built into Pinry to ensure that changes don't break anything. If you are live dangerously and have cutting edge new Pinry features first you can use our master branch for your own instance. We recommend using our tags/versions though. To run Pinry's tests inside the Pinry repo run: pipenv run python manage.py test Docker \u00b6 Follow the steps below to install Pinry locally or on any server. This process installs the minimal requirements to run Pinry. For development requirements and procedures, see testing above. Current docker configuration will just mount source code directory to docker app directory and run any codes existed in current git branch, you may also add \"local_settings.py\" to customize settings without changing settings file in pinry/settings . Install the requirements: Docker Docker Compose Set any custom configuration options you need and run:: cp docker-compose.example.yml docker-compose.yml # edit docker-compose.yml and change the secret-key, # don't forget to backup this config file. # You should build frontend first docker-compose up build_frontend # then start the backend server docker-compose up -d web If you want to run Pinry with current user in docker:: ./start_docker_with_current_user.sh [-d] Bootstrap the database(optional):: docker-compose exec web python3 manage.py migrate --settings=pinry.settings.docker Note : No static file server configured, your should configure nginx or other server to serve static files from ./static (as path /static ) and ./pinry-spa/dist (as html root / )","title":"Development"},{"location":"development/#developing-pinry","text":"Pinry currently has two major requirements: Python 3.6+ Node 10+ For minor requirements you need two have installed two package managers that are not the defaults for these languages: Python, pipenv Node, yarn To install these is pretty simple, you can just run: cd pinry pip install pipenv npm install -g yarn After that you can install this project with: pipenv install --dev cd pinry-spa; yarn install You will need to run two separate items as of right now, the SPA and the backend: pipenv run python manage.py migrate pipenv run python manage.py runserver And from another terminal: cd pinry-spa; yarn serve","title":"Developing Pinry"},{"location":"development/#testing","text":"We have many tests built into Pinry to ensure that changes don't break anything. If you are live dangerously and have cutting edge new Pinry features first you can use our master branch for your own instance. We recommend using our tags/versions though. To run Pinry's tests inside the Pinry repo run: pipenv run python manage.py test","title":"Testing"},{"location":"development/#docker","text":"Follow the steps below to install Pinry locally or on any server. This process installs the minimal requirements to run Pinry. For development requirements and procedures, see testing above. Current docker configuration will just mount source code directory to docker app directory and run any codes existed in current git branch, you may also add \"local_settings.py\" to customize settings without changing settings file in pinry/settings . Install the requirements: Docker Docker Compose Set any custom configuration options you need and run:: cp docker-compose.example.yml docker-compose.yml # edit docker-compose.yml and change the secret-key, # don't forget to backup this config file. # You should build frontend first docker-compose up build_frontend # then start the backend server docker-compose up -d web If you want to run Pinry with current user in docker:: ./start_docker_with_current_user.sh [-d] Bootstrap the database(optional):: docker-compose exec web python3 manage.py migrate --settings=pinry.settings.docker Note : No static file server configured, your should configure nginx or other server to serve static files from ./static (as path /static ) and ./pinry-spa/dist (as html root / )","title":"Docker"},{"location":"docs/","text":"Docs \u00b6 Pinry's docs are built with mkdocs . If you have dev dependencies installed, pipenv install --dev , then you can use the following commands: make docs-serve for testing make docs-build to build the files make docs-publish to publish to github","title":"Docs"},{"location":"docs/#docs","text":"Pinry's docs are built with mkdocs . If you have dev dependencies installed, pipenv install --dev , then you can use the following commands: make docs-serve for testing make docs-build to build the files make docs-publish to publish to github","title":"Docs"},{"location":"extensions/","text":"Browser Extensions \u00b6 Lapo Luchini has been kind enough to create extensions for both Chrome and Firefox. You can find his repo for these extensions at: https://github.com/lapo-luchini/browser-pinry If you'd like to install either extension they are available at: https://chrome.google.com/webstore/detail/jmhdcnmfkglikfjafdmdikoonedgijpa/ https://addons.mozilla.org/it/firefox/addon/add-to-pinry/","title":"Extensions"},{"location":"extensions/#browser-extensions","text":"Lapo Luchini has been kind enough to create extensions for both Chrome and Firefox. You can find his repo for these extensions at: https://github.com/lapo-luchini/browser-pinry If you'd like to install either extension they are available at: https://chrome.google.com/webstore/detail/jmhdcnmfkglikfjafdmdikoonedgijpa/ https://addons.mozilla.org/it/firefox/addon/add-to-pinry/","title":"Browser Extensions"},{"location":"install-with-docker/","text":"Pinry Docker \u00b6 A nice and easy way to get a Pinry instance up and running using docker. For help on getting started with docker see the official getting started guide at the end of this page. Get Image form DockerHub \u00b6 The image is here: getpinry/pinry , or you could simply pull the image from DockerHub's registry via docker pull getpinry/pinry Then use the command line like: # this should be an abs-path not relative path like \".\" export DATA_PATH =/ abs / path / to / your / data / directory sudo docker run - d = true - p = 80 : 80 \\ - v =$ { DATA_PATH }: / data \\ getpinry / pinry Build Docker from Source \u00b6 Running this will get the latest version of pinry itself git clone https://github.com/pinry/pinry cd pinry/docker ./build_docker.sh Now you can start your container by command like this # this is where your database , local_settings and pins located mkdir data # use absolute path for docker to avoid using default data - volume ( we use directory instead ) . / start_docker . sh ` readlink - f data ` Also, if you want to use a \"named volume\" instead, you can do this: docker volume create pinry docker run -d=true -p=80:80 \\ -v pinry:/data \\ getpinry/pinry Please visit http://your-ip to visit your instance and register a new account, enjoy it. Configuring docker-pinry \u00b6 All the configuration files will be created in your data folder you mounted to docker (mounted as /data ). If you use docker's data volume, please find the way to edit files via docker exec and any way like here . Enable signups for new users \u00b6 Please edit /data/local_settings.py in docker and remove the container then restart it. ALLOW_NEW_REGISTRATIONS = True Building docker-pinry again (with latest version) \u00b6 Running this will build you a docker image with the latest version of pinry git pull --rebase cd ./docker/ ./build_docker.sh Backup \u00b6 Just copy data folder's content to an safe place, enjoy :) Why include nginx and not just map to gunicorn directly? \u00b6 Because gunicorn/django can't serve static files very well and it is unwise to do so for security reasons. I built this so that people can have a full hosted solution in a container. If you have a host machine running nginx then of course there is no point to run nginx in the container as well, you can simply disable nginx, map gunicorn to a port and then set your host machine's nginx to display your media and static files since that directory is shared between the container and host. Why use sqlite3? \u00b6 Because it has a very low resource cost and most pinry websites are small personal ones. Why have a full on database for that? If you need more power than you can easily modify the data/local_settings.py to point to a stronger database solution ( e.g: PostgreSQL or MySQL ) . Links \u00b6 official getting started guide additional pinry configuration settings","title":"Install with Docker"},{"location":"install-with-docker/#pinry-docker","text":"A nice and easy way to get a Pinry instance up and running using docker. For help on getting started with docker see the official getting started guide at the end of this page.","title":"Pinry Docker"},{"location":"install-with-docker/#get-image-form-dockerhub","text":"The image is here: getpinry/pinry , or you could simply pull the image from DockerHub's registry via docker pull getpinry/pinry Then use the command line like: # this should be an abs-path not relative path like \".\" export DATA_PATH =/ abs / path / to / your / data / directory sudo docker run - d = true - p = 80 : 80 \\ - v =$ { DATA_PATH }: / data \\ getpinry / pinry","title":"Get Image form DockerHub"},{"location":"install-with-docker/#build-docker-from-source","text":"Running this will get the latest version of pinry itself git clone https://github.com/pinry/pinry cd pinry/docker ./build_docker.sh Now you can start your container by command like this # this is where your database , local_settings and pins located mkdir data # use absolute path for docker to avoid using default data - volume ( we use directory instead ) . / start_docker . sh ` readlink - f data ` Also, if you want to use a \"named volume\" instead, you can do this: docker volume create pinry docker run -d=true -p=80:80 \\ -v pinry:/data \\ getpinry/pinry Please visit http://your-ip to visit your instance and register a new account, enjoy it.","title":"Build Docker from Source"},{"location":"install-with-docker/#configuring-docker-pinry","text":"All the configuration files will be created in your data folder you mounted to docker (mounted as /data ). If you use docker's data volume, please find the way to edit files via docker exec and any way like here .","title":"Configuring docker-pinry"},{"location":"install-with-docker/#enable-signups-for-new-users","text":"Please edit /data/local_settings.py in docker and remove the container then restart it. ALLOW_NEW_REGISTRATIONS = True","title":"Enable signups for new users"},{"location":"install-with-docker/#building-docker-pinry-again-with-latest-version","text":"Running this will build you a docker image with the latest version of pinry git pull --rebase cd ./docker/ ./build_docker.sh","title":"Building docker-pinry again (with latest version)"},{"location":"install-with-docker/#backup","text":"Just copy data folder's content to an safe place, enjoy :)","title":"Backup"},{"location":"install-with-docker/#why-include-nginx-and-not-just-map-to-gunicorn-directly","text":"Because gunicorn/django can't serve static files very well and it is unwise to do so for security reasons. I built this so that people can have a full hosted solution in a container. If you have a host machine running nginx then of course there is no point to run nginx in the container as well, you can simply disable nginx, map gunicorn to a port and then set your host machine's nginx to display your media and static files since that directory is shared between the container and host.","title":"Why include nginx and not just map to gunicorn directly?"},{"location":"install-with-docker/#why-use-sqlite3","text":"Because it has a very low resource cost and most pinry websites are small personal ones. Why have a full on database for that? If you need more power than you can easily modify the data/local_settings.py to point to a stronger database solution ( e.g: PostgreSQL or MySQL ) .","title":"Why use sqlite3?"},{"location":"install-with-docker/#links","text":"official getting started guide additional pinry configuration settings","title":"Links"},{"location":"license/","text":"License \u00b6 The BSD 2-Clause License \u00b6 Copyright (c) 2019 , Pinry's Contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","title":"License"},{"location":"license/#license","text":"","title":"License"},{"location":"license/#the-bsd-2-clause-license","text":"Copyright (c) 2019 , Pinry's Contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","title":"The BSD 2-Clause License"},{"location":"passwords/","text":"Updating Passwords \u00b6 Currently we don't have a good \"forgot my password\" method on Pinry since that generally requires an email to be sent. The current method for changing passwords involves: Create a new super user pipenv run python manage.py createsuperuser Login to your admin panel {your_website_url}/admin/ Go to the users section, select the user, change their password. Inside Docker \u00b6 If you use that command to create superuser inside docker , you could first exec to docker via command like docker exec -it bash and then use python manage.py createsuperuser --settings=pinry.settings.docker","title":"Passwords"},{"location":"passwords/#updating-passwords","text":"Currently we don't have a good \"forgot my password\" method on Pinry since that generally requires an email to be sent. The current method for changing passwords involves: Create a new super user pipenv run python manage.py createsuperuser Login to your admin panel {your_website_url}/admin/ Go to the users section, select the user, change their password.","title":"Updating Passwords"},{"location":"passwords/#inside-docker","text":"If you use that command to create superuser inside docker , you could first exec to docker via command like docker exec -it bash and then use python manage.py createsuperuser --settings=pinry.settings.docker","title":"Inside Docker"},{"location":"plugin-system/","text":"New plugin system for Pinry \u00b6 New plugin system is under development and a naive version has been released. A PinryPlugin is a python class or object which is callable. The plugin loader will call the Plugin target only once and use the plugin instance after specified events triggered just like the way django-middleware works. You could create a plugin as python-package with content below: from core.models import Image from django_images.models import Thumbnail class Plugin : def __init__ ( self ): # do something you want, just be called only once pass def process_image_pre_creation ( self , django_settings , image_instance : Image ): pass def process_thumbnail_pre_creation ( self , django_settings , thumbnail_instance : Thumbnail ): pass You could make some changes on Image object and Thumbnail object before they actually be saved (for example, add water-mark to them). You could access example plugin via pinry_plugins/batteries/plugin_example.py . After all, enable the plugin in local_settings.py: ENABLED_PLUGINS = [ 'pinry_plugins.batteries.plugin_example.Plugin', ] Now the plugin will work like a charm! List of Available Plugins \u00b6 left blank to fill, coming soon... Install Plugin in Docker \u00b6 If you have a plugin named hello.py and it have a Plugin class inside. You could just copy it to directory pinry_plugins/batteries . Now add config to local_settings.py ENABLED_PLUGINS = [ 'pinry_plugins.batteries.hello.Plugin', ] Then, rebuild your docker image, the plugin will work if no further python dependencies required.","title":"Plugin System"},{"location":"plugin-system/#new-plugin-system-for-pinry","text":"New plugin system is under development and a naive version has been released. A PinryPlugin is a python class or object which is callable. The plugin loader will call the Plugin target only once and use the plugin instance after specified events triggered just like the way django-middleware works. You could create a plugin as python-package with content below: from core.models import Image from django_images.models import Thumbnail class Plugin : def __init__ ( self ): # do something you want, just be called only once pass def process_image_pre_creation ( self , django_settings , image_instance : Image ): pass def process_thumbnail_pre_creation ( self , django_settings , thumbnail_instance : Thumbnail ): pass You could make some changes on Image object and Thumbnail object before they actually be saved (for example, add water-mark to them). You could access example plugin via pinry_plugins/batteries/plugin_example.py . After all, enable the plugin in local_settings.py: ENABLED_PLUGINS = [ 'pinry_plugins.batteries.plugin_example.Plugin', ] Now the plugin will work like a charm!","title":"New plugin system for Pinry"},{"location":"plugin-system/#list-of-available-plugins","text":"left blank to fill, coming soon...","title":"List of Available Plugins"},{"location":"plugin-system/#install-plugin-in-docker","text":"If you have a plugin named hello.py and it have a Plugin class inside. You could just copy it to directory pinry_plugins/batteries . Now add config to local_settings.py ENABLED_PLUGINS = [ 'pinry_plugins.batteries.hello.Plugin', ] Then, rebuild your docker image, the plugin will work if no further python dependencies required.","title":"Install Plugin in Docker"},{"location":"screenshots/","text":"Screenshots \u00b6 Due to the constant design iterations this is a very incomplete page. There will be more screenshots in the future. You could always try our demo that we mention on the first page of the docs. Home \u00b6 Boards \u00b6 Pins \u00b6 Create Pin \u00b6 Pin large-view \u00b6 Search/Filter \u00b6","title":"Screenshots"},{"location":"screenshots/#screenshots","text":"Due to the constant design iterations this is a very incomplete page. There will be more screenshots in the future. You could always try our demo that we mention on the first page of the docs.","title":"Screenshots"},{"location":"screenshots/#home","text":"","title":"Home"},{"location":"screenshots/#boards","text":"","title":"Boards"},{"location":"screenshots/#pins","text":"","title":"Pins"},{"location":"screenshots/#create-pin","text":"","title":"Create Pin"},{"location":"screenshots/#pin-large-view","text":"","title":"Pin large-view"},{"location":"screenshots/#searchfilter","text":"","title":"Search/Filter"},{"location":"theories/","text":"Theories \u00b6 Our general thought process for why we have implemented features the way we have. Boards & Tags \u00b6 Boards are for overall themes and tags are for specification. An example of this is \"Cars\" and \"Car Types\". A board could be \"Cars\" and then some tags on a pin in that board would be \"Mustang\", \"Sports Car\", \"Sedan\", etc. You would also like to share pins via \"board\" (designed only for a single user) instead of \"tag\" which designed for all users.","title":"Theories"},{"location":"theories/#theories","text":"Our general thought process for why we have implemented features the way we have.","title":"Theories"},{"location":"theories/#boards-tags","text":"Boards are for overall themes and tags are for specification. An example of this is \"Cars\" and \"Car Types\". A board could be \"Cars\" and then some tags on a pin in that board would be \"Mustang\", \"Sports Car\", \"Sedan\", etc. You would also like to share pins via \"board\" (designed only for a single user) instead of \"tag\" which designed for all users.","title":"Boards & Tags"},{"location":"upgrade-guide/","text":"Upgrade Guide \u00b6 This doc is about how you should do to upgrade specified version to next version. Generally, you should have no extra action to take if you use our docker version if we haven't written notes for it. How to get the current version: git tag The first line of output is our latest version of code. v2.0.2 -> v2.1.0 \u00b6 Main breaking changes: Upgrade django 1 to django 2.2 LTS How to: If you use non-docker version, you should change your web-server config to add a new alias for media file path (where to store images). Please add following config to your nginx config in server block: location /media { alias /path/to/static/media; expires max; access_log off; }","title":"Upgrade Guide"},{"location":"upgrade-guide/#upgrade-guide","text":"This doc is about how you should do to upgrade specified version to next version. Generally, you should have no extra action to take if you use our docker version if we haven't written notes for it. How to get the current version: git tag The first line of output is our latest version of code.","title":"Upgrade Guide"},{"location":"upgrade-guide/#v202-v210","text":"Main breaking changes: Upgrade django 1 to django 2.2 LTS How to: If you use non-docker version, you should change your web-server config to add a new alias for media file path (where to store images). Please add following config to your nginx config in server block: location /media { alias /path/to/static/media; expires max; access_log off; }","title":"v2.0.2 -> v2.1.0"}]} \ No newline at end of file +{"config":{"lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"","text":"Pinry, the open-source tiling image board. \u00b6 The open-source core of Pinry, a tiling image board system for people who want to save, tag, and share images, videos and webpages in an easy to skim through format. Demo Site \u00b6 We currently have a few demos up at: https://pin.37soloist.com/ https://pinry-demo.lapo.it/ If you'd like to showcase your Pinry website toss us a link! As Seen On \u00b6","title":"Home"},{"location":"#pinry-the-open-source-tiling-image-board","text":"The open-source core of Pinry, a tiling image board system for people who want to save, tag, and share images, videos and webpages in an easy to skim through format.","title":"Pinry, the open-source tiling image board."},{"location":"#demo-site","text":"We currently have a few demos up at: https://pin.37soloist.com/ https://pinry-demo.lapo.it/ If you'd like to showcase your Pinry website toss us a link!","title":"Demo Site"},{"location":"#as-seen-on","text":"","title":"As Seen On"},{"location":"api/","text":"API Support \u00b6 Pinry support API accessing via token so that you could write your own client or import any pin format to your instance. Get Token \u00b6 Just go to My -> Profile page to get the token. Access API via Token \u00b6 Here is an example for curl to access user-profile API: curl -X GET http://192.168.1.101:8080/api/v2/profile/users/ -H 'Authorization: Token fa3b0ed2b8a87c81323688c288642288c9570aca' You will get response like this: [ { \"username\": \"winkidney\", \"token\": \"fa3b0ed2b8a87c81323688c288642288c9570aca\", \"email\": \"winkidney@gmail.com\", \"gravatar\": \"0d7161ac663cdb21108502cd4051149c\", \"resource_link\": \"http://localhost:8000/api/v2/profile/users/1/\" } ] API reference \u00b6 Just use the interactive API interface by DRF or follow the file api.js","title":"API support"},{"location":"api/#api-support","text":"Pinry support API accessing via token so that you could write your own client or import any pin format to your instance.","title":"API Support"},{"location":"api/#get-token","text":"Just go to My -> Profile page to get the token.","title":"Get Token"},{"location":"api/#access-api-via-token","text":"Here is an example for curl to access user-profile API: curl -X GET http://192.168.1.101:8080/api/v2/profile/users/ -H 'Authorization: Token fa3b0ed2b8a87c81323688c288642288c9570aca' You will get response like this: [ { \"username\": \"winkidney\", \"token\": \"fa3b0ed2b8a87c81323688c288642288c9570aca\", \"email\": \"winkidney@gmail.com\", \"gravatar\": \"0d7161ac663cdb21108502cd4051149c\", \"resource_link\": \"http://localhost:8000/api/v2/profile/users/1/\" } ]","title":"Access API via Token"},{"location":"api/#api-reference","text":"Just use the interactive API interface by DRF or follow the file api.js","title":"API reference"},{"location":"assets/","text":"Assets \u00b6 Logos \u00b6 Pinry has two logos, a light and dark variant:","title":"Assets"},{"location":"assets/#assets","text":"","title":"Assets"},{"location":"assets/#logos","text":"Pinry has two logos, a light and dark variant:","title":"Logos"},{"location":"contributing/","text":"Contributing \u00b6 We welcome any and all types of contributions, even if it's just fixing a single small spelling mistake.","title":"Contributing"},{"location":"contributing/#contributing","text":"We welcome any and all types of contributions, even if it's just fixing a single small spelling mistake.","title":"Contributing"},{"location":"development/","text":"Developing Pinry \u00b6 Pinry currently has two major requirements: Python 3.6+ Node 10+ For minor requirements you need two have installed two package managers that are not the defaults for these languages: Python, pipenv Node, yarn To install these is pretty simple, you can just run: cd pinry pip install pipenv npm install -g yarn After that you can install this project with: pipenv install --dev cd pinry-spa; yarn install You will need to run two separate items as of right now, the SPA and the backend: pipenv run python manage.py migrate pipenv run python manage.py runserver And from another terminal: cd pinry-spa; yarn serve Testing \u00b6 We have many tests built into Pinry to ensure that changes don't break anything. If you are live dangerously and have cutting edge new Pinry features first you can use our master branch for your own instance. We recommend using our tags/versions though. To run Pinry's tests inside the Pinry repo run: pipenv run python manage.py test Docker \u00b6 Follow the steps below to install Pinry locally or on any server. This process installs the minimal requirements to run Pinry. For development requirements and procedures, see testing above. Current docker configuration will just mount source code directory to docker app directory and run any codes existed in current git branch, you may also add \"local_settings.py\" to customize settings without changing settings file in pinry/settings . Install the requirements: Docker Docker Compose Set any custom configuration options you need and run:: cp docker-compose.example.yml docker-compose.yml # edit docker-compose.yml and change the secret-key, # don't forget to backup this config file. # You should build frontend first docker-compose up build_frontend # then start the backend server docker-compose up -d web If you want to run Pinry with current user in docker:: ./start_docker_with_current_user.sh [-d] Bootstrap the database(optional):: docker-compose exec web python3 manage.py migrate --settings=pinry.settings.docker Note : No static file server configured, your should configure nginx or other server to serve static files from ./static (as path /static ) and ./pinry-spa/dist (as html root / )","title":"Development"},{"location":"development/#developing-pinry","text":"Pinry currently has two major requirements: Python 3.6+ Node 10+ For minor requirements you need two have installed two package managers that are not the defaults for these languages: Python, pipenv Node, yarn To install these is pretty simple, you can just run: cd pinry pip install pipenv npm install -g yarn After that you can install this project with: pipenv install --dev cd pinry-spa; yarn install You will need to run two separate items as of right now, the SPA and the backend: pipenv run python manage.py migrate pipenv run python manage.py runserver And from another terminal: cd pinry-spa; yarn serve","title":"Developing Pinry"},{"location":"development/#testing","text":"We have many tests built into Pinry to ensure that changes don't break anything. If you are live dangerously and have cutting edge new Pinry features first you can use our master branch for your own instance. We recommend using our tags/versions though. To run Pinry's tests inside the Pinry repo run: pipenv run python manage.py test","title":"Testing"},{"location":"development/#docker","text":"Follow the steps below to install Pinry locally or on any server. This process installs the minimal requirements to run Pinry. For development requirements and procedures, see testing above. Current docker configuration will just mount source code directory to docker app directory and run any codes existed in current git branch, you may also add \"local_settings.py\" to customize settings without changing settings file in pinry/settings . Install the requirements: Docker Docker Compose Set any custom configuration options you need and run:: cp docker-compose.example.yml docker-compose.yml # edit docker-compose.yml and change the secret-key, # don't forget to backup this config file. # You should build frontend first docker-compose up build_frontend # then start the backend server docker-compose up -d web If you want to run Pinry with current user in docker:: ./start_docker_with_current_user.sh [-d] Bootstrap the database(optional):: docker-compose exec web python3 manage.py migrate --settings=pinry.settings.docker Note : No static file server configured, your should configure nginx or other server to serve static files from ./static (as path /static ) and ./pinry-spa/dist (as html root / )","title":"Docker"},{"location":"docs/","text":"Docs \u00b6 Pinry's docs are built with mkdocs . If you have dev dependencies installed, pipenv install --dev , then you can use the following commands: make docs-serve for testing make docs-build to build the files make docs-publish to publish to github","title":"Docs"},{"location":"docs/#docs","text":"Pinry's docs are built with mkdocs . If you have dev dependencies installed, pipenv install --dev , then you can use the following commands: make docs-serve for testing make docs-build to build the files make docs-publish to publish to github","title":"Docs"},{"location":"extensions/","text":"Browser Extensions \u00b6 Lapo Luchini has been kind enough to create extensions for both Chrome and Firefox. You can find his repo for these extensions at: https://github.com/lapo-luchini/browser-pinry If you'd like to install either extension they are available at: https://chrome.google.com/webstore/detail/jmhdcnmfkglikfjafdmdikoonedgijpa/ https://addons.mozilla.org/it/firefox/addon/add-to-pinry/","title":"Extensions"},{"location":"extensions/#browser-extensions","text":"Lapo Luchini has been kind enough to create extensions for both Chrome and Firefox. You can find his repo for these extensions at: https://github.com/lapo-luchini/browser-pinry If you'd like to install either extension they are available at: https://chrome.google.com/webstore/detail/jmhdcnmfkglikfjafdmdikoonedgijpa/ https://addons.mozilla.org/it/firefox/addon/add-to-pinry/","title":"Browser Extensions"},{"location":"install-with-docker/","text":"Pinry Docker \u00b6 A nice and easy way to get a Pinry instance up and running using docker. For help on getting started with docker see the official getting started guide at the end of this page. Get Image form DockerHub \u00b6 The image is here: getpinry/pinry , or you could simply pull the image from DockerHub's registry via docker pull getpinry/pinry Then use the command line like: # this should be an abs-path not relative path like \".\" export DATA_PATH =/ abs / path / to / your / data / directory sudo docker run - d = true - p = 80 : 80 \\ - v =$ { DATA_PATH }: / data \\ getpinry / pinry Build Docker from Source \u00b6 Running this will get the latest version of pinry itself git clone https://github.com/pinry/pinry cd pinry/docker ./build_docker.sh Now you can start your container by command like this # this is where your database , local_settings and pins located mkdir data # use absolute path for docker to avoid using default data - volume ( we use directory instead ) . / start_docker . sh ` readlink - f data ` Also, if you want to use a \"named volume\" instead, you can do this: docker volume create pinry docker run -d=true -p=80:80 \\ -v pinry:/data \\ getpinry/pinry Please visit http://your-ip to visit your instance and register a new account, enjoy it. Configuring docker-pinry \u00b6 All the configuration files will be created in your data folder you mounted to docker (mounted as /data ). If you use docker's data volume, please find the way to edit files via docker exec and any way like here . Enable signups for new users \u00b6 Please edit /data/local_settings.py in docker and remove the container then restart it. ALLOW_NEW_REGISTRATIONS = True Building docker-pinry again (with latest version) \u00b6 Running this will build you a docker image with the latest version of pinry git pull --rebase cd ./docker/ ./build_docker.sh Backup \u00b6 Just copy data folder's content to an safe place, enjoy :) Why include nginx and not just map to gunicorn directly? \u00b6 Because gunicorn/django can't serve static files very well and it is unwise to do so for security reasons. I built this so that people can have a full hosted solution in a container. If you have a host machine running nginx then of course there is no point to run nginx in the container as well, you can simply disable nginx, map gunicorn to a port and then set your host machine's nginx to display your media and static files since that directory is shared between the container and host. Why use sqlite3? \u00b6 Because it has a very low resource cost and most pinry websites are small personal ones. Why have a full on database for that? If you need more power than you can easily modify the data/local_settings.py to point to a stronger database solution ( e.g: PostgreSQL or MySQL ) . Links \u00b6 official getting started guide additional pinry configuration settings","title":"Install with Docker"},{"location":"install-with-docker/#pinry-docker","text":"A nice and easy way to get a Pinry instance up and running using docker. For help on getting started with docker see the official getting started guide at the end of this page.","title":"Pinry Docker"},{"location":"install-with-docker/#get-image-form-dockerhub","text":"The image is here: getpinry/pinry , or you could simply pull the image from DockerHub's registry via docker pull getpinry/pinry Then use the command line like: # this should be an abs-path not relative path like \".\" export DATA_PATH =/ abs / path / to / your / data / directory sudo docker run - d = true - p = 80 : 80 \\ - v =$ { DATA_PATH }: / data \\ getpinry / pinry","title":"Get Image form DockerHub"},{"location":"install-with-docker/#build-docker-from-source","text":"Running this will get the latest version of pinry itself git clone https://github.com/pinry/pinry cd pinry/docker ./build_docker.sh Now you can start your container by command like this # this is where your database , local_settings and pins located mkdir data # use absolute path for docker to avoid using default data - volume ( we use directory instead ) . / start_docker . sh ` readlink - f data ` Also, if you want to use a \"named volume\" instead, you can do this: docker volume create pinry docker run -d=true -p=80:80 \\ -v pinry:/data \\ getpinry/pinry Please visit http://your-ip to visit your instance and register a new account, enjoy it.","title":"Build Docker from Source"},{"location":"install-with-docker/#configuring-docker-pinry","text":"All the configuration files will be created in your data folder you mounted to docker (mounted as /data ). If you use docker's data volume, please find the way to edit files via docker exec and any way like here .","title":"Configuring docker-pinry"},{"location":"install-with-docker/#enable-signups-for-new-users","text":"Please edit /data/local_settings.py in docker and remove the container then restart it. ALLOW_NEW_REGISTRATIONS = True","title":"Enable signups for new users"},{"location":"install-with-docker/#building-docker-pinry-again-with-latest-version","text":"Running this will build you a docker image with the latest version of pinry git pull --rebase cd ./docker/ ./build_docker.sh","title":"Building docker-pinry again (with latest version)"},{"location":"install-with-docker/#backup","text":"Just copy data folder's content to an safe place, enjoy :)","title":"Backup"},{"location":"install-with-docker/#why-include-nginx-and-not-just-map-to-gunicorn-directly","text":"Because gunicorn/django can't serve static files very well and it is unwise to do so for security reasons. I built this so that people can have a full hosted solution in a container. If you have a host machine running nginx then of course there is no point to run nginx in the container as well, you can simply disable nginx, map gunicorn to a port and then set your host machine's nginx to display your media and static files since that directory is shared between the container and host.","title":"Why include nginx and not just map to gunicorn directly?"},{"location":"install-with-docker/#why-use-sqlite3","text":"Because it has a very low resource cost and most pinry websites are small personal ones. Why have a full on database for that? If you need more power than you can easily modify the data/local_settings.py to point to a stronger database solution ( e.g: PostgreSQL or MySQL ) .","title":"Why use sqlite3?"},{"location":"install-with-docker/#links","text":"official getting started guide additional pinry configuration settings","title":"Links"},{"location":"license/","text":"License \u00b6 The BSD 2-Clause License \u00b6 Copyright (c) 2019 , Pinry's Contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","title":"License"},{"location":"license/#license","text":"","title":"License"},{"location":"license/#the-bsd-2-clause-license","text":"Copyright (c) 2019 , Pinry's Contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","title":"The BSD 2-Clause License"},{"location":"passwords/","text":"Updating Passwords \u00b6 Currently we don't have a good \"forgot my password\" method on Pinry since that generally requires an email to be sent. The current method for changing passwords involves: Create a new super user pipenv run python manage.py createsuperuser Login to your admin panel {your_website_url}/admin/ Go to the users section, select the user, change their password. Inside Docker \u00b6 If you use that command to create superuser inside docker , you could first exec to docker via command like docker exec -it bash and then use python manage.py createsuperuser --settings=pinry.settings.docker","title":"Passwords"},{"location":"passwords/#updating-passwords","text":"Currently we don't have a good \"forgot my password\" method on Pinry since that generally requires an email to be sent. The current method for changing passwords involves: Create a new super user pipenv run python manage.py createsuperuser Login to your admin panel {your_website_url}/admin/ Go to the users section, select the user, change their password.","title":"Updating Passwords"},{"location":"passwords/#inside-docker","text":"If you use that command to create superuser inside docker , you could first exec to docker via command like docker exec -it bash and then use python manage.py createsuperuser --settings=pinry.settings.docker","title":"Inside Docker"},{"location":"plugin-system/","text":"New plugin system for Pinry \u00b6 New plugin system is under development and a naive version has been released. A PinryPlugin is a python class or object which is callable. The plugin loader will call the Plugin target only once and use the plugin instance after specified events triggered just like the way django-middleware works. You could create a plugin as python-package with content below: from core.models import Image from django_images.models import Thumbnail class Plugin : def __init__ ( self ): # do something you want, just be called only once pass def process_image_pre_creation ( self , django_settings , image_instance : Image ): pass def process_thumbnail_pre_creation ( self , django_settings , thumbnail_instance : Thumbnail ): pass You could make some changes on Image object and Thumbnail object before they actually be saved (for example, add water-mark to them). You could access example plugin via pinry_plugins/batteries/plugin_example.py . After all, enable the plugin in local_settings.py: ENABLED_PLUGINS = [ 'pinry_plugins.batteries.plugin_example.Plugin', ] Now the plugin will work like a charm! List of Available Plugins \u00b6 left blank to fill, coming soon... Install Plugin in Docker \u00b6 If you have a plugin named hello.py and it have a Plugin class inside. You could just copy it to directory pinry_plugins/batteries . Now add config to local_settings.py ENABLED_PLUGINS = [ 'pinry_plugins.batteries.hello.Plugin', ] Then, rebuild your docker image, the plugin will work if no further python dependencies required.","title":"Plugin System"},{"location":"plugin-system/#new-plugin-system-for-pinry","text":"New plugin system is under development and a naive version has been released. A PinryPlugin is a python class or object which is callable. The plugin loader will call the Plugin target only once and use the plugin instance after specified events triggered just like the way django-middleware works. You could create a plugin as python-package with content below: from core.models import Image from django_images.models import Thumbnail class Plugin : def __init__ ( self ): # do something you want, just be called only once pass def process_image_pre_creation ( self , django_settings , image_instance : Image ): pass def process_thumbnail_pre_creation ( self , django_settings , thumbnail_instance : Thumbnail ): pass You could make some changes on Image object and Thumbnail object before they actually be saved (for example, add water-mark to them). You could access example plugin via pinry_plugins/batteries/plugin_example.py . After all, enable the plugin in local_settings.py: ENABLED_PLUGINS = [ 'pinry_plugins.batteries.plugin_example.Plugin', ] Now the plugin will work like a charm!","title":"New plugin system for Pinry"},{"location":"plugin-system/#list-of-available-plugins","text":"left blank to fill, coming soon...","title":"List of Available Plugins"},{"location":"plugin-system/#install-plugin-in-docker","text":"If you have a plugin named hello.py and it have a Plugin class inside. You could just copy it to directory pinry_plugins/batteries . Now add config to local_settings.py ENABLED_PLUGINS = [ 'pinry_plugins.batteries.hello.Plugin', ] Then, rebuild your docker image, the plugin will work if no further python dependencies required.","title":"Install Plugin in Docker"},{"location":"screenshots/","text":"Screenshots \u00b6 Due to the constant design iterations this is a very incomplete page. There will be more screenshots in the future. You could always try our demo that we mention on the first page of the docs. Home \u00b6 Boards \u00b6 Pins \u00b6 Create Pin \u00b6 Pin large-view \u00b6 Search/Filter \u00b6","title":"Screenshots"},{"location":"screenshots/#screenshots","text":"Due to the constant design iterations this is a very incomplete page. There will be more screenshots in the future. You could always try our demo that we mention on the first page of the docs.","title":"Screenshots"},{"location":"screenshots/#home","text":"","title":"Home"},{"location":"screenshots/#boards","text":"","title":"Boards"},{"location":"screenshots/#pins","text":"","title":"Pins"},{"location":"screenshots/#create-pin","text":"","title":"Create Pin"},{"location":"screenshots/#pin-large-view","text":"","title":"Pin large-view"},{"location":"screenshots/#searchfilter","text":"","title":"Search/Filter"},{"location":"theories/","text":"Theories \u00b6 Our general thought process for why we have implemented features the way we have. Boards & Tags \u00b6 Boards are for overall themes and tags are for specification. An example of this is \"Cars\" and \"Car Types\". A board could be \"Cars\" and then some tags on a pin in that board would be \"Mustang\", \"Sports Car\", \"Sedan\", etc. You would also like to share pins via \"board\" (designed only for a single user) instead of \"tag\" which designed for all users.","title":"Theories"},{"location":"theories/#theories","text":"Our general thought process for why we have implemented features the way we have.","title":"Theories"},{"location":"theories/#boards-tags","text":"Boards are for overall themes and tags are for specification. An example of this is \"Cars\" and \"Car Types\". A board could be \"Cars\" and then some tags on a pin in that board would be \"Mustang\", \"Sports Car\", \"Sedan\", etc. You would also like to share pins via \"board\" (designed only for a single user) instead of \"tag\" which designed for all users.","title":"Boards & Tags"},{"location":"upgrade-guide/","text":"Upgrade Guide \u00b6 This doc is about how you should do to upgrade specified version to next version. Generally, you should have no extra action to take if you use our docker version if we haven't written notes for it. If you meet some errors which include no such table , please have a try to run migrations in docker: # out of docker docker exec - it < your - container - id > bash # in docker python manage . py migrate How to get the current version with source code: git tag The first line of output is our latest version of code. v2.1.6 -> v2.1.7 \u00b6 v2.1.6 has a security issue which may cause unauthorized token-read. If you upgrade your instance from v2.1.6 to v2.1.7, you could go into docker and run following command to reset tokens. python manage.py users_reset_tokens v2.0.2 -> v2.1.0 \u00b6 Main breaking changes: Upgrade django 1 to django 2.2 LTS How to: If you use non-docker version, you should change your web-server config to add a new alias for media file path (where to store images). Please add following config to your nginx config in server block: location /media { alias /path/to/static/media; expires max; access_log off; }","title":"Upgrade Guide"},{"location":"upgrade-guide/#upgrade-guide","text":"This doc is about how you should do to upgrade specified version to next version. Generally, you should have no extra action to take if you use our docker version if we haven't written notes for it. If you meet some errors which include no such table , please have a try to run migrations in docker: # out of docker docker exec - it < your - container - id > bash # in docker python manage . py migrate How to get the current version with source code: git tag The first line of output is our latest version of code.","title":"Upgrade Guide"},{"location":"upgrade-guide/#v216-v217","text":"v2.1.6 has a security issue which may cause unauthorized token-read. If you upgrade your instance from v2.1.6 to v2.1.7, you could go into docker and run following command to reset tokens. python manage.py users_reset_tokens","title":"v2.1.6 -> v2.1.7"},{"location":"upgrade-guide/#v202-v210","text":"Main breaking changes: Upgrade django 1 to django 2.2 LTS How to: If you use non-docker version, you should change your web-server config to add a new alias for media file path (where to store images). Please add following config to your nginx config in server block: location /media { alias /path/to/static/media; expires max; access_log off; }","title":"v2.0.2 -> v2.1.0"}]} \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index fe00b45..4de62ab 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,73 +1,59 @@ - - - https://docs.getpinry.com/ - 2022-04-12 - daily - - - https://docs.getpinry.com/api/ - 2022-04-12 - daily - - - https://docs.getpinry.com/assets/ - 2022-04-12 - daily - - - https://docs.getpinry.com/contributing/ - 2022-04-12 - daily - - - https://docs.getpinry.com/development/ - 2022-04-12 - daily - - - https://docs.getpinry.com/docs/ - 2022-04-12 - daily - - - https://docs.getpinry.com/extensions/ - 2022-04-12 - daily - - - https://docs.getpinry.com/install-with-docker/ - 2022-04-12 - daily - - - https://docs.getpinry.com/license/ - 2022-04-12 - daily - - - https://docs.getpinry.com/passwords/ - 2022-04-12 - daily - - - https://docs.getpinry.com/plugin-system/ - 2022-04-12 - daily - - - https://docs.getpinry.com/screenshots/ - 2022-04-12 - daily - - - https://docs.getpinry.com/theories/ - 2022-04-12 - daily - - - https://docs.getpinry.com/upgrade-guide/ - 2022-04-12 - daily + + https://docs.getpinry.com/ + 2022-04-14 + daily + + https://docs.getpinry.com/screenshots/ + 2022-04-14 + daily + + https://docs.getpinry.com/extensions/ + 2022-04-14 + daily + + https://docs.getpinry.com/theories/ + 2022-04-14 + daily + + https://docs.getpinry.com/install-with-docker/ + 2022-04-14 + daily + + https://docs.getpinry.com/development/ + 2022-04-14 + daily + + https://docs.getpinry.com/api/ + 2022-04-14 + daily + + https://docs.getpinry.com/plugin-system/ + 2022-04-14 + daily + + https://docs.getpinry.com/upgrade-guide/ + 2022-04-14 + daily + + https://docs.getpinry.com/docs/ + 2022-04-14 + daily + + https://docs.getpinry.com/passwords/ + 2022-04-14 + daily + + https://docs.getpinry.com/assets/ + 2022-04-14 + daily + + https://docs.getpinry.com/contributing/ + 2022-04-14 + daily + + https://docs.getpinry.com/license/ + 2022-04-14 + daily \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index d871544c3c8570c13823170958704caab3d24573..0f15c3e6e7af707ae3d09d9cedc49d10b2b5d253 100644 GIT binary patch delta 301 zcmV+|0n+}$0>A^C#DEscYRa>swHQO3}G-^wxl5L}*&H*P3`PP{@%TaFeAFF>Ro}*Pm zKMbNji2b32AKJrWCLJ7nW;iRW(ceb-OSyYSxn2Hu0x}sO&=i>}pn)qFm{OP;V0eO< z5o$oeK&-tNEAk{t_zQ9cR2DAaW11mw1vENg1r*6I4uhZ@m4;9O&yrl$7KB^SLJfbW zC^eKx6Rk1Z8dwSnRMCA+44fVDW8pFiE5Pw+$}sr9PrJKsT0ZABzYGl?GLj2OfXzuuW-t+Y@XLz`!Hc2vAI#=I!US)zs@Q6TSfU zFY6NqyFXqgSDhgd27jpcO_`9SjSlx_1;54(zOOK{s=t#?5WTNdIpCTMCbELt1&pGo; zDv{5?8C-}H_*^6&drIVjO9sC+iz4aJQ&!H21@kC4{0*r@Ooy5;5lTdh+) - + @@ -284,7 +284,7 @@

  • - Boards & Tags + Boards & Tags
  • @@ -473,7 +473,7 @@
  • - Boards & Tags + Boards & Tags
  • diff --git a/upgrade-guide/index.html b/upgrade-guide/index.html index a7fa7ac..632dcf3 100644 --- a/upgrade-guide/index.html +++ b/upgrade-guide/index.html @@ -16,7 +16,7 @@ - + @@ -455,12 +455,28 @@

    This doc is about how you should do to upgrade specified version to next version.

    Generally, you should have no extra action to take if you use our docker version if we haven't written notes for it.

    -

    How to get the current version:

    -
    git tag
    -
    +

    If you meet some errors which include no such table, please have a try to run migrations in docker:

    +
    # out of docker
    +docker exec -it <your-container-id> bash
    +# in docker
    +python manage.py migrate 
    +
    + + +

    How to get the current version with source code:

    +
    git tag
    +

    The first line of output is our latest version of code.

    +

    v2.1.6 -> v2.1.7

    +

    v2.1.6 has a security issue which may cause unauthorized token-read. +If you upgrade your instance from v2.1.6 to v2.1.7, you could go into +docker and run following command to reset tokens.

    +
    python manage.py users_reset_tokens
    +
    + +

    v2.0.2 -> v2.1.0

    Main breaking changes: