Ask HN: Advice for someone struggling to learn Django

Hello HackerNews. I've been trying to learn Django for about a half a year now. After completing many tutorials I find myself struggling to build projects that deviate from said tutorials. Any suggestions?

20 points | by megasquid 2375 days ago

8 comments

  • viraptor 2375 days ago
    Deviate, identify what is the problem, solve that problem, repeat. When you can describe a very specific problem, stackoverflow is great. Otherwise, IRC or some django-specific community may be a better place. If you think you're struggling, break down the issue into small bits: what are you trying to achieve, what have you tried, what's the smallest bit of progress you can make right now / what's the immediate issue that's stopping you.

    You'll always find new problems if you try new things. That's learning, not struggling. :-) (worth repeating to get a more positive outlook)

    • megasquid 2375 days ago
      Thank you viraptor. I've been on irc since posting this. Should've been using that resource ages ago. Really needed someone I could ask specific questions and didn't really know where to turn for that. Excited to be learning not struggling :)
  • ldonley 2374 days ago
    It might be worthwhile to use a library like Flask which has less batteries included. This will force you to figure out which pieces of the puzzle you are missing and will (hopefully) allow you to learn a lot through exploration.

    Once you understand what everything is doing, going back to Django, you should understand what all of the components are doing.

    Django & Flask are not exactly one-to-one with the way they handle a lot of things, but I think it would still be a useful exercise.

    • megasquid 2374 days ago
      Thanks Idonley. I have heard that flask is easier. At this point I feel too deep into Django to give up. However, picking up some flask stuff on the side could be worthwhile. Would certainly broaden my understanding of it all.
      • bigmanwalter 2373 days ago
        I would second this advice. Flask is structured much more intuitively than Django. The first time I tried Flask after Django everything just clicked into place immediately.
    • togusa2017 2373 days ago
      I would agree too. Flask will help you understand the basic web framework and will give you confidence. In the past I often used django but once I worked with flask I never looked back.
  • twobyfour 2373 days ago
    Before learning Django, did you already understand the fundamentals of the web, relational databases, and basic programming?

    Django abstracts away the tedious aspects of the use of SQL databases, form validation, HTTP requests and responses, and the like. It does not absolve you from understanding the underlying structures.

  • wreath 2375 days ago
    Try to understand why things are done the way they are and what is actually happening instead of just following the tutorial systematically. If you have some knowledge gap, say in basic HTTP or data modeling concepts, make sure you read about those as well. This will strengthen your understanding of the framework. Also, if this is your first time with Python, I highly recommend learning Python before learning the framework. This applies to any language out there.
    • megasquid 2374 days ago
      Thanks Wreath. That's good advice. I have been brushing up on my python skills as I was concerned that may be my problem. I unfortunately did learn Django very very shortly after i started diving into python. Will continue to further my python education for sure!
  • pydox 2375 days ago
    Learn HTML and CSS, Python, and then Django. Think of a new idea. Try build when learning Django.
    • megasquid 2374 days ago
      Thanks Pydox. I do know html and css. I've been doing that for a little over a year now. Currently design a lot of landing pages for work. I'm currently working on www.correlate.pro with Django :) My website www.samuelpiecz.com is built with Django and I've built a couple other little projects. My website does need to be updated badly though..
  • alphanumeric0 2375 days ago
    Hi, I'd suggest finding a local Python or Django user group and asking for help. Also it's worth joining #django on irc to ask questions.
    • megasquid 2375 days ago
      Thanks for the advice. I will certainly start taking advantage of irc. Unfortunately no meetups around here.
  • pryelluw 2374 days ago
    Email me any questions. Id love to help. If you are on twitter, then Id connect you to some great django people.

    (Check my profile)

    • megasquid 2374 days ago
      Thank you very much! I really appreciate it. Have added you on twitter, however, I'm not super active on social media.
  • mjhea0 2374 days ago
    Which tutorials have you done thus far?
    • megasquid 2374 days ago
      I've done all the teamtreehouse python and Django tutorials. Which took a few months. Even did it a second time. Then also the django polls tutorial on the Django docs site. Plus the local library tut that is on the mozilla site. Also built a storefront using Django but I used 3rd party integrations to deal with payment processing and the shopping cart (stripe and snappycheckout).
      • 3131s 2374 days ago
        Have you read through "Two Scoops of Django" yet? I am not really a fan of any Django learning resources (that I'm aware of) outside of that one, and the docs. It helped me because it explicitly lays out an opinionated but sensible way of structuring projects.
        • megasquid 2373 days ago
          I have read about half of it so far. All projects I have worked on recently I've used the Cookiecutter that Audrey and Danny offer. It's extremely helpful. Thanks for reminding me I need to finish it!
      • smithmayowa 2374 days ago
        try searching for djangogirls and hellowebapp tutorial on google that helped me learn django basic concept in a relative short frame of time two months to be exact, then check out https://simpleisbetterthancomplex.com blog posts on various python frameworks implementation and browse through github for various Django projects source code particularly drskepy django hackathon boiler plate. And if you still have problem with python checkout sololearns app on play store or appstore it was very instrumental for me getting a better grasps on python basics.
        • limedaring 2373 days ago
          Author of Hello Web App here — thanks for recommending! I actually moved the entire tutorial online recently, you can read it for free here: https://hellowebbooks.com/tutorial/

          It's written in a way to help you build something unique, which might help your issue, OP. Basically I walk through building a "collection of things," which you can alter to create something like a Twitter clone, a directory, a blog, a store, etc.

          Happy to help, send me an email tracy@hellowebbooks.com anytime. :)

          • megasquid 2373 days ago
            Thank you very much limedaring! I will not hesitate to reach out once I hit my next roadblock. Look forward to trying out your tutorial :)