Most views are incredibly simple. Query database, maybe do a security
check on the logged in user if the data shouldn't be public or only some
users / groups can view it (yeah one thing I don't use as often as I
should but will be using more of in the future is the built in Django
permissions system), return data and add it to template context. Done.
Forms might add a couple of minutes per form. Just need to check that
each form is valid and save the results or do the database search as
required. Neither requires much programming time or skill.
I don't see why any of that should take any more than 5 minutes. Before
I started programming in Python / Django I was a C programmer. Now that
takes time because there are so many mistakes you can make in C unless
you are on the ball. In comparison Python and Django is a piece of cake.
The thing that takes the time is planning out features and making sure
your unit tests are comprehensive. Also making sure your models are well
designed. I can easily spend 2 times the amount of time planning out
features than I do actually programming and my philosophy when it comes
to programming is have the absolute bear minimum of code in your views.
If you can get rid of code then do so.
On 03/04/2017 16:10, Vijay Khemlani wrote:
>
> Also
>
> "I can write just about any view I want in less than 5 minutes with a
> function based view. The only slow down on my end is my typing speed."
>
> If your typing speed is the limiting factor in your workflow... *shudders*
>
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@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/30a5eab2-dee9-eaff-66e4-105ba85bf0bf%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment