Skip to content

Commit 0ba03ee

Browse files
committed
add real time update support
v1.0
1 parent e2c92a1 commit 0ba03ee

33 files changed

+523
-54
lines changed

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/flask-simple-form.iml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/libraries/R_User_Library.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
# Flask Simple From
2-
This is a simple flask register-form application designed to run in multiple ways:
1+
# flask-simple-form
2+
This is a simple flask register-form application designed to run in multiple ways
3+
4+
# Notes
5+
* This app use _[MongoDB](https://www.mongodb.com/)_ as database supported by _[Flask-MongoAlchemy](https://pythonhosted.org/Flask-MongoAlchemy/)_ extension
6+
=> So you have to install **MongoDB** database to run this locally
7+
8+
* uses _[Flask-SocketIO](https://github.com/miguelgrinberg/Flask-SocketIO)_ along with _Ajax_ for real time update
9+
310

411
# Overview
512
![index](/img/index.png)
13+
![registered](/img/registered.png)
614

715
# Running this app
816

17+
918
This app is designed to run in different ways:
1019
1. As a standalone app running on your machine
1120

@@ -15,11 +24,13 @@ This app is designed to run in different ways:
1524
2. `git clone` the project then `cd` into the directory
1625
3. run `virtualenv -p /usr/bin/python3 venv`or `python -m venv venv` to create a virtual environment
1726
4. activate it using `source venv/bin/activate`
18-
5. `pip install -r requirements/dev.txt` to install the app libaries and it dependencies
27+
5. `pip install -r requirements/prod_local.txt.txt` to install the app libaries and it dependencies
28+
6. install MongoDB database `sudo apt-get install mongodb`
29+
7. check your database is installed and print its version using `mongo --version`
1930

2031
### running the app
2132

2233
* After installing, you need to set your application _environment variable_ by running `export FLASK_APP=app.py`
23-
* run the server using `flask run --reload --debugger`
24-
* Access the running app in a browser at the URL written to the console (most likely http://localhost:5000)
34+
* run the server using the script file `run.sh` by typing `./run`
35+
* Access the running app in a browser at the URL written to the console (most likely http://0.0.0.0:5000)
2536

app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from app import app
2+
from app.views import socketio
23

34

45
if __name__ == '__main__':
5-
app.run(debug=True)
6+
socketio.run(app)

app/REAMDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
## This folder _contains the application files_

0 commit comments

Comments
 (0)