Commit 7c56f871 authored by Mindiell's avatar Mindiell
Browse files

website url is a parameter now

parent 0db7337e
......@@ -5,3 +5,5 @@ HOST = '127.0.0.1'
FLASK_PORT = 8080
NETCAT_PORT = 5000
SECRET_KEY = 'choose a secret key'
WEBSITE = 'http://localhost:8080/'
......@@ -7,6 +7,8 @@ from pygments.formatters import HtmlFormatter
from pygments.lexers import guess_lexer, TextLexer
import time
import config
class Vlozit():
def get_template(self, filename):
return (os.path.sep).join(("pastes",filename[0:2],filename[2:4],filename[4:6],filename))
......@@ -29,8 +31,7 @@ class Vlozit():
# Create path if not yet existing
os.makedirs(os.path.dirname(path))
# Format url to return
url = "https://vloz.it/p?%s" % filename
url = "http://localhost:8080/p?%s" % filename
url = "%sp?%s" % (config.WEBSITE, filename)
# Guessing which lexer to use
try:
lexer = guess_lexer(data)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment