Features added:
Users have an editable user profile, with a join date and an about field
Application searches ticketmaster for upcoming concerts in Minnesota and loads the database with venues, artists, and shows, each day
Users are able to add notes about shows which can be in the notes page
You can add photos to a note
To run the program follow these steps:
a. Create a virtual environment
b. Activate the virtual environment
c. Go to the directory that have the requirements.txt file
d. Use "pip install -r requirements.txt" to install all packages that are being used for the project.
e. in Postgres cammand line
CREATE DATABASE lmnop;
CREATE USER lmnop WITH PASSWORD 'lmnop';
ALTER USER lmnop WITH SUPERUSER;
ALTER USER lmnop WITH CREATEDB; (for testing, so the user can create and delete test database)
f. Run python manage.py run server to see if the server is working.
If you get a Pillow not installed error, we found that if you uninstall Python, and reinstall it, the error goes away.
Screenshots
homepage
userprofile
venue list
Artist list
Artist notes
notes list
Pagination
Set admin password, remember it.
Start postgres running
su postgres
if on a mac/linux
pg_ctl start
enter username and password
start postgres shell with psql
And create a user called lmnop
create user lmnop with password 'password_here';
create a database lmnop
create database owner lmnop;
Various postgres shell commands connect to lmnop database
\c lmnop
\dt
shows tables
\d table_name
shows info (and constraints) for a table
other sql as expected
postgres shell command cheatsheet - https://gist.github.com/Kartones/dd3ff5ec5ea238d4c546
set environment variable called POSTGRES_LMNOP_USER_PASSWORD with a value of the lmnop user's password
(Mac users may need to run these commands; these one time
sudo ln -s /Library/PosgreSQL/9.5/lib/libssl.1.0.0.dylib /usr/local/lib sudo ln -s /Library/PosgreSQL/9.5/lib/libcrypto.1.0.0.dylib /usr/local/lib
And this when you start a new shell; or set it permanently in .bash_profile
export DYLD_FALLBACK_LIBRARY_PATH=/Library/PostgreSQL/9.5/lib:$DYLD_LIBRARY_PATH
)
Create and activate a virtual environment. Use Python3 as the interpreter.
pip install -r requirements.txt and pip install social-auth-app-django if the requirements doesn't do it
cd LMNOP/LMNOPSite
python manage.py makemigrations lmn
python manage.py migrate
python manage.py runserver
Site at
127.0.0.1:8000 and localhost:8000 to login with your facebook
from LMNOP/LMNOPSite
python manage.py createsuperuser
enter username and password
will be able to use these to log into admin console at
127.0.0.1:8000/admin
To run tests (some currently fail - see Issues)
python manage.py test lmn.tests
Or just some of the tests, python manage.py test lmn.tests.test_views python manage.py test lmn.tests.test_views.TestUserAuthentication python manage.py test lmn.tests.test_views.TestUserAuthentication.test_user_registration_logs_user_in
Install (upgrade to the latest version if you already have it) Firefox browser. It works best for automated functional testing with Selenium.
geckodriver needs to be in path or you need to tell Selenim where it is. Pick an approach: http://stackoverflow.com/questions/40208051/selenium-using-python-geckodriver-executable-needs-to-be-in-path
python manage.py runserver
python manage.py test lmn.tests.functional_tests
From directory with manage.py in it,
coverage run --source='.' manage.py test lmn.tests
coverage report
install django social media auth with: pip install social-auth-app-django
add login with social media was really helpful https://simpleisbetterthancomplex.com/tutorial/2016/10/24/how-to-add-social-login-to-django.html
To login in facebook for some reason it is not working on 127.0.0.1:8000, so you have to use localhost:8000