On 24/07/2018 9:25 AM, roflcopterpaul wrote:
> Hello, everyone!
>
> I am quite the scrub, having written a few super basic apps and
> currently going through the Django tutorial. As I'm going through the
> tutorial (creating a "polls" app), I've been perplexed by something
> the whole time that I haven't been able to find an answer to -
>
> Why is much of the data the users see (i.e., the questions and answers
> to the questions) written in the shell INSTEAD of simply being typed
> up in the code/text editor? I'm new, so this is coming from a place of
> ignorance, by why is that? It seems way more complicated and less
> efficient.
It is an education thing. Python is an interpreter which means it can
interpret and execute code directly as well as read a script and execute
from that.
And you can enter data directly without needing to write/debug data
entry code or skipping too far ahead of basic theory to get the Admin
going.
Typing stuff in and seeing the results demonstrates things actually
working. If you believe, you don't need to do it.
Typing it in directly gives you instant feedback and that's what a lot
of people like. I've been using Python for a few years now and I still
fire up the interpreter occasionally when I'm refreshing my memory about
something I haven't used for a while. Or checking to prove something
works as it should when results make me suspect I have gotten something
wrong.
YMMV
>
> Also, IS there a way to change up the code so everything can be
> directly changed in the files themselves instead of in the shell?
>
> Thank you very much for any insight!
> --
> You received this message because you are subscribed to the Google
> Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
django-users...@googlegroups.com
> <mailto:
django-users...@googlegroups.com>.
> To post to this group, send email to
django...@googlegroups.com
> <mailto:
django...@googlegroups.com>.
> Visit this group at
https://groups.google.com/group/django-users.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/django-users/00ef1cb4-3e87-4c3d-a5c6-8811408624de%40googlegroups.com
> <
https://groups.google.com/d/msgid/django-users/00ef1cb4-3e87-4c3d-a5c6-8811408624de%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit
https://groups.google.com/d/optout.