Completed app with bootstrap added


#1

Hey all, I finished the book earlier this week and was able to deploy the app to heroku. I have many things I’d like to add code-wise and style-wise and so I think this thing is a long way off from feeling done, but it feels like a great start and I felt like it was time to share it. Loved the book’s pace and its ability to point out areas to self-learn (especially loved the numerous links to good resources).

Today I also added bootstrap to the layout, which took some time to digest. I’ve done the codecademy HTML lesson previously which helped immensely if anyone wants to go that route.

I’m attempting to create some sort of hiking app, where you can write a hike and the description of the hike. So there is a lot of room for adding content and features.

Deployed app on heroku: https://hellowebapp-rsaul.herokuapp.com
Github: https://github.com/giantryansaul/hellowebapp

Some notes:

  • Instead of “Things” I used “Profile” and you’ll see that all over the code.
  • There are 2 models, Profile and Hikes, Profile is a onetoone relationship, Hikes is a foreignkey relationship, so one user can make as make hikes as they want, but can only have one profile.
  • I had a lot of trouble serving static files in production until I read heroku’s production static files article: https://devcenter.heroku.com/articles/django-assets
  • The book uses whitenoise as well, but I think I was missing some key lines.
  • Bootstrap is a great way to get a nice template quickly, I basically just retooled some of the examples on their website to the hellowebapp layout: http://getbootstrap.com/getting-started/#examples

#2

Oops, thanks for the point about two links, think that’s a Discourse setting by default, going to turn that off.

I’m thinking of launching a Hello Web App 2 with more app-specific walkthroughs (like setting up an API, adding payments with Stripe, adding user-uploaded images, etc.) and was actually thinking of maybe adding a Bootstrap chapter. Can you expand on what you meant by “took some time to digest”?

Thanks for sharing! Going to turn off that two-link thing now…


#3

Fixed! You can edit the post to add up to 8 more links now. :)


#4

Cool, I added the links back in, thanks!

Since most tutorials around bootstrap seem either geared toward people who know front-end development really well or have their own beginning-to-end django tutorial, I had to read material from a few places, play around with the source code and eventually landed on the right syntax with the hellowebapp tutorial. You can see what I did in base.html. I’m a huge noob when it comes to front-end development, so a lot of the concepts just took time to digest, if that makes sense :)

I would definitely subscribe to a second book that follows this one. I’ve played with doing a REST API in Flask before, but I assume django has its own implementation. What would be very helpful would be a tutorial in what a API gains you (such as letting other applications extend to your site) and hooking into other website’s API’s, such as Twitter authentication and using Oauth.


#5

There is a plugin called tastypie (http://django-tastypie.readthedocs.org/) that’s pretty much the best! I’ll implement the suggestions you recommended (thanks!) and if you’re looking to jump into API stuff with Django soon, check out tastypie. :)