Created pydev project, further cleanup, gitignored db.
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
cryptopad.db
|
||||
17
.project
Normal file
17
.project
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>cryptopad</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.python.pydev.PyDevBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.python.pydev.pythonNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
10
.pydevproject
Normal file
10
.pydevproject
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?eclipse-pydev version="1.0"?>
|
||||
|
||||
<pydev_project>
|
||||
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
|
||||
<path>/cryptopad</path>
|
||||
</pydev_pathproperty>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">python2</pydev_property>
|
||||
</pydev_project>
|
||||
@@ -1,10 +1,9 @@
|
||||
#!/usr/bin/python2
|
||||
from bottle import get, post, request, run, route, static_file, default_app
|
||||
import json
|
||||
import anydbm as dbm
|
||||
import os
|
||||
import anydbm
|
||||
|
||||
data = dbm.open("cryptopad.db", 'c');
|
||||
data = anydbm.open("cryptopad.db", 'c');
|
||||
|
||||
@get("/storage/<key>")
|
||||
def getItem(key):
|
||||
@@ -19,7 +18,7 @@ def delete(key):
|
||||
del data[key]
|
||||
|
||||
@post("/storage/<key>")
|
||||
def set(key):
|
||||
def setItem(key):
|
||||
data[key] = request.forms.get("value")
|
||||
|
||||
@get("/<filepath:path>")
|
||||
|
||||
Reference in New Issue
Block a user