New way to run pynyaata
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
a6d8ff2b01
commit
f7b81c0c3b
@ -23,7 +23,7 @@ After a good rewrite in Python, it's time to show it to the public, and here it
|
|||||||
- Clone this repository
|
- Clone this repository
|
||||||
- Launch a terminal and move into the root of the cloned repository
|
- Launch a terminal and move into the root of the cloned repository
|
||||||
- Run `pip install -r requirements.txt`
|
- Run `pip install -r requirements.txt`
|
||||||
- Run `python3 run.py`
|
- Run `python3 run.py` or simply `pynyaata`
|
||||||
- The app is accessible at http://localhost:5000
|
- The app is accessible at http://localhost:5000
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
@ -3,7 +3,7 @@ from operator import attrgetter, itemgetter
|
|||||||
|
|
||||||
from flask import redirect, render_template, request, url_for, abort
|
from flask import redirect, render_template, request, url_for, abort
|
||||||
|
|
||||||
from .config import app, auth, ADMIN_USERNAME, ADMIN_PASSWORD, MYSQL_ENABLED
|
from .config import app, auth, ADMIN_USERNAME, ADMIN_PASSWORD, MYSQL_ENABLED, APP_PORT, IS_DEBUG
|
||||||
from .connectors import *
|
from .connectors import *
|
||||||
from .connectors.core import ConnectorCore, ConnectorLang, ConnectorReturn
|
from .connectors.core import ConnectorCore, ConnectorLang, ConnectorReturn
|
||||||
from .forms import SearchForm, DeleteForm, EditForm
|
from .forms import SearchForm, DeleteForm, EditForm
|
||||||
@ -175,3 +175,7 @@ def admin_edit(link_id=None):
|
|||||||
link.vf = False
|
link.vf = False
|
||||||
|
|
||||||
return render_template('admin/edit.html', search_form=SearchForm(), link=link, folders=folders, action_form=form)
|
return render_template('admin/edit.html', search_form=SearchForm(), link=link, folders=folders, action_form=form)
|
||||||
|
|
||||||
|
|
||||||
|
def run():
|
||||||
|
app.run('0.0.0.0', APP_PORT, IS_DEBUG)
|
||||||
|
6
run.py
6
run.py
@ -1,3 +1,5 @@
|
|||||||
from pynyaata.config import app, APP_PORT, IS_DEBUG
|
#!/usr/bin/env python3
|
||||||
|
from pynyaata import run
|
||||||
|
|
||||||
app.run('0.0.0.0', APP_PORT, IS_DEBUG)
|
if __name__ == "__main__":
|
||||||
|
run()
|
||||||
|
3
setup.py
3
setup.py
@ -20,6 +20,9 @@ setup(
|
|||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
install_requires=requirements,
|
install_requires=requirements,
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
|
entry_points={
|
||||||
|
'console_scripts': ['pynyaata=pynyaata:run'],
|
||||||
|
},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Operating System :: OS Independent",
|
"Operating System :: OS Independent",
|
||||||
|
Reference in New Issue
Block a user