Delorean Traveler is an app based on Airbnb website that allows users to reserve the Delorean to travel to movie destinations in time. Users can also leave reviews on locations they have visited and have many locations to choose from. DeLorean Traveler was created with a Python and Flask/SQLAlchemy backend that interacts with a PostgreSQL database and a React/Redux frontend.
** A live link to the website can be found here: https://solo-project-bttf.herokuapp.com/ **
- Sign up with user name, first name, last name, email, password, and profile image (png, jpg, jpeg files only)
- Log in with email and password
- Explore all the movie locations with movie details and traveling details
- Post your review on a location and if you decide you can change your review or delete it
- Reserve the DeLorean to travel to a movie location in time and edit or delete your reservation
- User can follow featured locations that is randomly selected for users view.
- Search Bar to find certain locations
- Users can create a location for other users to visit
- Total price and days will show on user's reservation profile
- Flask
- Python
- PostgresSQL
- SQLAlchemy
- WTForms
- React
- Node.js
- React
- Redux
- JavaScript
- Pure CSS
- HTML5
- Heroku
@review_route.route('/', methods=['POST'])
def postReview():
form = ReviewForm()
form['csrf_token'].data = request.cookies['csrf_token']
if form.validate_on_submit():
data = form.data
new_review = Review(userId=data['userId'],
locationId=data['locationId'],
review=data['review'])
db.session.add(new_review)
db.session.commit()
return new_review.to_dict()
return {'errors': validation_errors(form.errors)}, 401
export const createReviewThunk = review => async (dispatch) => {
const response = await fetch(`/api/review/`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(review)
})
if (response.ok) {
const newReview = await response.json()
dispatch(addReview(newReview))
}
return response
}