
Learn three web frameworks—Django, Ruby on Rails, and Node—with a stock market portfolio app, pulling data from third-party APIs and formatting it for users, in bite-sized lessons.
Check out my student Facebook Group...
It's a great place to get fast support for this course from me, to interact with other students, to post your projects and code, and to access course announcements and extras...
Join Now!
https://www.facebook.com/groups/codemycom/
This Django section introduces setting up Python and Django, choosing a text editor and terminal (get bash), and reinstalling Python, plus how to contact the instructor with questions.
Install the Sublime Text editor and a free bash terminal, then run them on Windows, Mac, or Linux to start your web development setup.
Install Python 3.x by downloading from the official Python download page, ensure 32-bit on Windows, add Python to the path, then set up a virtual environment to install Django.
create a Django stock directory, install and configure a Python virtual environment, activate it, and verify its isolation with pip freeze before installing Django in the next step.
Install Django in a virtual environment, create a new project named stocks with Django admin, then run the server to view the default Django page at localhost:8000.
Django has updated to version 3.0 since this course was released. You can use the latest version of Django with no problems in this course.
Access the Django admin area to manage the database and create a super user. Migrate the database, start the server, and use a second terminal with manage.py to log in.
Create a quotes app within the Django stock project, set up its models, views, and admin, and configure the app's urls to enable stock quotes lookup.
Configure Django urls by including the quotes.urls module, set the home page path to /, and define urlpatterns with path and include for admin and app routes.
In Django, create a home page by configuring views, urls.py, templates, and settings.py, adding the quotes app to installed apps, and routing the home path to the home view.
Create a simple about page by wiring a Django template, view, and URL: define an about view, render it with context, and map it in urls.py for easy navigation.
Create a reusable base.html and extend base.html across pages using Django's template language. Define a content block for page content while centralizing header and footer for site-wide updates.
Install bootstrap to style your site, insert the starter template into the base file, and build a dark navbar with links to home and about using a container for layout.
Learn to use Django's named URLs to create links by referencing urls.py patterns, so home and about page links update automatically when routes change.
Learn how to use a stock quote API to pull market data into your Django project, obtain API keys, and explore API docs for data formats and display.
Learn how to connect to a third-party API using requests, parse JSON data, handle errors with try-except, and display stock quotes in your app.
Explore treating an API response as a Python dictionary and handling errors. Iterate with a for loop over api.items to print keys and values.
Format api results to display company name, latest price, previous close, market cap, and 52-week high and low. Configure outputs for a stock dashboard with time series data points.
Learn to enhance a Django search form by integrating a csrf token, customizing placeholder and button text, styling with bootstrap, and wiring the form to post to home view.
Continue building the form by naming the input ticker and handling post requests to fetch ticker data. Render the ticker or an error based on the api response.
This form recap shows posting a Django form with csrf, reading the ticker input, calling an api, handling json, and displaying results, with next steps for a stock portfolio database.
Create an add stock page with a new url, view, and template to save ticker symbols for your portfolio, then design a single-field database for API-ready tickers.
Define a Django stock model with a ticker field of max length 10, include a __str__ method, and migrate to the database to register in the admin area.
Register the stock model in the admin area by importing it and using admin.site.register, so you can add, edit, or delete stocks directly from the admin interface.
Pull stock objects from the database and import the stock model. Pass a ticker list in the view context and render the stock names on the webpage.
learn how to add a stock ticker to the database using a Django form, handle post requests, validate and save the form, display success messages, and redirect.
Implement a Django stock form using a ModelForm to validate and save ticker data to the database, then add stocks to a portfolio with post requests and redirects.
Learn to delete stocks from a Django app by using each item's primary key id, implementing a delete view, and wiring a url with stock_id to remove the item.
Learn how to implement Django messages across pages using a loop to display bootstrap alerts, including dismissible warning alerts for actions like stock added or deleted.
Explore turning database stock data into an attractive, readable table using Bootstrap components. Implement stripes, borders, hover effects, dark table head, and layout refinements for multiple stocks.
Configure a seven-column table with headers for company name, stock price, previous close, market cap, year-to-date change, 52-week high, and 52-week low, then render a row per item.
Iterate over the database data with a for loop to render each item as a table row, add a delete column, and prepare to pull real data from the API.
Connect a database-backed ticker table to an API by looping through tickers, performing API calls, handling errors, and passing aggregated results to the page.
Loop through the API's stock output, a list of dictionaries, to extract company name, latest price, previous close, market cap, year-to-date, and 52-week high/low, then render them in a table.
Connect the database to the API and render stock items into a table with looping and proper tr and td structure. Improve formatting for prices and market data.
Learn to implement a delete stock feature by creating a dedicated delete stock page, wiring templates and views, passing the ticker, and adding error handling and navigation updates.
Generate an SSH key pair and store it in the hidden .ssh directory to securely connect your computer to GitHub, enabling version control and code backups.
Initialize Git, configure user name and email, add and commit all project files, and push the local repository to GitHub on the master branch.
Learn how to set up and use GitHub to back up, share, and version your Django projects, create repositories, generate SSH keys, push changes, and track commits.
Install node, a text editor, and a terminal, then set up the Heroku toolbar and install ruby on rails on Windows or Mac/Linux as guided.
Install node.js, remove any existing version to ensure the latest compatibility, download the lts version from nodejs.org, and complete the installation; restart your computer afterward.
Install Sublime Text and Git Bash to set up your development environment, download and install defaults, and prepare for version control with SSH keys for GitHub and Heroku.
Generate an ssh key in the Git Bash terminal, create a hidden .ssh directory, run ssh-keygen, and use the public key to push code to GitHub or Heroku.
Install the Heroku toolbelt to interact with Heroku from the terminal on Windows, set the path, verify with heroku --version, and use the free tier for testing.
Learn to install Ruby on Rails using Rails installer, choose a Ruby version, install Rails and dependencies, set PATH to run from anywhere, and prepare to create a new project.
RailsInstaller.org is down, you can find the installer here:
https://web.archive.org/web/20210306035811/http://railsinstaller.org/en
Learn to install and verify Ruby on Rails with a test project, troubleshoot errors, and fix gem dependencies by pinning an older sequel lite version, then run bundle install.
Learn how to create a new Ruby on Rails project, install dependencies with bundle install, and navigate the app structure—from assets to controllers, models, and views—understanding the mvc architecture.
Launch the Rails server in your project directory to view the default page, using rails s with the Puma server on port 3000, then open localhost:3000 to confirm it's running.
Create your first Rails web page by using Rails generate to build a home controller and index view, connect routes, and view the live page in the browser.
Learn how to set the root route in Rails by mapping the home page to the root path in routes.rb, and remove old routes for a clean load.
Learn how git enables version control, tracks changes, and supports rollbacks, with hands-on setup, commit workflows, and preparation for remote hosting on GitHub.
Connect your local git repository to GitHub, choose public or private repositories, and push changes with commits and readme updates using SSH keys.
Learn to create an about page manually in Rails by adding an about action to the Home controller, creating an about.html.erb view, and routing home#about and home#index as the root.
Learn how the application.html.erb layout injects common elements like navigation and footer via yield, so changes propagate to all pages without editing each page.
Learn to create Rails links with embedded Ruby using link_to, and use route helpers like home_about_path and root_path so links update automatically when routes change.
Learn how to use partials in Rails to extract common user interface elements like navigation bars and footers into separate files, then render them in views to simplify updates.
Explore bootstrap, the free, popular css framework, and learn to use its components—alerts, buttons, cards, carousel, forms, jumbotron, and navbar; visit bootstrap.com for docs and rails installation guidance.
Install bootstrap in Rails by referencing the bootstrap files or by adding the bootstrap gem to the gemfile, then run bundle install and restart the server to see styling changes.
Learn to implement a Bootstrap navbar by copying the code from Bootstrap docs, customize colors and links, and make home and about pages work while preparing for mobile-first design.
Learn how to implement mobile-first design using bootstrap and the viewport meta tag to ensure your site looks great and resizes across devices.
Add stock market functionality to a Ruby app using the stock quote gem, retrieving current quotes and latest prices from a third-party service, and handle api key updates.
Update the stock quote gem to 3.0 by signing up for a free api key and initializing it in your controller.
Explore the stock quote gem and learn to pull company data, stats, logo, and descriptions, then build a web form to input ticker symbols for dynamic displays.
Learn to build a custom web form in Ruby on Rails with form_tag posting to the root path, including a ticker input and placeholder.
Learn to connect a form to a Rails controller, pass the ticker as a param, assign results to an instance variable, and display company name and price with basic error handling.
implement basic error handling for a missing ticker with if and elsif logic. show a flash message, asking to enter a symbol, instead of crashing.
Handle gibberish stock input by inspecting api responses and implementing existence checks in the home controller, displaying clear errors when symbols do not exist to prevent crashes.
Install devise to implement user management in the Rails app, enabling sign up, login, and password reset, and generate the necessary views while configuring development and production hosts.
Explore how Devise creates and manages the users database in Rails: generate the user model, run migrations, migrate the database, and inspect the users table and schema.
Explore implementing devise authentication in a Rails app, render flash messages with bootstrap alerts, and manage routes, login, signup, and server restarts for changes.
Add sign up, log in, and log out links to the navigation bar using new user registration and session paths. Plan to show or hide links based on login status.
Apply Bootstrap form components to create polished login, sign-up, and password pages using form-group and form-control, and structure content with grid, cards, and a Jumbotron for centered layouts.
Implement dynamic navbar links using embedded Ruby to show edit profile and log out when signed in, and sign up/login when not, with Devise integration.
Create a stocks table linked to users by user_id with ticker string using Rails scaffold, generating stocks resources, controller, views, and routes, then migrate the database to update the schema.
Explore building a Rails stocks feature with a full create, read, update, delete controller and views, using resource routes and preparing to associate stocks with users.
Link stocks to users with Rails active record by adding has_many :stocks on user and belongs_to :user on stock, then create stocks tied to the current user.
Explore how to add stock links in the navigation, understand CRUD (create, read, update, destroy), and see how Rails scaffolds enable full CRUD for stocks.
Learn how to authenticate users using Devise in a Rails app, enforce sign-in before accessing stock pages, and protect CRUD actions in the stocks controller.
define a correct_user before_action in the stocks controller, use current_user to authorize edits, updates, and destroys, and filter displayed stocks to the logged-in user.
Apply user-scoped stock creation by using the current user id in the stock form, hide the user_id field, and render only the stocks that belong to the logged-in user.
Learn to filter a stocks index page so only the current user's stocks appear, using a loop and stock.user_id, with links to show, edit, and destroy.
Connect the stocks database to stock quote gems, loop through stocks on the index page, fetch data, and prepare controller and view updates while committing changes in git.
connect the stocks table to the quote gem by displaying each current user's stocks with ticker, company name, and current price, including basic error handling.
Apply Ruby's number_with_precision to format the latest price with two decimals and a comma delimiter, improving readability by inserting thousands separators.
Validate empty or non-existent stocks, show NA instead of reprinting ticker, company name, symbol, or latest price, and add on-page error handling to prevent invalid stocks from hitting the database.
Learn to enforce robust form validation in Rails by validating ticker presence and disallowing spaces with a format regex in the stock model, preventing blank or invalid submissions.
Develop and style a stock index table using Bootstrap, displaying company name, ticker, current price, and market cap, with clickable actions and basic error handling for market cap formatting.
Improve your web app reliability by enhancing error handling for market cap, missing tickers, and invalid stock data. Validate forms and clarify edit and delete flows.
Create a dynamic stocks show page that uses the route to fetch a stock and display ticker details. Include current price, sector, previous close, and year-to-date changes.
Push your app to Heroku to go live, explore the free tier and dyno pricing from seven dollars, and learn to use your own domain or a Heroku domain.
Learn to adapt a Rails app for heroku by swapping the development sqlite-like database for postgres, adjusting the gemfile, installing bundles without production, and pushing to heroku.
Deploy and migrate your Heroku Postgres database by running the updated rails db migrate command, pushing existing migrations to Heroku, then sign up and interact with the live app.
Learn how to set a custom domain for your Heroku app by adding a domain in Heroku settings and pointing a cname record to your app.
Learn to build a stock market app with Node, connecting to a stock market API to fetch and display current price, previous close, percent change, market cap, and year-to-date data.
Install Sublime Text and Git Bash by downloading Sublime Text from Sublime Text dot com and Git Bash from the Get Bash page, then install on Windows, Mac, or Linux.
Download and install node from the official site, selecting the long term support version for stability, and use npm in the terminal to manage packages.
Create a project directory, initialize a node project with npm init -y, and add an index.js and package.json to spin up a node server.
Install express.js via npm, create an express app, set port with process.env.PORT or 5000, and start the server to listen on localhost:5000.
Learn to build your first webpage with node and express by serving static pages from a public folder, creating index.html and about.html, and wiring routes with express.static.
Learn to use nodemon, a node monitor, to auto restart the server during development by installing npm i -D nodemon and adding a dev script in package.json to watch index.js.
Install Express Handlebars and configure it as the view engine to render dynamic pages. Create views and layouts folders, add home.handlebars and main.handlebars, and set up routes.
Learn how to use Handlebars to create a single reusable layout with a header and footer, and inject dynamic content into pages via views, routes, and templates.
discover how handlebars lets you pass backend variables into the frontend to render dynamic content and connect to any API, including strings, arrays, functions, and objects, on the page.
Learn how version control saves code across time, enables rollbacks, and merges team changes, using git and GitHub to back up a local repository in the cloud.
Learn how to set up GitHub for version control, generate an SSH key, connect to GitHub, create a repository, and push code with meaningful commit messages.
Add a bootstrap navbar to every page by pasting it into the main handlebars layout and updating links and colors. Learn static pages vs handlebars templates for consistency.
Create an about page with Handlebars, duplicate and rename to about2, wire routes from the root to the new page, and reuse the existing nav bar across pages.
Learn to fetch stock market data via a free api, obtain your own api key and publishable token, and explore current stock price, 52-week high/low, and market cap.
Connect to an API using the request module, fetch JSON data, handle errors, and log responses to the console as you pull stock quotes into your app.
Learn how to turn API calls into reusable functions, manage scope and return values, and handle asynchronous data flow so data renders correctly instead of undefined.
Define and implement a callback function to ensure API calls complete before updating the page. Pass the callback to the API and render the result on screen once it finishes.
Render a JSON API response on screen by looping with handlebars each, printing each key and value, such as stock company name and symbol.
Learn to format api output for a stock dashboard by selecting metrics like latest price, previous close, percent change, market cap, and 52-week highs and lows, with bootstrap styling.
build a search form for stock tickers by updating the button and placeholder, setting the form action to post to the home page, and naming the input as stock ticker.
Create a post route, install and configure body-parser middleware to parse urlencoded form data, then access req.body['stock ticker'] to display the submitted value.
Pass a user-entered ticker from the form into the API call, build a dynamic URL by concatenating the ticker, and post the request to fetch stock price and market cap.
Learn to push your app to the cloud with Heroku, a free tier third-party hosting solution for Ruby on Rails, Django, and Node, and explore pricing and horsepower-based scaling.
Install the heroku toolbelt to connect the terminal to your GitHub account, create a proc file with web: node index.js, commit, push to GitHub, and verify the toolbelt version.
Push your node app to Heroku by logging in, adding SSH keys, creating and renaming the app, and deploying with git push heroku master on the free tier.
Learn how to add a custom domain to your Heroku app via the app settings, then point the registrar's cname to the Heroku app and await dns propagation.
Unlock lifetime access to 60 plus web development courses, books, and PDFs across Django, Ruby on Rails, and Node. Grab a $200 discount to $49 with a 30-day money-back guarantee.
In this course you'll learn how to build websites using three of the most popular web development frameworks used today; Django (and Python), Ruby on Rails (and Ruby), and Node (and Javascript). We'll build three websites (one for each framework). The website will be a stock market portfolio app that will connect to a third part API, get stock market data, bring it back to your app, and then you'll learn how to manipulate that data and post it on your website. It's a lot of fun!
This course is aimed at the absolute beginner, you don't need any coding experience at all!
We'll start out by setting downloading and installing all of the tools you'll need to start coding each of the frameworks. Everything you need for this course is available as a free download, so there's nothing else to buy.
For each framework, we'll use the free Sublime Text Editor, the Git Bash Terminal and a Web Browser.
This course is a bundle of three of my other popular courses in Django/Python, Ruby on Rails, and Node/Javascript.
These web frameworks are three of the best frameworks to learn, and learning has never been this easy! They're the most popular and in demand for a reason! Let's learn to code!
I'll see you on the inside!
-John Elder