Skip to content

GSU-CS-Software-Engineering/2019-LMSLite

 
 

Repository files navigation

LMSLite

These instructions do not include how to install Pycharm or Python. These are for the purpose of getting the project running inside of Pycharm.

Setup...

Windows

Install/Setup Pycharm Professional Version
Install Python 3.6 or later
Restart computer
Launch Pycharm
Click "Check out from Version Control"
Choose "Git" from the drop-down list
Enter the GitHub URL and the Directory you wish the project to be stored
Click "Test" to make sure the connect is good, Proceed if Test passes
#Project should be open at this point
Go to File : Settings : "Project: LMSLite" : "Project Interpretor"
Click the gear icon and click "Add"
Under "Virtualenv Environment" choose "Existing environment"
Click the LOV and select your python.exe file
Click ok and ok again
Click the + button on the right side of the setting pane (you should still be in the Project Interpreter at this point)
Search "Django" and click "Install Package"
Wait for the package to completely install (Pycharm normally has a status bar toward the bottom of the application)
Exit Settings

Click "Edit Configurations" in the toolbar
Click the + button and choose Django server
Enable Run browser
Add the following Environment Variables ; Name: "DJANGO_SETTINGS_MODULE" Value: "LMSLite.settings"
Choose the Python Interpretor you created earlier
Click Apply and OK
#Project is now set up

Google Cloud Setup

- Use this link as a reference for creating google cloud storage buckets and starting your google cloud project.

After installing the reqirements.txt file using pip use this link to guide you for creating the credentails .json file. After, in pycharm cretae an enviornment variable named GOOGLE_APPLICATION_CREDENTIALS="[PATH]" where path is the path to the .json in the project.
After add these line to the settings.py file

DEFAULT_FILE_STORAGE = 'storages.backends.gcloud.GoogleCloudStorage'
GS_BUCKET_NAME = '[YOUR-BUCKET-NAME]'

GS_CREDENTIALS = service_account.Credentials.from_service_account_file(
    '[PATH].json')

Once done the project default storage should now be set to your google cloud bucket you can check using

from django.core.files.storage import default_storage
print default_storage.__class__

>>> <class 'storages.backends.gcloud.GoogleCloudStorage'>

Database Setup

- Use this link to begin the PostgreSQL database setup on AWS.

Once the databse instance is made change the security settings to public, and allow the IP's of machines expected to have access. Once done the databse instance can be used via minor edits to the settings.py file as such:

'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': '[YOUR-DATABASE-NAME]',
        'USER': '[DATABASE-USER]',
        'PASSWORD': '[DATABASE-PASSWORD]',
        'HOST': '[YOUR-HOST-NAME]#usually the 'endpoint' in AWS',
        'PORT': '[YOUR-PORT]',
    }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 92.3%
  • HTML 3.0%
  • JavaScript 2.6%
  • CSS 2.0%
  • Shell 0.1%