Sergio Berlotto avatar Sergio Berlotto committed 8e73421

Adicao do conf.py.sample e INSTALL.md

Comments (0)

Files changed (3)

+Para utilizar o virtualenv:
+
+$ virtualenv --no-site-packages env 
+
+Se quiser apontar o virtualenv para um binário do python específico, utilize o parâmetro '-p'
+
+$ virtualenv --no-site-packages env -p /usr/bin/python2
+
+Ative o virtualenv
+
+$ surce env/bin/activate
+
+Agora instale os pre-requisitos:
+
+$ pip install flask
+$ pip install flask-uploads
+$ pip install flask-login
+
+Então edite o arquivo 'user_list.py' , edite a tupla USUARIOS conforme existe no exemplo, e edite/insira os usuarios e suas senhas de acesso.
+
+Agora renomeie o arquivo conf.py.example para conf.py e edite-o com suas configuracoes desejadas, ou então deixe sem e use as configs padrão.
+
+E para executar:
+$ python upvideos.py
+
+# -*- coding: utf-8 -*-
+
+UPLOADED_FILES_DEST = '/home/berlotto/Desenvolvimento/upvideos_git/uploads/'
+
+UPLOADED_FILES_ALLOW = set(['ogg', 'ogv', 'webm', 'mp4'])
+UPLOADED_FILES_DENY = ''
+APP_PORT = 5000
+APP_HOST = "0.0.0.0"
+APP_URL = 'localhost:5000'
+
+#pode utilizar o script "gen_key.py"
+SECRET_KEY = "C+od7WQSc4ttTR1bIpWq4Sx1NHEsnKgBm+FD1kF/VB8="
+import hmac
+import hashlib
+import base64
+dig = hmac.new(b'1234567890', msg='abcdefghijklmnopqrstuvxwyz', digestmod=hashlib.sha256).digest()
+print (base64.b64encode(dig).decode())      # py3k-mode
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.