Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
1804c34
Change second endpoint to show correct response
ivanolmo Jan 16, 2020
1fcef0f
docs: Fixed errors in README.md
patnebe Mar 27, 2020
487b1a2
add one demo record in the table at running db_drop_and_create_all()
hadi-alnehlawi Jul 26, 2020
3e7813c
fix: Fixed typos in readme
BenMini Aug 13, 2020
0fca231
fix: Readme typos
BenMini Aug 13, 2020
6b73e64
Update README.md
SudKul Sep 23, 2020
e9c096d
Update README.md
SudKul Sep 23, 2020
5be3bb9
bugfix/evaluating-quiz-answers-fix
sameh-farouk Oct 5, 2020
b72eed6
Update README.md
KhogaEslam Nov 21, 2020
3f5d68c
Update new_artist.html
robinlamb Feb 21, 2021
7c8008f
Add missing fields to new_artist.html
robinlamb Feb 21, 2021
0f888c6
Add missing fields to forms.py
robinlamb Feb 21, 2021
f211510
Fix broken form and add missing fields
robinlamb Feb 21, 2021
a8da1d8
Fix edit_artist.html
robinlamb Feb 21, 2021
5a7a012
Fix edit_venue.html
robinlamb Feb 21, 2021
e0a9e82
Add edit button to show_artist.html
robinlamb Feb 21, 2021
a67dbf5
Add edit button to show_venue.html
robinlamb Feb 21, 2021
25ff47d
Fix format_datetime method
robinlamb Feb 21, 2021
e280684
Merge pull request #117 from robinlamb/master
SudKul Mar 16, 2021
a08260b
Merge pull request #85 from BenMini/master
SudKul Mar 16, 2021
e5f1db9
Update requirements.txt
SudKul Mar 16, 2021
dd66d44
Merge pull request #93 from sameh-farouk/patch-1
SudKul Mar 17, 2021
8ef63d6
Merge pull request #19 from ivanolmo/ivanolmo-patch-1
SudKul Mar 17, 2021
e698dd2
Update Werkzeug package. Refer https://stackoverflow.com/questions/60…
SudKul Mar 17, 2021
fbd33fe
Update QuestionView.js
SudKul Mar 18, 2021
e024c11
Update Question.js
SudKul Mar 18, 2021
81db346
Update app.py
SudKul Mar 18, 2021
d74e8df
Merge branch 'master' into patch-1
SudKul Mar 18, 2021
1d89e21
Merge pull request #33 from Dev-Nebe/patch-1
SudKul Mar 18, 2021
4310f6a
Merge branch 'master' into patch-1
SudKul Mar 18, 2021
63353b9
Merge pull request #97 from KhogaEslam/patch-1
SudKul Mar 18, 2021
e253bff
Merge pull request #78 from hadi-alnehlawi/master
SudKul Mar 18, 2021
ec19514
Update README.md
ronny-udacity Mar 25, 2021
5767835
401 for public, 403 for nopermissions
grutt Apr 10, 2021
238a0e8
update dependency versions
grutt Apr 10, 2021
684cd4c
Update README.md
SudKul Apr 13, 2021
29f974b
Merge pull request #125 from udacity/2021-course-maintenance
ronny-udacity Apr 20, 2021
fcb79ca
Update README, Trivia project
SudKul Apr 28, 2021
fc2ff6b
Create manual.yml
SudKul May 3, 2021
21242f2
Update .gitignore
SudKul May 3, 2021
aa75416
Update manual.yml
SudKul May 5, 2021
95a0366
Update README.md
anjalikul May 5, 2021
9dd6b2f
Merge pull request #127 from anjalikul/anjalikul-patch-1
SudKul May 5, 2021
66d2a59
fix seeking venue checkbox style
May 27, 2021
083303c
Merge pull request #130 from iMishaDev/fix/seeking_venue_checkbox
SudKul Jun 1, 2021
f141e1d
fix seeking talent checkbox
Jun 1, 2021
2d1197d
Merge pull request #131 from iMishaDev/fix/seeking_talent
ronny-udacity Jun 9, 2021
ef63a10
Update models.py
pibcrib Jun 30, 2021
4703df9
Updated to requirements.txt for coffee_shop_app
pibcrib Jun 30, 2021
164d9dc
Merge pull request #138 from pibcrib/patch-1
abhiojha8 Jul 9, 2021
49386bc
Update README.md
ronny-udacity Jul 14, 2021
3bd3759
Update README.md
ronny-udacity Jul 14, 2021
cd26879
Update README.md
ronny-udacity Jul 14, 2021
a6e24a4
Update README.md
ronny-udacity Jul 14, 2021
126558a
Update app.py
ronny-udacity Jul 22, 2021
cd3dbd0
Update app.py
ronny-udacity Jul 22, 2021
5e87aff
Update README.md
ronny-udacity Jul 22, 2021
4ca04ce
Merge pull request #139 from pibcrib/patch-2
ronny-udacity Jul 22, 2021
c8f738a
Update requirements.txt
ronny-udacity Jul 22, 2021
de37b4d
Merge branch 'master' of https://github.com/udacity/FSND
ronny-udacity Jul 22, 2021
b05cc22
Update README.md
ronny-udacity Jul 22, 2021
3e13c51
Update manual.yml
SudKul Jul 29, 2021
cd21730
Create CODEOWNERS
SudKul Oct 21, 2021
4a9114f
Update .gitignore to ignore node_modules
tasawar-hussain Oct 23, 2021
667d694
Merge pull request #146 from tasawar-hussain/patch-1
SudKul Oct 25, 2021
e54cfdf
Update api.py
tasawar-hussain Nov 9, 2021
2b89584
Update api.py
tasawar-hussain Nov 9, 2021
fa061e5
Merge pull request #147 from tasawar-hussain/patch-2
SudKul Nov 12, 2021
a561048
Merge pull request #148 from tasawar-hussain/patch-4
SudKul Nov 12, 2021
ceeaf25
Update app.py
SudKul Dec 21, 2021
769c485
Update models.py
SudKul Dec 21, 2021
db539dd
Add starter files for Heroku sample app
SudKul Dec 21, 2021
9106f11
(Frontend) Add missing 'props' to React class constructors and super(…
AlbertVilaCalvo Dec 30, 2021
12b6edf
(Frontend) Remove unnecessary return + change let to const + remove w…
AlbertVilaCalvo Dec 30, 2021
7227293
correction comments on venues search endpoints.
BenAwad95 Dec 31, 2021
6cc46ad
doc: Fix typos
pavloteyfel Jan 5, 2022
86ad95a
Merge pull request #154 from AlbertVilaCalvo/remove-unnecessary-return
SudKul Jan 5, 2022
5d4f94a
Merge pull request #153 from AlbertVilaCalvo/add-missing-props-react-…
SudKul Jan 5, 2022
27853c0
Merge pull request #155 from BenAwad95/patch-1
SudKul Jan 5, 2022
6917a69
Merge pull request #156 from pavloteyfel/typo
SudKul Jan 5, 2022
67c1097
doc: Correct TODO comment
pavloteyfel Jan 19, 2022
71ad8ec
Merge pull request #157 from pavloteyfel/forms
UAnjali Jan 20, 2022
d271ecd
Bug fix to models.py
IyeBohboh Feb 10, 2022
3da13c0
Merge pull request #161 from udacity/karenHebel-patch-2
SudKul Feb 16, 2022
a2124c1
add environment.yml for conda
MalteLeuschner Feb 26, 2022
ddc6883
Update manual.yml
SudKul Jun 3, 2022
eb54c2e
Merge pull request #165 from MalteLeuschner/environment.yml
SudKul Jun 3, 2022
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
46 changes: 46 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Workflow to ensure whenever a Github PR is submitted,
# a JIRA ticket gets created automatically.
name: Manual Workflow

# Controls when the action will run.
on:
# Triggers the workflow on pull request events but only for the master branch
pull_request_target:
types: [assigned, opened, reopened]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
test-transition-issue:
name: Convert Github Issue to Jira Issue
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master

- name: Login
uses: atlassian/gajira-login@master
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

- name: Create NEW JIRA ticket
id: create
uses: atlassian/gajira-create@master
with:
project: CONUPDATE
issuetype: Task
summary: |
Github PR - nd0044 v2 Full Stack Web Developer (refresh) | Repo: FSND | PR# ${{github.event.number}}
description: |
Repo link: https://github.com/${{ github.repository }}
PR no. ${{ github.event.pull_request.number }}
PR title: ${{ github.event.pull_request.title }}
PR description: ${{ github.event.pull_request.description }}
In addition, please resolve other issues, if any.
fields: '{"components": [{"name":"nd0044 - Full Stack Nanodegree"}], "customfield_16449":"https://classroom.udacity.com/nanodegrees/nd0044/dashboard/overview", "customfield_16450":"Resolve the PR", "labels": ["github"], "priority":{"id": "4"}}'

- name: Log created issue
run: echo "Issue ${{ steps.create.outputs.issue }} was created"
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ venv
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
Thumbs.db

.github/**
6 changes: 3 additions & 3 deletions BasicFlaskAuth/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Jinja2==2.10.1
lazy-object-proxy==1.4.0
MarkupSafe==1.1.1
mccabe==0.6.1
pycryptodome==3.6.6
pycryptodome==3.3.1
pylint==2.3.1
python-jose-cryptodome==1.3.2
six==1.12.0
typed-ast==1.3.5
Werkzeug==0.15.2
typed-ast==1.4.2
Werkzeug==0.15.6
wrapt==1.11.1
Flask-Cors==3.0.8
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @udacity/active-public-content
4 changes: 2 additions & 2 deletions FlaskRecap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ A simple flask server to demonstrate basic flask.

## Getting Started

### Create a Virutal Enviornment
### Create a Virtual Environment

Follow instructions [here](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/) to create and activate virtual enviornment for this project.
Follow instructions [here](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/) to create and activate virtual environment for this project.

### Install Dependencies

Expand Down
2 changes: 1 addition & 1 deletion FlaskRecap/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Flask==1.0.3
itsdangerous==1.1.0
Jinja2==2.10.1
MarkupSafe==1.1.1
Werkzeug==0.15.4
Werkzeug==0.15.5
4 changes: 2 additions & 2 deletions FlaskRecap/udacity-fsnd-flaskrecap.postman_collection.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"method": "GET",
"header": [],
"url": {
"raw": "http://127.0.0.1:5000/greeting",
"raw": "http://127.0.0.1:5000/greeting/es",
"protocol": "http",
"host": [
"127",
Expand Down Expand Up @@ -83,4 +83,4 @@
"response": []
}
]
}
}
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
This is the public repository for Udacity's Full-Stack Nanodegree program.
## Full Stack Web Developer Nanodegree (nd0044 v2)
This is the public repository for Udacity's Full-Stack Nanodegree program. Here, you can find starter-code the following projects:

* *01_fyyur/starter_code* - This is the project from C1. SQL and Data Modeling for the Web
* *02_trivia_api/starter* - This is the project from C2. API Development and Documentation
* *03_coffee_shop_full_stack/starter_code* - This is the project from C3. Identity and Access Management
* *capstone* - This is the final project of this Nanodegree.

Feel free to suggest edits in the current repo by raising a PR.


6 changes: 6 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: FSND
channels:
- conda-forge
- defaults
dependencies:
- python=3.9
142 changes: 91 additions & 51 deletions projects/01_fyyur/starter_code/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Fyyur
-----

### Introduction
## Introduction

Fyyur is a musical venue and artist booking site that facilitates the discovery and bookings of shows between local performing artists and venues. This site lets you list new artists and venues, discover them, and list shows with artists as a venue owner.

Your job is to build out the data models to power the API endpoints for the Fyyur site by connecting to a PostgreSQL database for storing, querying, and creating information about artists and venues on Fyyur.

### Overview
## Overview

This app is nearly complete. It is only missing one thing… real data! While the views and controllers are defined in this application, it is missing models and model interactions to be able to store retrieve, and update data from a database. By the end of this project, you should have a fully functioning site that is at least capable of doing the following, if not more, using a PostgreSQL database:

Expand All @@ -17,22 +17,44 @@ This app is nearly complete. It is only missing one thing… real data! While th

We want Fyyur to be the next new platform that artists and musical venues can use to find each other, and discover new music shows. Let's make that happen!

### Tech Stack

Our tech stack will include:

* **SQLAlchemy ORM** to be our ORM library of choice
* **PostgreSQL** as our database of choice
* **Python3** and **Flask** as our server language and server framework
* **Flask-Migrate** for creating and running schema migrations
* **HTML**, **CSS**, and **Javascript** with [Bootstrap 3](https://getbootstrap.com/docs/3.4/customize/) for our website's frontend

### Main Files: Project Structure
## Tech Stack (Dependencies)

### 1. Backend Dependencies
Our tech stack will include the following:
* **virtualenv** as a tool to create isolated Python environments
* **SQLAlchemy ORM** to be our ORM library of choice
* **PostgreSQL** as our database of choice
* **Python3** and **Flask** as our server language and server framework
* **Flask-Migrate** for creating and running schema migrations
You can download and install the dependencies mentioned above using `pip` as:
```
pip install virtualenv
pip install SQLAlchemy
pip install postgres
pip install Flask
pip install Flask-Migrate
```
> **Note** - If we do not mention the specific version of a package, then the default latest stable package will be installed.

### 2. Frontend Dependencies
You must have the **HTML**, **CSS**, and **Javascript** with [Bootstrap 3](https://getbootstrap.com/docs/3.4/customize/) for our website's frontend. Bootstrap can only be installed by Node Package Manager (NPM). Therefore, if not already, download and install the [Node.js](https://nodejs.org/en/download/). Windows users must run the executable as an Administrator, and restart the computer after installation. After successfully installing the Node, verify the installation as shown below.
```
node -v
npm -v
```
Install [Bootstrap 3](https://getbootstrap.com/docs/3.3/getting-started/) for the website's frontend:
```
npm init -y
npm install bootstrap@3
```


## Main Files: Project Structure

```sh
├── README.md
├── app.py *** the main driver of the app. Includes your SQLAlchemy models.
"python app.py" to run after installing dependences
"python app.py" to run after installing dependencies
├── config.py *** Database URLs, CSRF generation, etc
├── error.log
├── forms.py *** Your forms
Expand Down Expand Up @@ -72,15 +94,16 @@ Instructions
1. Understand the Project Structure (explained above) and where important files are located.
2. Build and run local development following the Development Setup steps below.
3. Fill in the missing functionality in this application: this application currently pulls in fake data, and needs to now connect to a real database and talk to a real backend.
3. Fill out every `TODO` section throughout the codebase. We suggest going in order of the following:

1. Connect to a database in `config.py`. A project submission that uses a local database connection is fine.
2. Using SQLAlchemy, set up normalized models for the objects we support in our web app in the Models section of `app.py`. Check out the sample pages provided at /artists/1, /venues/1, and /shows/1 for examples of the data we want to model, using all of the learned best practices in database schema design. Implement missing model properties and relationships using database migrations via Flask-Migrate.
3. Implement form submissions for creating new Venues, Artists, and Shows. There should be proper constraints, powering the `/create` endpoints that serve the create form templates, to avoid duplicate or nonsensical form submissions. Submitting a form should create proper new records in the database.
4. Implement the controllers for listing venues, artists, and shows. Note the structure of the mock data used. We want to keep the structure of the mock data.
5. Implement search, powering the `/search` endpoints that serve the application's search functionalities.
6. Serve venue and artist detail pages, powering the `<venue|artist>/<id>` endpoints that power the detail pages.
4. Fill out every `TODO` section throughout the codebase. We suggest going in order of the following:
* Connect to a database in `config.py`. A project submission that uses a local database connection is fine.
* Using SQLAlchemy, set up normalized models for the objects we support in our web app in the Models section of `app.py`. Check out the sample pages provided at /artists/1, /venues/1, and /shows for examples of the data we want to model, using all of the learned best practices in database schema design. Implement missing model properties and relationships using database migrations via Flask-Migrate.
* Implement form submissions for creating new Venues, Artists, and Shows. There should be proper constraints, powering the `/create` endpoints that serve the create form templates, to avoid duplicate or nonsensical form submissions. Submitting a form should create proper new records in the database.
* Implement the controllers for listing venues, artists, and shows. Note the structure of the mock data used. We want to keep the structure of the mock data.
* Implement search, powering the `/search` endpoints that serve the application's search functionalities.
* Serve venue and artist detail pages, powering the `<venue|artist>/<id>` endpoints that power the detail pages.

#### Data Handling with `Flask-WTF` Forms
The starter codes use an interactive form builder library called [Flask-WTF](https://flask-wtf.readthedocs.io/). This library provides useful functionality, such as form validation and error handling. You can peruse the Show, Venue, and Artist form builders in `forms.py` file. The WTForms are instantiated in the `app.py` file. For example, in the `create_shows()` function, the Show form is instantiated from the command: `form = ShowForm()`. To manage the request from Flask-WTF form, each field from the form has a `data` attribute containing the value from user input. For example, to handle the `venue_id` data from the Venue form, you can use: `show = Show(venue_id=form.venue_id.data)`, instead of using `request.form['venue_id']`.

Acceptance Criteria
-----
Expand All @@ -96,6 +119,7 @@ Acceptance Criteria
* A user should be able to click on the venue for an upcoming show in the Artist's page, and on that Venue's page, see the same show in the Venue Page's upcoming shows section.
4. As a fellow developer on this application, I should be able to run `flask db migrate`, and have my local database (once set up and created) be populated with the right tables to run this application and have it interact with my local postgres server, serving the application's needs completely with real data I can seed my local database with.
* The models should be completed (see TODOs in the `Models` section of `app.py`) and model the objects used throughout Fyyur.
* Define the models in a different file to follow [Separation of Concerns](https://en.wikipedia.org/wiki/Separation_of_concerns) design principles. You can refactor the models to a new file, such as `models.py`.
* The right _type_ of relationship and parent-child dynamics between models should be accurately identified and fit the needs of this particular application.
* The relationship between the models should be accurately configured, and referential integrity amongst the models should be preserved.
* `flask db migrate` should work, and populate my local postgres database with properly configured tables for this application's objects, including proper columns, column data types, constraints, defaults, and relationships that completely satisfy the needs of this application. The proper type of relationship between venues, artists, and shows should be configured.
Expand All @@ -110,34 +134,50 @@ Looking to go above and beyond? This is the right section for you! Here are some

Best of luck in your final project! Fyyur depends on you!

### Development Setup

First, [install Flask](http://flask.pocoo.org/docs/1.0/installation/#install-flask) if you haven't already.

```
$ cd ~
$ sudo pip3 install Flask
```

To start and run the local development server,

1. Initialize and activate a virtualenv:
```
$ cd YOUR_PROJECT_DIRECTORY_PATH/
$ virtualenv --no-site-packages env
$ source env/bin/activate
```

2. Install the dependencies:
```
$ pip install -r requirements.txt
```

3. Run the development server:
```
$ export FLASK_APP=myapp
$ export FLASK_ENV=development # enables debug mode
$ python3 app.py
```
## Development Setup
1. **Download the project starter code locally**
```
git clone https://github.com/udacity/FSND.git
cd FSND/projects/01_fyyur/starter_code
```

2. **Create an empty repository in your Github account online. To change the remote repository path in your local repository, use the commands below:**
```
git remote -v
git remote remove origin
git remote add origin <https://github.com/<USERNAME>/<REPO_NAME>.git>
git branch -M master
```
Once you have finished editing your code, you can push the local repository to your Github account using the following commands.
```
git add . --all
git commit -m "your comment"
git push -u origin master
```

3. **Initialize and activate a virtualenv using:**
```
python -m virtualenv env
source env/bin/activate
```
>**Note** - In Windows, the `env` does not have a `bin` directory. Therefore, you'd use the analogous command shown below:
```
source env/Scripts/activate
```

4. **Install the dependencies:**
```
pip install -r requirements.txt
```

5. **Run the development server:**
```
export FLASK_APP=myapp
export FLASK_ENV=development # enables debug mode
python3 app.py
```

6. **Verify on the Browser**<br>
Navigate to project homepage [http://127.0.0.1:5000/](http://127.0.0.1:5000/) or [http://localhost:5000](http://localhost:5000)

4. Navigate to Home page [http://localhost:5000](http://localhost:5000)
11 changes: 5 additions & 6 deletions projects/01_fyyur/starter_code/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def format_datetime(value, format='medium'):
format="EEEE MMMM, d, y 'at' h:mma"
elif format == 'medium':
format="EE MM, dd, y h:mma"
return babel.dates.format_datetime(date, format)
return babel.dates.format_datetime(date, format, locale='en')

app.jinja_env.filters['datetime'] = format_datetime

Expand All @@ -86,7 +86,7 @@ def index():
@app.route('/venues')
def venues():
# TODO: replace with real venues data.
# num_shows should be aggregated based on number of upcoming shows per venue.
# num_upcoming_shows should be aggregated based on number of upcoming shows per venue.
data=[{
"city": "San Francisco",
"state": "CA",
Expand All @@ -112,7 +112,7 @@ def venues():

@app.route('/venues/search', methods=['POST'])
def search_venues():
# TODO: implement search on artists with partial string search. Ensure it is case-insensitive.
# TODO: implement search on venues with partial string search. Ensure it is case-insensitive.
# seach for Hop should return "The Musical Hop".
# search for "Music" should return "The Musical Hop" and "Park Square Live Music & Coffee"
response={
Expand Down Expand Up @@ -272,8 +272,8 @@ def search_artists():

@app.route('/artists/<int:artist_id>')
def show_artist(artist_id):
# shows the venue page with the given venue_id
# TODO: replace with real venue data from the venues table, using venue_id
# shows the artist page with the given artist_id
# TODO: replace with real artist data from the artist table, using artist_id
data1={
"id": 4,
"name": "Guns N Petals",
Expand Down Expand Up @@ -430,7 +430,6 @@ def create_artist_submission():
def shows():
# displays list of shows at /shows
# TODO: replace with real venues data.
# num_shows should be aggregated based on number of upcoming shows per venue.
data=[{
"venue_id": 1,
"venue_name": "The Musical Hop",
Expand Down
Loading