Re: Learn DJango first, then learn Pinax; or just learn Pinax straight-off?

2011-09-18 Thread 邓超
I suggest learn django first

2011/9/17 Alec Taylor 

> Good afternoon,
>
> I plan on using Pinax for a project I'm doing (releasing project under
> New BSD or similar).
>
> My Learning Plan is as follows:
> 1. https://docs.djangoproject.com/en/dev//intro/tutorial01/
> https://docs.djangoproject.com/en/dev//intro/tutorial02/
> https://docs.djangoproject.com/en/dev//intro/tutorial03/
> 2. http://pinaxproject.com/docs/dev/contributing/#getting-started
>
> My current Python skills are limited to PythonCGI only.
>
> Would you recommend I follow the aforementioned Learning Plan, or
> would you recommend a different method?
>
> Thanks for all suggestions,
>
> Alec Taylor
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Deng Chao

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Editing djangoproject Community RSS feed info

2011-09-18 Thread Russell Keith-Magee
On Mon, Sep 19, 2011 at 4:08 AM, Subhranath Chunder
 wrote:
> I just added my tech blog to
> the https://www.djangoproject.com/community/ page with feeds
> from http://scratch-blog.appspot.com/feed/rss/
> Can someone with admin privileges, please edit and change the title to
> 'Subhranath Chunder' from the current 'ScratchBlog - The Scratch Blog'.
> I had simply put the wrong info in there.

Done.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Editing djangoproject Community RSS feed info

2011-09-18 Thread Subhranath Chunder
I just added my tech blog to the https://www.djangoproject.com/community/ page
with feeds from http://scratch-blog.appspot.com/feed/rss/

Can someone with admin privileges, please edit and change the title to
'Subhranath Chunder' from the current 'ScratchBlog - The Scratch Blog'.
I had simply put the wrong info in there.

-- 
Thanks,
Subhranath Chunder.
www.subhranath.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: access fields value in template

2011-09-18 Thread Mjumbe Poe
Also, model_blocks is available from PyPI:

pip install django-model-blocks

On Sep 18, 2:33 am, Phang Mulianto  wrote:
> Thanks for the respons.
>
> i use the items function using
>
> {% for key, value in object.items %}
>    {{ value }} 
> {% endfor %}
>
> the problem now.. the field is not arranged like what i want.
>
> let say i want to display name, email, password, join in the table.
>
> how to achive this field arrangement in the ORM query.
>
> thanks
>
>
>
>
>
>
>
> On Sat, Sep 17, 2011 at 9:43 PM, dm03514  wrote:
> > You can access just the values by the values property,
> > {% for value in object.values %}
> > {{ value }}
> > {% endfor %}
>
> > On Sep 17, 4:33 am, Phang Mulianto  wrote:
> > > hi ..
>
> > > i have a pagination objects :
>
> > > in my view i got query and paginate it using this :
>
> > >       objects = paginator.page(page)
>
> > > then the objects goes into the view template.
> > > i can populate the field value using this template :
>
> > > {% for object in objects.object_list %}
> > > 
> > > {{ object.title }}
> > > {{ object.content }}
> > > {{ object.slug }} 
> > > {{ object.is_publish }} 
> > > {{ object.created_at }} 
> > > {{ object.updated_at }} 
> > >         {% endfor %}
>
> > > This solution give the field values of know field name, like title,
> > content,
> > > slug, etc...
>
> > > what i want to aim is to access the field value which is unknow, like say
> > it
> > > is different model .
> > > i want to use this template in any model i give the to the object_list
> > > variable.
>
> > > how to achieve this.
> > > i try this one :
> > > {% for x in object.items %}
> > > {{ x }}
> > > {% endfor %}
>
> > > The html result are in table like this :
> > > ('is_publish', True)('title', u'first day with django')('created_at',
> > > datetime.datetime(2011, 7, 10, 18, 6, 18))('updated_at',
> > > datetime.datetime(2011, 8, 23, 0, 26, 42))('content', u'Great
> > > start...progressing now...')('pk', 1L)('slug', u'first-day-django')
>
> > > but it show the field name and the field value. how i access the value of
> > > the field.
>
> > > i want to create a record list, but not a view template for each model,
> > but
> > > 1 template for every model.
>
> > > i hear the django table, but i want to do it my own way..
>
> > > anyone have suggestion.
>
> > > Thanks.
> > > Mulianto
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: access fields value in template

2011-09-18 Thread Mjumbe Poe
If I understand your question correctly, this is like the problem that
I was trying to solve with django-model-blocks (https://github.com/
mjumbewu/django-model-blocks/).  With model_blocks you'd put something
like this in your template:

{% load model_blocks %}

...
{{ object|as_detail_block }}
...

This would use a default template.  To use your own template for all
detail blocks you could create a template in your project at
'model_blocks/object_detail.html'.  The available variables are:
  - instance: the object itself
  - fields: a list of tuples (name, label, value, is_list, is_link)

If you want a list of items you could use:

{% load model_blocks %}

...
{{ object_list|as_list_block }}
...

This again uses a default template.  Just try it out to get an idea of
what it looks like.  For this one, override 'model_blocks/
object_list.html'.  The only variable that is guaranteed to be
available in the template is:
  - instance_list: the list of objects

I'd recommend just looping over the instances and generating
detail_blocks.  See
https://github.com/mjumbewu/django-model-blocks/blob/master/model_blocks/templates/model_blocks/object_list.html
for an example.

The documentation isn't the best at the moment, so if you have any
questions, feel free to ask.

- Mjumbe

On Sep 18, 2:33 am, Phang Mulianto  wrote:
> Thanks for the respons.
>
> i use the items function using
>
> {% for key, value in object.items %}
>    {{ value }} 
> {% endfor %}
>
> the problem now.. the field is not arranged like what i want.
>
> let say i want to display name, email, password, join in the table.
>
> how to achive this field arrangement in the ORM query.
>
> thanks
>
>
>
>
>
>
>
> On Sat, Sep 17, 2011 at 9:43 PM, dm03514  wrote:
> > You can access just the values by the values property,
> > {% for value in object.values %}
> > {{ value }}
> > {% endfor %}
>
> > On Sep 17, 4:33 am, Phang Mulianto  wrote:
> > > hi ..
>
> > > i have a pagination objects :
>
> > > in my view i got query and paginate it using this :
>
> > >       objects = paginator.page(page)
>
> > > then the objects goes into the view template.
> > > i can populate the field value using this template :
>
> > > {% for object in objects.object_list %}
> > > 
> > > {{ object.title }}
> > > {{ object.content }}
> > > {{ object.slug }} 
> > > {{ object.is_publish }} 
> > > {{ object.created_at }} 
> > > {{ object.updated_at }} 
> > >         {% endfor %}
>
> > > This solution give the field values of know field name, like title,
> > content,
> > > slug, etc...
>
> > > what i want to aim is to access the field value which is unknow, like say
> > it
> > > is different model .
> > > i want to use this template in any model i give the to the object_list
> > > variable.
>
> > > how to achieve this.
> > > i try this one :
> > > {% for x in object.items %}
> > > {{ x }}
> > > {% endfor %}
>
> > > The html result are in table like this :
> > > ('is_publish', True)('title', u'first day with django')('created_at',
> > > datetime.datetime(2011, 7, 10, 18, 6, 18))('updated_at',
> > > datetime.datetime(2011, 8, 23, 0, 26, 42))('content', u'Great
> > > start...progressing now...')('pk', 1L)('slug', u'first-day-django')
>
> > > but it show the field name and the field value. how i access the value of
> > > the field.
>
> > > i want to create a record list, but not a view template for each model,
> > but
> > > 1 template for every model.
>
> > > i hear the django table, but i want to do it my own way..
>
> > > anyone have suggestion.
>
> > > Thanks.
> > > Mulianto
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Full Time Freelance Python/Django Developer required

2011-09-18 Thread Farhan Ahmed
I am looking to hire full time, Work from home, Python/Django
developer for a USA based company.

Please contact me at farhan_ahme...@hotmail.com for further details.

Regards,

Farhan

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Admin coding guidelines order?

2011-09-18 Thread Micky Hulse
On Sat, Sep 17, 2011 at 7:14 PM, Micky Hulse  wrote:
> How's this for organization(?):

Bare bones example:



Note on comments:

Trying to follow similar guidelines for comments as found here:



I have always liked that style of "Section separators".

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: [Sharing] django-custom-auths

2011-09-18 Thread Subhranath Chunder
Added the Google+ authentication app to it.


On Wed, Aug 10, 2011 at 2:52 PM, Subhranath Chunder wrote:

> I was working on these django applications which simplifies the use of
> third-party logins for a django project without breaking any existing code.
>
> My concerns were:
> - No existing code breakage.
> - Easy integration with django's own authenication system API.
>
> This is a work in progress with perhaps no documentation as of now. So,
> I've included an entire django project itself for now, to check on it's
> working.
> Currently, the Facebook authentication system is fully functional (using
> the current OAuth2 based Graph API implementation).
>
> If anyone is interested to try it out, you can check
> https://github.com/subhranath/django-custom-auths
>
> Any suggestions for improvements are very welcome.
>
> Thanks,
> Subhranath Chunder.
>



-- 
Thanks,
Subhranath Chunder.
www.subhranath.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



[Share] Google+ and Django

2011-09-18 Thread Subhranath Chunder
Saw the Google+ API for developers released a couple of days back.

I've probably made the first attempt to integrate the Google+ with Django
authentication backend, in the form a pluggable Django app.
You can find the details in here:
http://scratch-blog.appspot.com/blog/2011/09/18/google-api-and-django-authentication-backend/
Or, to go directly to the project:
https://github.com/subhranath/django-custom-auths

-- 
Thanks,
Subhranath Chunder.
www.subhranath.com

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



get latest records for each group

2011-09-18 Thread Олег Корсак
Hi there. I have such SQL to fetch latest records for each group:
SELECT tp.id,tp.team_id,tp.player_id FROM (
SELECT tps.team_id,tps.player_id,MAX(tps.dt_from)
AS dt_from
FROM team_players tps
GROUP BY tps.team_id,tps.player_id
) AS tps
JOIN team_players tp ON(tp.dt_from=tps.dt_from AND
tp.team_id=tps.team_id AND tp.player_id=tps.player_id)

where dt_from is TIMESTAMP.
Is it possible to get the same result without using Raw SQL? thanks



signature.asc
Description: OpenPGP digital signature


Re: access fields value in template

2011-09-18 Thread Phang Mulianto
Thanks for the respons.

i use the items function using

{% for key, value in object.items %}
   {{ value }} 
{% endfor %}

the problem now.. the field is not arranged like what i want.

let say i want to display name, email, password, join in the table.

how to achive this field arrangement in the ORM query.

thanks


On Sat, Sep 17, 2011 at 9:43 PM, dm03514  wrote:

> You can access just the values by the values property,
> {% for value in object.values %}
> {{ value }}
> {% endfor %}
>
>
>
> On Sep 17, 4:33 am, Phang Mulianto  wrote:
> > hi ..
> >
> > i have a pagination objects :
> >
> > in my view i got query and paginate it using this :
> >
> >   objects = paginator.page(page)
> >
> > then the objects goes into the view template.
> > i can populate the field value using this template :
> >
> > {% for object in objects.object_list %}
> > 
> > {{ object.title }}
> > {{ object.content }}
> > {{ object.slug }} 
> > {{ object.is_publish }} 
> > {{ object.created_at }} 
> > {{ object.updated_at }} 
> > {% endfor %}
> >
> > This solution give the field values of know field name, like title,
> content,
> > slug, etc...
> >
> > what i want to aim is to access the field value which is unknow, like say
> it
> > is different model .
> > i want to use this template in any model i give the to the object_list
> > variable.
> >
> > how to achieve this.
> > i try this one :
> > {% for x in object.items %}
> > {{ x }}
> > {% endfor %}
> >
> > The html result are in table like this :
> > ('is_publish', True)('title', u'first day with django')('created_at',
> > datetime.datetime(2011, 7, 10, 18, 6, 18))('updated_at',
> > datetime.datetime(2011, 8, 23, 0, 26, 42))('content', u'Great
> > start...progressing now...')('pk', 1L)('slug', u'first-day-django')
> >
> > but it show the field name and the field value. how i access the value of
> > the field.
> >
> > i want to create a record list, but not a view template for each model,
> but
> > 1 template for every model.
> >
> > i hear the django table, but i want to do it my own way..
> >
> > anyone have suggestion.
> >
> > Thanks.
> > Mulianto
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Learn DJango first, then learn Pinax; or just learn Pinax straight-off?

2011-09-18 Thread Adnan Sadzak
You have some tutorials on http://showmedo.com/videotutorials/django
Also there is Python videos if You starting up.

Cheers,
Adnan

On Sun, Sep 18, 2011 at 7:48 AM, Alec Taylor  wrote:

> Also, quick tutorial question; are there a good set of video tutorials
> (i.e. on YouTube or metacafe) for DJango?
>
> /me finds the most resources he has at his disposal the quicker he
> learns
>
> On Sep 18, 3:43 pm, Alec Taylor  wrote:
> > Thanks Russ, I'll use that method.
> >
> > :]
> >
> > 2011/9/18 Aesha Umelmumenen :
> >
> >
> >
> >
> >
> > > On Sun, Sep 18, 2011 at 2:24 AM, Russell Keith-Magee
> > >  wrote:
> >
> > >> On Sat, Sep 17, 2011 at 3:17 PM, Alec Taylor 
> > >> wrote:
> > >> > Good afternoon,
> >
> > >> > I plan on using Pinax for a project I'm doing (releasing project
> under
> > >> > New BSD or similar).
> >
> > >> > My Learning Plan is as follows:
> > >> > 1.https://docs.djangoproject.com/en/dev//intro/tutorial01/
> > >> >https://docs.djangoproject.com/en/dev//intro/tutorial02/
> > >> >https://docs.djangoproject.com/en/dev//intro/tutorial03/
> > >> > 2.http://pinaxproject.com/docs/dev/contributing/#getting-started
> >
> > >> > My current Python skills are limited to PythonCGI only.
> >
> > >> > Would you recommend I follow the aforementioned Learning Plan, or
> > >> > would you recommend a different method?
> >
> > >> This sounds like a reasonable approach -- although I would:
> > >>  * Make sure you do Django's Tutorial 4 after Tutorial 3.
> > >>  * Use something other than the "how to contribute" guide to Pinax as
> > >> your introduction to Pinax.
> >
> > >> The thing to keep in mind through all of this is that Python, Django
> > >> and Pinax are all just layers built on top of each other. Python is a
> > >> language. Django is a library that uses that language. Pinax is a set
> > >> of specific Django apps and configuration guidelines that help in
> > >> using Django. Jumping straight in and learning Pinax from the start is
> > >> probably possible, but you'll miss a whole lot of valuable groundwork
> > >> along the way.
> >
> > >> Best of luck with your project!
> >
> > >> Yours,
> > >> Russ Magee %-)
> >
> > >> --
> > >> You received this message because you are subscribed to the Google
> Groups
> > >> "Django users" group.
> > >> To post to this group, send email to django-users@googlegroups.com.
> > >> To unsubscribe from this group, send email to
> > >> django-users+unsubscr...@googlegroups.com.
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/django-users?hl=en.
> >
> > > --
> > > Ããßã ÚÇÆÔÉ
> > > ÑÖí Çááå Úäí
> > > æÚä ÕÝæÇä ÇÈä ÇáãÚØá
> > > ÑÇÓáæäí Úáí ÈÑíÏ ãÌãæÚÉ ÑÖÇÚ ÇáßÈíÑ
> > > æáÅÑÓÇá ãÞÇáÇÊ Ãæ ÕæÑ Ãæ ÝíÏíæ Çáí åÐå ÇáãÌãæÚÉ¡ Þã ÈÅÑÓÇá ÈÑíÏ
> ÅáßÊÑæäí
> > > Åáì
> > > reda3_alkab...@googlegroups.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.