A blogging platform for wannabe bloggers.
Site hosted (beta) at https://blogstate.pythonanywhere.com
Here's how.
It is assumed that you have
mysql-server
andmysql-client
configured. If not, install them bysudo apt install mysql-server mysql-client
and set a password in the prompt asked.
-
Clone the repo (or fork if you plan to contribute).
- To just test the site:
git clone https://github.com/roshnet/blogstate
- To enable contributions and send PRs:
git clone <url-of-fork>
- To just test the site:
-
Install
pipenv
if not already bypip install pipenv
. After installing it,cd
to the cloned repository, and runpipenv install
to install all dependencies. -
Now, the Python part is all set up. The database needs to be configured.
-
Copy all contents of
dbconfig/setup.sql
to clipboard. -
Run
sudo mysql -u root -p
and enter the MySQL password, which you entered during installation of MySQL Server ("root" is default, it may be something else on your machine). -
In the
mysql
console, paste what you copied fromsetup.sql
, and execute it. Things may become easier if there's a database manager tool, like phpMyAdmin or something. -
Now, the database is setup along with the required table(s).
-
Run
python app.py
to start the development server. -
Links maybe broken since it's under development. So, manually change the URL to whatever route you like. Refer to
app.py
for all routes, and manually change the URLs to navigate. For example, change the URL to127.0.0.1:5000/signup
to view the signup page.
- Follow step-1 from above (clone/fork).
cd
to your favourite directory, and runpython3 -m venv bs-env
.- Activate it by
source bs-venv/bin/activate
. You may use any other name thanbs-venv
, but the same name. - Run
pip install --upgrade pip
to, as expected, upgrade pip, and then install the dependencies by:
pip install flask flask-login flask-mysql
- Now
cd
to the clonedblogstate
directory, and runpython app.py
(ensure venv is activated). - The project can run only when the environment is activated. Or perhaps you have the dependencies globally installed.