Skip to content

ICS-Izmir/News-Website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ICS News Website

Live Website

| |



Disclaimer: Website is still in development.


ICS News Website,
Written with HTML 5, CSS 3, Bootstrap 5, and Python Flask.

How to run localy :

  1. Install the dependencies that are listed in the requirements.txt file.

  2. 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

  3. In the config.py file, change AppConfig(ProductionConfig) to AppConfig(LocalConfig)

  4. In the config.py file, change ANALYTICS_TAG_ID to your own Google Analytics G- ID. *2

  5. In the config.py file, change ANALYTICS_PROPERTY_ID to your own Google Analytics property ID.

  6. Put your Google Service Account credentials JSON file in a folder called secrets. Create this folder in the same directory as the app.py file. (Rename the file to ga_creds.json) *3

  7. Create a vars.env file in the secrets 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"

  8. Run the application with: python app.py

  9. 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.

Support :

If you think that you have found a bug please report it here.

Credits :

Role Name
Lead Developer Samyar Sadat Akhavi


Copyright © 2023-2024 Samyar Sadat Akhavi.