advanced beginner / early intermediate Django users

41 views
Skip to first unread message

Becka R.

unread,
Mar 18, 2016, 2:35:14 PM3/18/16
to Django users
Hi there, 

This is less about solving a specific coding issue in Django, and more asking for input from other people who have hit walls in Django.  I hope this is within the scope of what this list is used for, and if it isn't I apologize. 

I've now written a couple of Django CRUD applications, and I keep running into walls in Django which I suspect are quite common to advanced beginners or early intermediate users.  I'm in the process of organizing a sprint, and am hoping to start working with people on gathering and creating resources for people who are beyond the core basics, but still learning some of the fundamentals. 

Some of the issues I really struggled with, and had blocks on included:
-  deployment 
- switching to Postgres
-  allowing a user to edit data in a modelform where there was a foreign key

I'm guessing these are all very common use cases, and that there are more which could be better documented.  I'm interested in helping to make it easier for people at my level to find resources and code samples,and I have two questions for the group:

1.  What are some of the common use cases you've struggled with? 
2. What resources, beyond the docs and official tutorial have you found to be helpful, accurate, and up to date with Django 1.9 (or 1.8) and associated packages?

Thanks so much for your ideas. 

Becka

René Fleschenberg

unread,
Mar 19, 2016, 7:20:42 AM3/19/16
to django...@googlegroups.com
Hi,

On Friday 18 March 2016 11:35:13 Becka R. wrote:
> Some of the issues I really struggled with, and had blocks on included:
> - deployment

There are many different ways to deploy Django (or actually, Python/WSGI)
applications. You have to chose the one that suits your case best. It might
be a good idea to use a PaaS like Heroku or Pythonanywhere, so you can focus
your time on actual development.

> - switching to Postgres

I recommend to use Postgres from day 1, also for local development. That
said, Django's dumpdata / loaddata commands can often be used to easily
migrate data to a different database. Did you try dumpdata / loaddata and
run into trouble?

> - allowing a user to edit data in a modelform where there was a foreign
> key

I am not sure what exactly your problem was here. By default, you should get
a ModelChoiceField, and it should just work. If you want to edit objects on
the other side of the relationship, you can use an inline formset:

https://docs.djangoproject.com/en/1.9/topics/forms/modelforms/#django.forms.models.BaseInlineFormSet

> I'm guessing these are all very common use cases, and that there are more
> which could be better documented. I'm interested in helping to make it
> easier for people at my level to find resources and code samples,and I
> have two questions for the group:
>
> 1. What are some of the common use cases you've struggled with?
> 2. What resources, beyond the docs and official tutorial have you found to
> be helpful, accurate, and up to date with Django 1.9 (or 1.8) and
> associated packages?

To be honest, most of the time, my problem was that I did not take the time
to read the official documentation carefully enough :) If you have
suggestions on how to improve the documentation, it would be great if you
open a pull request on Github, or maybe initiate a discussion here or on
django-developers.

I also keep a small list of blog posts that cover some less common cases
that the official docs don't mention.

For "advanced" things, the IRC channel #django on freenode can also be quite
helpful.

The Django Girls tutorial is also very good.
http://tutorial.djangogirls.org/

--
René
Reply all
Reply to author
Forward
0 new messages