django documentation

1 view
Skip to first unread message

ReneMarxis

unread,
Nov 24, 2008, 6:18:11 PM11/24/08
to Django users
hi

as mentioned earlyer today i am very new to django and againe have
some question, this time reguarding the documentation.

I started django by duing the tutorial, and now i started building my
own little project from ground up :) but i am lacking of information.
I am missing some documentation, some good organised api.

E.g. i want to implement AUTH_PROFILE_MODULE to store additional infos
on the user. The documentation from http://docs.djangoproject.com says
"define that in settings.py and in your model and use it via
get_profile" But no one tells you that you have to create it by
yourself and save it also. Ok this is something you can try out but
the information would be placed good on the doc side.

Also i'd like to implement groups in my app. The only infomation on
the site is, that you can use groups and all users of one group have
the permissions of the group. Thats all. There is no description on
how/where to specify groups, how to create then, how to add users to
one group ... I'l have to find everything by myself on google..

Can anyone give me some link to one good documentation or do there
exist good books which cover issue's completly so you don't have to
search most time while learning?

_tia

Brian Neal

unread,
Nov 24, 2008, 7:38:21 PM11/24/08
to Django users
On Nov 24, 5:18 pm, ReneMarxis <rene.mar...@yahoo.de> wrote:
> hi
>
> as mentioned earlyer today i am very new to django and againe have
> some question, this time reguarding the documentation.
>
> I started django by duing the tutorial, and now i started building my
> own little project from ground up :) but i am lacking of information.
> I am missing some documentation, some good organised api.
>
> E.g. i want to implement AUTH_PROFILE_MODULE to store additional infos
> on the user. The documentation fromhttp://docs.djangoproject.comsays
> "define that in settings.py and in your model and use it via
> get_profile" But no one tells you that you have to create it by
> yourself and save it also. Ok this is something you can try out but
> the information would be placed good on the doc side.

http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users
http://www.djangobook.com/en/1.0/chapter12/#cn222

>
> Can anyone give me some link to one good documentation or do there
> exist good books which cover issue's completly so you don't have to
> search most time while learning?

Searching is part of the process of learning.

Steve Phillips

unread,
Nov 24, 2008, 9:04:37 PM11/24/08
to django...@googlegroups.com
I too was in your position. I am fairly new to Django and was getting
very frustrated with the docs. They tell me to just do something and
left it at that. I then went to the django docs on the djangoproject
website and discovered that everything I needed was there. I was just
searching the wrong places. Give the IRC chat logs a look. Search
through them. It's almost a guarantee that what you are doing has
already been done and someone already asked for help on it. I
practically never ask for help anymore unless I am truly stuck.

Steve

ReneMarxis

unread,
Nov 25, 2008, 9:44:08 AM11/25/08
to Django users
Hello Brian

i allready saw those hints on the djangoproject/djangobook homepage
and that was the reason i was writing this post.
Imagine i am new to django, i read "i have to add those lines to my
model and do some stuff on the setting.py file and run syncdb" then
everything is ok and i can use get_profile to load the profile .
I did that but running get_profile raises exceptions. I took quite a
bit to realize that the profile does not get generated automaticly
(checked in db table) but you have to create it by yourself.
I mean its just one sentense more but it would save many searching on
the web.

Also take a look on the groups:

"
Groups

Groups are a generic way of categorizing users so you can apply
permissions, or some other label, to those users. A user can belong to
any number of groups.

A user in a group automatically has the permissions granted to that
group. For example, if the group Site editors has the permission
can_edit_home_page, any user in that group will have that permission.

Beyond permissions, groups are a convenient way to categorize users to
give them some label, or extended functionality. For example, you
could create a group 'Special users', and you could write code that
could, say, give them access to a members-only portion of your site,
or send them members-only e-mail messages.
"

Now try to use this infomation. The documentation should point out,
that i have to create the groups with the Admin, that i have to add
the users in the Admin to those groups. It should also tell me if/how
i can add/remove users to group by code? Or creating the groups by
running syncdb (probably i have to use some dumpload)
What i want to say is that the provided infomation is not realy
usefull for someone begining django. I have to read the docs and then
start searching on the web to figure out how to use the functionality.
Thats what seems insufficient to me. And this are only 2 aspects i
wrote down as a example.

Now i just ordered 2 Books on Django and one on Python :) Hope they
will cover functions more complete.

PS: http://djangoapi.quamquam.org/trunk/

_thanks


On 25 Nov., 01:38, Brian Neal <bgn...@gmail.com> wrote:
> On Nov 24, 5:18 pm, ReneMarxis <rene.mar...@yahoo.de> wrote:
>
> > hi
>
> > as mentioned earlyer today i am very new to django and againe have
> > some question, this time reguarding the documentation.
>
> > I started django by duing the tutorial, and now i started building my
> > own little project from ground up :) but i am lacking of information.
> > I am missing some documentation, some good organised api.
>
> > E.g. i want to implement AUTH_PROFILE_MODULE to store additional infos
> > on the user. The documentation fromhttp://docs.djangoproject.comsays
> > "define that in settings.py and in your model and use it via
> > get_profile" But no one tells you that you have to create it by
> > yourself and save it also. Ok this is something you can try out but
> > the information would be placed good on the doc side.
>
> http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-...http://www.djangobook.com/en/1.0/chapter12/#cn222

Brian Neal

unread,
Nov 25, 2008, 9:58:56 AM11/25/08
to Django users
On Nov 25, 8:44 am, ReneMarxis <rene.mar...@yahoo.de> wrote:
> Hello Brian
>
> i allready saw those hints on the djangoproject/djangobook homepage
> and that was the reason i was writing this post.
> Imagine i am new to django, i read "i have to add those lines to my
> model and do some stuff on the setting.py file and run syncdb" then
> everything is ok and i can use get_profile to load the profile .
> I did that but running get_profile raises exceptions. I took quite a
> bit to realize that the profile does not get generated automaticly
> (checked in db table) but you have to create it by yourself.
> I mean its just one sentense more but it would save many searching on
> the web.
>

Well, if you worked through the tutorial you should know that you need
to run syncdb after creating a new model. Your user profile is a model
after all and it needs to reside in your database for get_profile to
work. To be honest, it seemed to me your post was a thinly disguised
jab at the docs. We all feel the way you do at first, that everything
is hard to find. But if you keep reading the docs and studying other
people's source code (check out all the django apps on
code.google.com), you'll get the hang of this.

I realize we all learn differently and at our own pace. I think that
the django docs are some of the most well written and comprehensive
docs I have seen for an open source web framework. Seriously. Have you
ever looked at another frameworks docs? If you find the docs lacking
on some point, write a Trac ticket. The developers are very responsive
to documentation requests in my one single experience. They understand
the value of good docs.

I also encourage you to get on the IRC channel. You can get fast
pointers from experts that way if you are stuck.

And finally, don't forget the actual django source code. Learning how
to navigate it and find things in it is very useful. If you are
confused about the docs, take a peek at the code. You will also learn
something about python that way.

Enjoy your experience with django!
Reply all
Reply to author
Forward
0 new messages