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

Adam Reid - [Sprint-Challenge--Django-I] #278

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 22 additions & 0 deletions DeploymentExperiences.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[Project Repository](https://github.com/iAmAdamReid/Intro-Django)
[Live Site API](https://django-sprint-acr-new.herokuapp.com/api/)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I appreciate that you have a link to your project in here


- Summarize the key steps in the deployment process.
- What went well?
- What challenges did you face?
Expand All @@ -6,3 +9,22 @@
- Which docs did you think were the most helpful?
- Name one or two specific things about this resource that you think sets it apart from other docs you have referenced in the past.

Before deploying an application to Heroku, we first have to create an application using the Django web framework. In order to do this, we need to initialize a project that will handle all of our applications. Django makes initialization easy, as the constructors handle the necessary directories and files for us via these commands:
`django-admin startproject project_name` initializes Django's settings, database configurations, and Django-specific options.
`python manage.py startapp app_name` initializes a directory structure that contains the basic files necessary to run an application.
You can see more about these commands and what files/directories they manage [by reading the documentation here.](https://docs.djangoproject.com/en/2.1/intro/tutorial01/)

**What went well?**
The documentation provided in the project README.md was extensive, and allowed for a straightforward development process without diving too deep into the concepts. Additional information was provided to help us understand what is happening as we develop the server. The biggest difference in developing in Django is that much of the work happens in a virtual environment. I'm using `pip` and `pipenv shell` for the virtual environment, which manages all of our dependencies locally, rather than system-wide.

**What challenges did you face?**
Adjusting to this new way of development took a little time, as I had to ensure I was running the right commands in the right shells. Django comes with a huge assortment of tools and addons that can give impressive functionality out of the box. Configuration is well-documented, but that doesn't mean you won't have to debug a few things. The largest challenges I faced were getting comfortable with virtual environments, and understanding what configurations were necessary for Heroku deployment, specifically using the `.env` and `Procfile` files. Thankfully, Heroku's documentation is extensive, and the Lambda instructors were helpful with any errors I encountered.

**How far did you get?**
I managed to complete the project MVP by deploying a token-authenticated RESTful API for a simple Notes application that serves Note data from a relational database using JSON. Additionally, this application has an administration panel that allows a superuser to create, edit, and delete users and notes from the database.

**Which docs did you think were the most helpful?**
The official Django documentation was very useful for a first-timer. They have an extensive documentation that can be as shallow or as deep as you choose. In addition to the docs, there is a large community of coders that contribute to community blog posts and mailing lists that can help further your understanding. Everything is laid out in a way that is accessible, and it is easy to find what you are looking for.

All in all, this project has given me a larger toolkit to consider when choosing to build web applications. Being able to deploy to the web using Python is a useful skill indeed, as Python is one of the most widely used languages [in the world](https://pypl.github.io/PYPL.html).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adam, this is great, you have very detailed answered that showcase that you have a strong understanding of Django.


10 changes: 10 additions & 0 deletions LoggingExperiences.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Heroku provides a simple and functional logging protocol for applications. To view the logs, all you have to do is type `heroku logs` and it will generate a list of logged actions. This was especially useful when debugging the deployment process, as the logs are informative as to what was missing or going wrong.

What I found most useful, however, was the `heroku logs --tail` functionality, which gives a real-time log of all incoming requests to the server. This allows you to debug every step of the way, and to check the web status responses as they happen.

You can see an example of a heroku log output here, which shows the startup of the dyno, as well as some HTTP GET requests.
![Heroku Logs Tail](/imgs/heroku-logs-1.jpg)

In addition to Heroku's logging capabilities, they also have the ability to congifure [custom Webhooks](https://devcenter.heroku.com/articles/app-webhooks) that can send notifications for events that happen in an application or dyno. By using Webhooks, you can stay aware of major application changes even while you're away from your development machine. Or, you could even deploy your own site-monitoring application that receives Webhooks from multiple applications, and monitor all of your development activity from one place.

Heroku's architecture is very developer focused, as all of these impressive features come standard with every account. I was a bit hesitant about Heroku at first, as I'm so used to managing everything when it comes to server deployment, but their integration with Git and their extensive list of features make Heroku an attractive platform for the hobbyist or professional developer.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome job stretching with these Heroku comments, you really put a lot into this project.

Binary file added imgs/heroku-logs-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.