Live Website
|
|
ICS News Website,
Written with HTML 5, CSS 3, Bootstrap 5, and Python Flask.
-
Install the dependencies that are listed in the
requirements.txt
file. -
Add this to your
hosts
file *1:
127.0.0.1
icsizmir.ltw
127.0.0.1
www.icsizmir.ltw
127.0.0.1
blog.icsizmir.ltw
127.0.0.1
account.icsizmir.ltw
127.0.0.1
admin.icsizmir.ltw
127.0.0.1
api.icsizmir.ltw
-
In the
config.py
file, changeAppConfig(ProductionConfig)
toAppConfig(LocalConfig)
-
In the
config.py
file, changeANALYTICS_TAG_ID
to your own Google Analytics G- ID. *2 -
In the
config.py
file, changeANALYTICS_PROPERTY_ID
to your own Google Analytics property ID. -
Put your Google Service Account credentials JSON file in a folder called
secrets
. Create this folder in the same directory as theapp.py
file. (Rename the file toga_creds.json
) *3 -
Create a
vars.env
file in thesecrets
folder that you created and add these to it (change the values to your values) *4:
FLASK_SECRET_KEY = "A VERY SECRET STRING"
PASSWORD_ENCRYPT_SALT = "A VERY SECRET SALT"
MAILJET_API_KEY = "MAILJET API KEY"
MAILJET_API_SECRET = "MAILJET API SECRET"
-
Run the application with:
python app.py
-
Go to: http://icsizmir.ltw:5000/
*1: If you don't know how to modify your hosts file, take a look at this guide: https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/
*2: If you don't know how to get a Google Analytics tracking ID, take a look at this guide: https://support.google.com/analytics/answer/9304153?hl=en&ref_topic=9303319#zippy=%2Cfind-your-g--id-for-any-platform-that-accepts-a-g--id (NOTE: You will be creating the data stream for Web. In the 'Set up data collection' section, go down to 'Find your "G-" ID' then follow those steps and get your G- ID)
*3: To get this file, create a 'Google Cloud Platform' project, enable the 'Analytics Data API' in the project, go to the 'Credentials' section, create a 'Service Account' and finally go to the 'Keys' tab on your Service Account page then create and download a JSON key.
*4: To get the Mailjet credentials: Create a Mailjet account, go to 'Account Settings > API Key Management' then create an API key.
Note: Python 3.11 is recommended.
If you think that you have found a bug please report it here.
Role | Name |
---|---|
Lead Developer | Samyar Sadat Akhavi |
Copyright © 2023-2024 Samyar Sadat Akhavi.