3 ms·
It's shocking to me how something that should be so easy becomes so complicated. Why does the file structure need to be re-configured? What the heck are the __i
by pbreit 11y ago
It's shocking to me how something that should be so easy becomes so complicated. Why does the file structure need to be re-configured? What the heck are the __init__ files?? Virtual environments?
I sort of know the answers but remain unsatisfied.
And then the author sets up a needlessly overcomplicated data model situation.
- morgante 11y agoDjango Rest Framework is hands down the easiest way to build an app I've ever seen. I can have a full API for most apps built in just a few hours.
- travjones 11y agoWith all due respect, this tutorial might be a little over your head, but a little bit of research will get you up to speed. __init__ files and virtual environments are not specific to Django or DRF. These are typical patterns used in python development. For example, using a virtual environment allows you to have a self-contained python environment (your choice of version) with package management through pip. This is enormously useful when writing apps--you've got python and dependencies all in one spot contained in its own environment.
- pbreit 11y agoAs I mentioned, I know the answers. But that doesn't quell my dissatisfaction.
- alexcabrera 11y agoWrite your own article ¯\_(ツ)_/¯
- broknbottle 11y agopretty standard stuff if you're familiar with python...
- pbreit 11y agoThat's the scary part. How having blank __init__ files in every folder is "standard stuff" is beyond mortal comprehension.
- metaphorm 11y agocan I ask a serious question? are you possibly not the intended audience of this article? have you done any non-beginner work using Python and/or Django in a production environment?
- pbreit 11y agoI'm slightly past this article but not much further. I check out a lot of "getting started" tutorials because I'm still frustrated with the "getting started" experience of a lot of frameworks/approaches. I just don't see why it's so complicated to do things that seem like they would be pretty easy.
- alexcabrera 11y agoHow else would you suggest a python interpreter know to treat a directory as a module?
- pbreit 11y agoWhy a computer couldn't figure that out (whatever that even means) is a total mystery to me. Makes no sense at all.