Ahik | 1 Sep 04:58 2009
Picon

[pyweb-il:380] View this page "PyWeb-IL 7"


Slides from the interesting presentations are now in this page.

Thanks to Zvi and Idan.

See you all in the 8th meeting.

Click on http://groups.google.com/group/pyweb-il/web/pyweb-il-7 - or
copy & paste it into your browser's address bar if that doesn't work.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PyWeb-IL" group.
To post to this group, send email to pyweb-il <at> googlegroups.com
To unsubscribe from this group, send email to pyweb-il+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/pyweb-il?hl=en
-~----------~----~----~----~------~----~------~--~---

_______________________________________________
Python-il mailing list
Python-il <at> hamakor.org.il
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
Meir Kriheli | 1 Sep 09:38 2009
Picon

[pyweb-il:381] Re: View this page "PyWeb-IL 7"


On 09/01/2009 05:58 AM, Ahik wrote:
> 
> Slides from the interesting presentations are now in this page.
> 
> Thanks to Zvi and Idan.
> 
> See you all in the 8th meeting.

I've summarized 1.1's release in Hebrew at whatsup:

http://whatsup.org.il/article/6461

Should it be added to the page ?

Cheers
--
Meir Kriheli

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PyWeb-IL" group.
To post to this group, send email to pyweb-il <at> googlegroups.com
To unsubscribe from this group, send email to pyweb-il+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/pyweb-il?hl=en
-~----------~----~----~----~------~----~------~--~---

_______________________________________________
Python-il mailing list
Python-il <at> hamakor.org.il
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
(Continue reading)

Ahik Man | 1 Sep 09:41 2009
Picon

[pyweb-il:382] Re: View this page "PyWeb-IL 7"

Sure, why not?
Ahik

On Tue, Sep 1, 2009 at 10:38 AM, Meir Kriheli <meir <at> mksoft.co.il> wrote:

On 09/01/2009 05:58 AM, Ahik wrote:
>
> Slides from the interesting presentations are now in this page.
>
> Thanks to Zvi and Idan.
>
> See you all in the 8th meeting.

I've summarized 1.1's release in Hebrew at whatsup:

http://whatsup.org.il/article/6461

Should it be added to the page ?

Cheers
--
Meir Kriheli




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PyWeb-IL" group.
To post to this group, send email to pyweb-il <at> googlegroups.com
To unsubscribe from this group, send email to pyweb-il+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/pyweb-il?hl=en
-~----------~----~----~----~------~----~------~--~---

_______________________________________________
Python-il mailing list
Python-il <at> hamakor.org.il
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
Meir Kriheli | 1 Sep 10:38 2009
Picon

[pyweb-il:383] View this page "PyWeb-IL 7"


Added Link to 1.1 Release in Hebrew

Click on http://groups.google.com/group/pyweb-il/web/pyweb-il-7 - or
copy & paste it into your browser's address bar if that doesn't work.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PyWeb-IL" group.
To post to this group, send email to pyweb-il <at> googlegroups.com
To unsubscribe from this group, send email to pyweb-il+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/pyweb-il?hl=en
-~----------~----~----~----~------~----~------~--~---

_______________________________________________
Python-il mailing list
Python-il <at> hamakor.org.il
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
ofri raviv | 1 Sep 11:23 2009
Picon

[pyweb-il:384] a question re pluggable apps

Hi,

I have a question about pluggable apps design:  many times, you'd like a new app to add some fields to the basic models you already have. for example, if I have a users app, and i want to add karma (everything good you do on the site gives you good karma points, when you post, when your posts are voted up, etc). it doesn't really matter how the karma app works, in the end, it has to add a karma field to the user model that is already defined in another app.

the solution seems to be, add another model, UserKarma, that has
user = models.OneToOneField(User, primary_key=True, related_name='karma')

and then we can use user.karma.foo to access the fields that karma app added.

is that a good solution? how is it performance-wise compared to just adding the fields to User?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PyWeb-IL" group.
To post to this group, send email to pyweb-il <at> googlegroups.com
To unsubscribe from this group, send email to pyweb-il+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/pyweb-il?hl=en
-~----------~----~----~----~------~----~------~--~---

_______________________________________________
Python-il mailing list
Python-il <at> hamakor.org.il
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
Idan Gazit | 1 Sep 11:49 2009

[pyweb-il:385] Re: a question re pluggable apps

Ofri,

There's an officially-sanctioned way to do it which is not far from  
what you suggest. It's in the docs, too:

http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users

The short of it is have one model which stores the "extended user  
profile data", with:

user = models.ForeignKey(User, unique=True)

And then in settings.py have AUTH_PROFILE_MODULE =  
'myapp.mymodule.MySuperProfileModel'

If you have any user object, you can do user.get_profile() and it will  
return the related instance of your extended profile model.

There's also an older post by James Bennett on the subject, but it  
predates this "official" way so don't get confused.

-I

On Sep 1, 2009, at 12:23 PM, ofri raviv wrote:

> Hi,
>
> I have a question about pluggable apps design:  many times, you'd  
> like a new app to add some fields to the basic models you already  
> have. for example, if I have a users app, and i want to add karma  
> (everything good you do on the site gives you good karma points,  
> when you post, when your posts are voted up, etc). it doesn't really  
> matter how the karma app works, in the end, it has to add a karma  
> field to the user model that is already defined in another app.
>
> the solution seems to be, add another model, UserKarma, that has
> user = models.OneToOneField(User, primary_key=True,  
> related_name='karma')
>
> and then we can use user.karma.foo to access the fields that karma  
> app added.
>
> is that a good solution? how is it performance-wise compared to just  
> adding the fields to User?
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google  
> Groups "PyWeb-IL" group.
> To post to this group, send email to pyweb-il <at> googlegroups.com
> To unsubscribe from this group, send email to pyweb-il+unsubscribe <at> googlegroups.com
> For more options, visit this group at http://groups.google.com/group/pyweb-il?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

Attachment (smime.p7s): application/pkcs7-signature, 3263 bytes
_______________________________________________
Python-il mailing list
Python-il <at> hamakor.org.il
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
Idan Gazit | 1 Sep 11:53 2009

[pyweb-il:386] Re: a question re pluggable apps

Ah, just re-read your question and realized it was slightly different.

For reusable apps, I guess o2o field might be the best solution.  
Subclassing User is not a good idea for a reusable app because you  
might be stepping on the toes of another app.

-I

On Sep 1, 2009, at 12:23 PM, ofri raviv wrote:

> Hi,
>
> I have a question about pluggable apps design:  many times, you'd  
> like a new app to add some fields to the basic models you already  
> have. for example, if I have a users app, and i want to add karma  
> (everything good you do on the site gives you good karma points,  
> when you post, when your posts are voted up, etc). it doesn't really  
> matter how the karma app works, in the end, it has to add a karma  
> field to the user model that is already defined in another app.
>
> the solution seems to be, add another model, UserKarma, that has
> user = models.OneToOneField(User, primary_key=True,  
> related_name='karma')
>
> and then we can use user.karma.foo to access the fields that karma  
> app added.
>
> is that a good solution? how is it performance-wise compared to just  
> adding the fields to User?
>
> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google  
> Groups "PyWeb-IL" group.
> To post to this group, send email to pyweb-il <at> googlegroups.com
> To unsubscribe from this group, send email to pyweb-il+unsubscribe <at> googlegroups.com
> For more options, visit this group at http://groups.google.com/group/pyweb-il?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

Attachment (smime.p7s): application/pkcs7-signature, 3263 bytes
_______________________________________________
Python-il mailing list
Python-il <at> hamakor.org.il
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
Idan Gazit | 1 Sep 12:04 2009

[pyweb-il:387] Talks for PyWeb 8?

If there's interest, I'd be happy to give a talk on piston or celery  
for the next PyWeb.

-I
Attachment (smime.p7s): application/pkcs7-signature, 3263 bytes
_______________________________________________
Python-il mailing list
Python-il <at> hamakor.org.il
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
Alex Arshavski | 1 Sep 12:43 2009
Picon

[pyweb-il:388] Re: Talks for PyWeb 8?

We would like to hear both. :)

Alex A.

On Tue, Sep 1, 2009 at 1:04 PM, Idan Gazit <idan <at> pixane.com> wrote:
If there's interest, I'd be happy to give a talk on piston or celery for the next PyWeb.

-I


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PyWeb-IL" group.
To post to this group, send email to pyweb-il <at> googlegroups.com
To unsubscribe from this group, send email to pyweb-il+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/pyweb-il?hl=en
-~----------~----~----~----~------~----~------~--~---

_______________________________________________
Python-il mailing list
Python-il <at> hamakor.org.il
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
Itay Donenhirsch | 1 Sep 13:29 2009
Picon

[pyweb-il:389] Re: a question re pluggable apps


hi there,
is this the accustomed way of extending models? i mean, if I write an
app that needs to be "plugged into" another app's table, does it
usually adds a field to the other app's model or does it do the o2o
thingy?
thanks
itay

On Tue, Sep 1, 2009 at 12:53 PM, Idan Gazit<idan <at> pixane.com> wrote:
> Ah, just re-read your question and realized it was slightly different.
>
> For reusable apps, I guess o2o field might be the best solution. Subclassing
> User is not a good idea for a reusable app because you might be stepping on
> the toes of another app.
>
> -I
>
> On Sep 1, 2009, at 12:23 PM, ofri raviv wrote:
>
>> Hi,
>>
>> I have a question about pluggable apps design:  many times, you'd like a
>> new app to add some fields to the basic models you already have. for
>> example, if I have a users app, and i want to add karma (everything good you
>> do on the site gives you good karma points, when you post, when your posts
>> are voted up, etc). it doesn't really matter how the karma app works, in the
>> end, it has to add a karma field to the user model that is already defined
>> in another app.
>>
>> the solution seems to be, add another model, UserKarma, that has
>> user = models.OneToOneField(User, primary_key=True, related_name='karma')
>>
>> and then we can use user.karma.foo to access the fields that karma app
>> added.
>>
>> is that a good solution? how is it performance-wise compared to just
>> adding the fields to User?
>>
>> >>
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PyWeb-IL" group.
To post to this group, send email to pyweb-il <at> googlegroups.com
To unsubscribe from this group, send email to pyweb-il+unsubscribe <at> googlegroups.com
For more options, visit this group at http://groups.google.com/group/pyweb-il?hl=en
-~----------~----~----~----~------~----~------~--~---

_______________________________________________
Python-il mailing list
Python-il <at> hamakor.org.il
http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il

Gmane