Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zain/navbar finaltouches #16

Open
wants to merge 135 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
135 commits
Select commit Hold shift + click to select a range
d2b9617
created login and register forms
georgead01 Jul 24, 2018
19c7ae9
first version of Journeys DB
aboud20-meet Jul 24, 2018
dc97b5c
Update README.md
sama18-meet Jul 24, 2018
cfe3549
Merge branch 'master' of https://github.com/zain18-meet/Roots
aboud20-meet Jul 24, 2018
1569cb1
edited views.py to include journey routing
aboud20-meet Jul 24, 2018
469f707
edited views.py to include journey routing
aboud20-meet Jul 24, 2018
43a2ce8
fix register
georgead01 Jul 24, 2018
f095301
fixed register
georgead01 Jul 24, 2018
cd8cc21
fixed register
georgead01 Jul 24, 2018
2c4b6d0
fixed a few typos
aboud20-meet Jul 24, 2018
d3a13bb
Merge branch 'master' of https://github.com/zain18-meet/Roots
aboud20-meet Jul 24, 2018
4c68d54
database models USER
aboud20-meet Jul 24, 2018
aeb1e6b
created HTML files for Profile/Browse
aboud20-meet Jul 25, 2018
719afc8
started register py
georgead01 Jul 25, 2018
1ef7088
started register
georgead01 Jul 25, 2018
ca4f9d5
created and in progress of apply.html
aboud20-meet Jul 25, 2018
49a700c
Merge branch 'master' of https://github.com/zain18-meet/Roots
aboud20-meet Jul 25, 2018
9b80263
connected form to DB
aboud20-meet Jul 25, 2018
b981310
created HTML files for Journey
aboud20-meet Jul 25, 2018
3b26dec
Merge branch 'master' of https://github.com/zain18-meet/Roots
aboud20-meet Jul 25, 2018
a96b887
finished register backend not tested
zainalqalawi Jul 25, 2018
80a8626
register backend finished not tested
zainalqalawi Jul 25, 2018
36cb884
register backend finished not tested
zainalqalawi Jul 25, 2018
f072b2d
vjhgv
aboud20-meet Jul 25, 2018
65217d8
everything I have up until now
aboud20-meet Jul 25, 2018
bb3cab4
sign up and in works
aboud20-meet Jul 25, 2018
ee004d8
Merge pull request #1 from zain18-meet/register-and-login
zainalqalawi Jul 25, 2018
61cd2b9
corrected login and register
aboud20-meet Jul 25, 2018
7b95912
finished front and back end for display journey
aboud20-meet Jul 25, 2018
76dcb3c
Did everything that has to do with the Journey table with Ade
aboud20-meet Jul 25, 2018
83cb546
Merge branch 'master' of https://github.com/zain18-meet/Roots
aboud20-meet Jul 25, 2018
301aa8f
finished front and back end for display journey
aboud20-meet Jul 25, 2018
3586310
solved merge conflict
aboud20-meet Jul 25, 2018
0a6756f
resolved conflict
aboud20-meet Jul 25, 2018
99d00b3
Merge pull request #2 from zain18-meet/journey_func
zainalqalawi Jul 25, 2018
6ba1bb4
worked on Browse and routing for it
aboud20-meet Jul 26, 2018
83e3241
Adds info submitted in the apply form to both User table and JOurney …
aboud20-meet Jul 26, 2018
043ec9e
Adds info submitted in the apply form to both User table and JOurney …
aboud20-meet Jul 26, 2018
0003818
profile page works
georgead01 Jul 26, 2018
3cfd402
Merge branch 'master' into browse_func_data
guy18-meet Jul 26, 2018
433c0a9
Merge pull request #3 from zain18-meet/browse_func_data
guy18-meet Jul 26, 2018
75e62b9
Merge branch 'master' into profile
guy18-meet Jul 26, 2018
1408d37
Merge pull request #4 from zain18-meet/profile
guy18-meet Jul 26, 2018
01c6e89
small fixes
georgead01 Jul 26, 2018
1c80838
register design
aboud20-meet Jul 26, 2018
482a529
Merge branch 'master' of github.com:zain18-meet/Roots into Register_l…
aboud20-meet Jul 26, 2018
66be71f
MVP
aboud20-meet Jul 26, 2018
0e9071b
Merge branch 'master' into MVP
sama18-meet Jul 26, 2018
d868916
Merge pull request #5 from zain18-meet/MVP
sama18-meet Jul 26, 2018
23e0054
design
aboud20-meet Jul 26, 2018
bfc98f1
Merge branch 'master' into Register_login_design
zainalqalawi Jul 26, 2018
3a8121f
Merge pull request #6 from zain18-meet/Register_login_design
zainalqalawi Jul 26, 2018
3966e5b
setting up heroku
aboud20-meet Jul 26, 2018
4638216
FINAL MVP
aboud20-meet Jul 26, 2018
d809923
Merge branch 'master' of https://github.com/zain18-meet/Roots
aboud20-meet Jul 26, 2018
da73c42
Fixed all bugs and errors. This is the official MVP (without the CSS).
aboud20-meet Jul 29, 2018
c875cb8
css and nav bar
aboud20-meet Jul 29, 2018
cf6d212
merge conflict
aboud20-meet Jul 29, 2018
1b027e3
add
aboud20-meet Jul 29, 2018
f7f87be
small changes in nav bar. committing for Ade
aboud20-meet Jul 30, 2018
140f596
small changes in nav bar. committing for Ade
aboud20-meet Jul 30, 2018
0b6ad7a
fixed major bugs and completed partial MVP
zainalqalawi Jul 30, 2018
036f517
Merge pull request #7 from zain18-meet/browse_func_data
zainalqalawi Jul 30, 2018
6e626a6
fixed more in navbar
aboud20-meet Jul 30, 2018
dbec378
MVP + Navbar
aboud20-meet Jul 30, 2018
82edfe3
Merge branch 'master' into Sama-Navbar
sama18-meet Jul 30, 2018
390ba30
fixed more bugs
aboud20-meet Jul 30, 2018
46349a0
add is user var
sama18-meet Jul 31, 2018
7903c44
Merge pull request #8 from zain18-meet/Sama-Navbar
sama18-meet Jul 31, 2018
49a0d80
Reviews & Ratings
sama18-meet Jul 31, 2018
e820065
Added Notifications system and span to navbar
sama18-meet Aug 1, 2018
4100cc1
refactor part of the views and templates
sama18-meet Aug 1, 2018
c5ea20a
MVP + REVIEWS + NOTIFICATIONS + WISHLIST + QUESTIONS
sama18-meet Aug 2, 2018
414848d
Merge pull request #9 from zain18-meet/Sky
sama18-meet Aug 3, 2018
399d540
lets do this
sama18-meet Aug 5, 2018
b9dd96b
i love u matt and i fixed this #baggute
sama18-meet Aug 5, 2018
05d3928
remove new browse function
sama18-meet Aug 5, 2018
a162bd7
remove user spacename
sama18-meet Aug 5, 2018
33b3e8d
Merge pull request #10 from zain18-meet/adi/routing-fix
sama18-meet Aug 5, 2018
328b75c
add register form to browse page
zainalqalawi Aug 5, 2018
5421437
cols are working browse
sama18-meet Aug 5, 2018
d59c134
add example modal
zainalqalawi Aug 5, 2018
0b71b19
modal basic
zainalqalawi Aug 5, 2018
4ff84aa
apply css
aboud20-meet Aug 5, 2018
29f6d35
working modals and routing
zainalqalawi Aug 6, 2018
91a1005
structured journey page
georgead01 Aug 6, 2018
e1c4d06
css for storyteller page
aboud20-meet Aug 6, 2018
1e39937
profile css progress
aboud20-meet Aug 6, 2018
6d9fe9e
profile layout fixed ratings
georgead01 Aug 6, 2018
dc4e397
Merge pull request #11 from zain18-meet/journey
guy18-meet Aug 6, 2018
0e6b19b
aplly css
aboud20-meet Aug 6, 2018
f9fc906
Merge branch 'master' of https://github.com/zain18-meet/Roots into Ma…
aboud20-meet Aug 6, 2018
cdb4089
deleted villa shit
zainalqalawi Aug 6, 2018
ecf945a
merge
zainalqalawi Aug 6, 2018
fb817f8
Merge pull request #12 from zain18-meet/Avigail/css_applypage
zainalqalawi Aug 6, 2018
1881dd8
nothing
aboud20-meet Aug 6, 2018
168850f
merge
aboud20-meet Aug 6, 2018
3121a68
navbar and login/reg
zainalqalawi Aug 6, 2018
67c6063
merge
zainalqalawi Aug 6, 2018
a8b6bfc
working
zainalqalawi Aug 6, 2018
84ba0c5
st_profile layout
aboud20-meet Aug 6, 2018
63b581a
revert css
aboud20-meet Aug 6, 2018
d4f37bf
fixed the style.css page
aboud20-meet Aug 6, 2018
efb0fa6
pull
zainalqalawi Aug 6, 2018
0875a98
Merge pull request #13 from zain18-meet/avigail/fix-style
guy18-meet Aug 6, 2018
397cd96
merge
zainalqalawi Aug 6, 2018
8b09e58
navbar
zainalqalawi Aug 6, 2018
f7e15c5
redirect to browse
georgead01 Aug 6, 2018
30c73c3
navbar
zainalqalawi Aug 6, 2018
4ae0ff3
Merge pull request #14 from zain18-meet/zain/modals-inputstyles
guy18-meet Aug 6, 2018
041cb44
browse css and design
sama18-meet Aug 6, 2018
e285bf7
merge
sama18-meet Aug 6, 2018
f1e6b2a
browse edits
sama18-meet Aug 6, 2018
1db2592
browse updated cards & view details button is done
sama18-meet Aug 6, 2018
903571e
new stuff with backend
sama18-meet Aug 6, 2018
af3fde0
finished layout for browse without the fonts
sama18-meet Aug 6, 2018
b0a1123
Merge pull request #15 from zain18-meet/adi/browse-layout
zainalqalawi Aug 6, 2018
799ea55
idkkkkkk
sama18-meet Aug 6, 2018
2fcd5ba
changed the font for the journeys container and add a picture for the…
sama18-meet Aug 6, 2018
4e2a8f9
nothing
sama18-meet Aug 6, 2018
a6c82cf
merged malak branch with the master
sama18-meet Aug 6, 2018
a382bea
add journey and profile
sama18-meet Aug 7, 2018
de2a358
fixed jpurney page
georgead01 Aug 7, 2018
3b4f51c
Merge pull request #17 from zain18-meet/guy/fixing-view-journey
malak18-meet Aug 7, 2018
daa2aeb
Merge branch 'master' of https://github.com/zain18-meet/Roots
sama18-meet Aug 7, 2018
a6a7739
small css change
sama18-meet Aug 7, 2018
85ef4b0
profile, apply, addjourney
aboud20-meet Aug 7, 2018
ee63850
Merge branch 'master' into Malak/profile_css
zainalqalawi Aug 7, 2018
f4f00a0
Merge pull request #18 from zain18-meet/Malak/profile_css
zainalqalawi Aug 7, 2018
f1532dd
small edits
aboud20-meet Aug 7, 2018
5f4395d
added the head of the show journey and fixed containers
aboud20-meet Aug 7, 2018
a8a291f
something not so important
aboud20-meet Aug 7, 2018
856a231
css
aboud20-meet Aug 7, 2018
7f928dd
final touches
aboud20-meet Aug 7, 2018
fa0bf4c
css
aboud20-meet Aug 8, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn project:app
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is a complete seed app project with: Flask, SQLAlchemy, Bootstrap, jQuery.
You will need to fork this repo and then start working on your own project.

//
### 1. Fork the repo

1. Select a person in your group responsible for git management
Expand Down
19 changes: 19 additions & 0 deletions bootstrap.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
<h1>My First Bootstrap Page</h1>
<p>This is some text.</p>
</div>

</body>
</html>
1 change: 0 additions & 1 deletion project/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def load_user(user_id):

app.register_blueprint(users_bp)


# General views
from . import views

Expand Down
5 changes: 3 additions & 2 deletions project/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@


class RegisterForm(Form):
username = StringField('Username', validators=[DataRequired(), Length(max=40)])
email = StringField('Email Address', validators=[DataRequired(), Length(max=40)])
name = StringField('Full Name', validators=[DataRequired(), Length(max=80)])
password = PasswordField('Password', validators=[DataRequired(), Length(max=40)])
confirm = PasswordField('Confirm Password', validators=[DataRequired(), EqualTo('password')])


class LoginForm(Form):
username = StringField('Username', validators=[DataRequired(), Length(max=40)])
email = StringField('Email Address', validators=[DataRequired(), Length(max=40)])
password = PasswordField('Password', validators=[DataRequired(), Length(max=40)])

164 changes: 153 additions & 11 deletions project/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from project import db

from flask import request, redirect, Flask, render_template
from flask_sqlalchemy import SQLAlchemy
from flask_login import UserMixin
from werkzeug.security import check_password_hash, generate_password_hash

Expand All @@ -8,13 +10,33 @@ class User(UserMixin, db.Model):

__tablename__ = "users"

id = db.Column(db.Integer, primary_key=True, autoincrement=True)
username = db.Column(db.String, unique=True, nullable=False)
password_hash = db.Column(db.String, nullable=False)
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
email = db.Column(db.String, unique=True, nullable=False)
password_hash = db.Column(db.String, nullable=False)
name = db.Column(db.String, nullable=False)
is_storyteller = db.Column(db.Boolean, nullable=False)
birthday = db.Column(db.String, nullable=True)
country = db.Column(db.String, nullable=True)
profession = db.Column(db.String, nullable=True)
city = db.Column(db.String, nullable=True)
number = db.Column(db.String, nullable=True)
bio = db.Column(db.String, nullable=True)
about = db.Column(db.String, nullable=True)
profile_img = db.Column(db.String, nullable=True)
reason = db.Column(db.String, nullable=True)

def __init__(self, username, password):
self.username = username
def __init__(self, email,name,password, birthday='', country='', is_storyteller='',profession='', city='', number='', bio='', about=''):
self.email = email
self.set_password(password)
self.name = name
self.birthday = birthday
self.country = country
self.is_storyteller = is_storyteller
self.profession = profession
self.city = city
self.number = number
self.bio = bio
self.about = about

def set_password(self, password):
self.password_hash = generate_password_hash(password)
Expand All @@ -23,14 +45,134 @@ def check_password(self, password):
return check_password_hash(self.password_hash, password)

def __repr__(self):
return 'User %d %s' % (self.id, self.username)
return 'User %d %s' % (self.id, self.email)

class Journey(UserMixin, db.Model):

# TODO: Create your other models here
class YourModel(db.Model):

__tablename__ = "yourmodel"
__tablename__ = "journey"


id = db.Column(db.Integer, primary_key=True, autoincrement=True)
creator_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False)
title = db.Column(db.String, nullable=False)
description = db.Column(db.String, nullable=False)
location = db.Column(db.String, nullable=False)
duration = db.Column(db.String, nullable=False)
category = db.Column(db.String, nullable=False)
requirements = db.Column(db.String, nullable=False)
people_range = db.Column(db.String, nullable=False)
price = db.Column(db.String, nullable=False)
picture = db.Column(db.String, nullable=False)


def __init__(self, creator_id='', title='', description='', location='', duration='', category='', requirements='', people_range='', picture='', price=''):
self.creator_id = creator_id
self.title = title
self.description = description
self.location = location
self.duration = duration
self.category = category
self.requirements = requirements
self.people_range = people_range
self.picture = picture
self.price = price


def __repr__(self):
return 'Journey %d %s' % (self.id, self.title)



class Ratings(UserMixin, db.Model):
__tablename__ = "ratings"
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
journey_id = db.Column(db.Integer, db.ForeignKey('journey.id'), nullable=False)
user = db.Column(db.String(30), nullable= False)
stars = db.Column(db.Integer, nullable = False)
title = db.Column(db.String(30), nullable= False)
review = db.Column(db.String(30), nullable= False)
time = db.Column(db.String(80), nullable = False)
journey = db.relationship(Journey)

def __init__(self, journey_id='', user='', stars='', title='', review=''):
self.journey_id =journey_id
self.user = user
self.stars = stars
self.title = title
self.review = review
############# I DIDN'T DO SELF TIME BUT IT WORKED SO I JUST LEFT IT #####################

def __repr__(self):
return 'Ratings %r %s %r %s %r %s' % (self.id, self.title, self.journey_id, self.user, self.stars ,self.review)


class Notification(db.Model):
__tablename__ = "notification"
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
st_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False)
interested_user_id = db.Column(db.Integer, db.ForeignKey('users.id') ,nullable=False)
journey_id = db.Column(db.Integer, db.ForeignKey('journey.id'), nullable=False)

st = db.relationship("User", foreign_keys="Notification.st_id")
user = db.relationship("User", foreign_keys="Notification.interested_user_id")
journey = db.relationship("Journey", foreign_keys="Notification.journey_id")

interested_user_name = db.Column(db.String(30), nullable= False)
journey_title = db.Column(db.String(30), nullable= False)
time = db.Column(db.String(80), nullable = False)


def __init__(self, st_id='', journey_id='', interested_user_id='', interested_user_name='', journey_title='', time=''):
self.st_id = st_id
self.journey_id = journey_id
self.interested_user_id = interested_user_id
self.interested_user_name = interested_user_name
self.journey_title = journey_title
self.time = time

def __repr__(self):
return 'Notification %r %r %r %r' % (self.id, self.st_id, self.journey_id, self.interested_user_id)


class Wishlist(db.Model):
__tablename__ = "wishlist"
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
user_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False)
journey_id = db.Column(db.Integer, db.ForeignKey('journey.id'), nullable=False)
journey_title = db.Column(db.String(30), nullable= False)

def __init__(self, user_id='', journey_id='', journey_title=''):
self.user_id = user_id
self.journey_id = journey_id
self.journey_title = journey_title

def __repr__(self):
return 'Wishlist %r %r' % (self.id, self.user_id, self.journey_id)


class Question(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
journey_id = db.Column(db.Integer, db.ForeignKey('journey.id'), nullable=False)
user_id = db.Column(db.Integer, db.ForeignKey('users.id'), nullable=False)
title = db.Column(db.String(30), nullable = False)
question = db.Column(db.String(80), nullable = False)
time = db.Column(db.String(80), nullable = False)
# reply = db.relationship('Reply', backref='question')

def __init__(self, journey_id='',user_id='', title='', question='', time=''):
self.journey_id = user_id
self.user_id = user_id
self.title = title
self.question = question
self.time = time


def __repr__(self):
return '<Question %r>' % self.title




# db.drop_all()
# db.create_all()

# fill in the rest of your fields and methods!
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added project/static/css/boat.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added project/static/css/image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added project/static/css/loginn.css
Empty file.
Binary file added project/static/css/profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading