Friday, 2014-08-22

*** tpb has joined #melange00:00
Robert_Smadrazr: Do you have an example of loading a user object that works?  When I'm doing it, I'm getting errors, even if I call user() on a profile00:15
Robert_SBadValueError: Property status is 1L; must be one of ['valid', 'invalid']00:17
madrazrRobert_S: For user entities use NDB API. User model is an NDB model now00:38
madrazrRobert_S: example of fetching an entity is : User.get_by_id("<username>")00:38
madrazrwhere User is imported as from melange.models.user import User00:39
*** Abhishek_ has joined #melange00:45
Robert_Smadrazr:00:45
Robert_Swhat's username supposed to be?00:46
Robert_S>>> User00:47
Robert_S<class 'soc.models.user.User'>00:47
Robert_S>>> User.get_by_id("carols")00:47
Robert_SBadArgumentError: Expected an instance or iterable of (<type 'int'>, <type 'long'>); received carols (a str).00:47
madrazrRobert_S: Username is what the users choose when they create their account on Melange00:51
madrazrRobert_S: historically it has also been known as link_id00:51
Robert_SI thought that was a profile attribute.00:51
madrazrso you may be see those two terms being used interchangeably00:51
madrazrRobert_S: we replicate it00:51
madrazrRobert_S: but it is unique to the User entity00:52
madrazrRobert_S: each profile will have a copy of the value00:52
Robert_Sget_by_id wants an int.00:52
madrazrRobert_S: also btw your User class is pointing to an obsolete DB API based User model00:52
madrazrRobert_S: you should import from melange.models.user import User00:52
Robert_SAha.00:53
Robert_SWhy is soc.models.user still around?00:53
madrazrRobert_S: NDB migration is a W.I.P.00:53
Robert_SI thought it was being done a type at a time00:53
madrazrRobert_S: we haven't made really that far to remove DB API model definitions00:54
madrazrjust in case00:54
madrazrRobert_S: correct00:54
*** asmeurer_ has quit IRC00:54
Robert_SOk, so just the cleanup isn't done.  If I remember, I'll drop a OBSOLETE note in that file.00:54
madrazrRobert_S: new NDB models corresponding to old DB models are being introduced one by one00:54
madrazrbut we are not removing the old models yet00:54
madrazrrather, we haven't00:54
madrazrRobert_S: it is not just about cleanup in code00:55
madrazrRobert_S: there is also data00:55
madrazrRobert_S: which is the hesitation behind deleting the model definitions00:55
* Robert_S nods.00:55
Robert_SHence just putting a big comment in the code.00:56
madrazrRobert_S: for sure, please add that note in the files00:56
madrazrit will be useful00:56
madrazrRobert_S: yeah, definitely. +1 for that00:56
madrazrRobert_S: I am wondering if we can have a common way to throw a warning everytime it is accessed00:56
madrazrRobert_S: shouldn't be hard00:56
madrazrwe can wrap all the accesses on the model into __getattr__ magic I guess, which in prints a warning00:57
* Robert_S nods.01:01
Robert_Sr.host_for.append(ndb.Key('GSoCProgram', 'google/gsoc2014'))01:01
Robert_SYay!01:01
Robert_SMaybe that wasn't worth it, but I learned useful things.01:03
Robert_SI will eventually get the hang of this.01:05
*** asmeurer has joined #melange01:05
madrazrRobert_S: yeah, for sure01:09
madrazrRobert_S: also, I think it is useful to know how to do this01:10
Robert_SIt definitely is.01:10
*** meflin has quit IRC01:21
*** meflin has joined #melange01:23
*** meflin has quit IRC01:31
*** meflin has joined #melange01:32
*** meflin has quit IRC01:59
*** meflin has joined #melange02:00
*** ArneBab has joined #melange02:05
*** meflin_ has joined #melange02:06
*** meflin has quit IRC02:06
*** ArneBab_ has quit IRC02:08
*** meflin_ has quit IRC02:16
*** meflin__ has joined #melange02:17
*** tkamppeter has quit IRC02:20
*** tkamppeter has joined #melange02:23
*** meflin__ has quit IRC02:49
*** Gentlecat has quit IRC03:32
*** saurabhsood91 has quit IRC04:11
*** asmeurer has quit IRC04:35
*** madrazr has quit IRC05:45
*** Abhishek_ has quit IRC06:50
*** Abhishek_ has joined #melange07:12
*** suranga has quit IRC07:31
*** AnujSharma has joined #melange07:46
*** samgtr has joined #melange08:18
*** madrazr has joined #melange08:21
*** ChanServ sets mode: +o madrazr08:21
*** rocker has quit IRC08:26
*** AnujSharma has quit IRC08:54
*** Darrel has quit IRC09:18
*** Darrel has joined #melange09:18
*** Gentlecat has joined #melange09:40
*** Darrel has quit IRC09:46
*** Darrel has joined #melange09:48
*** penguinRaider has quit IRC10:01
*** penguinRaider has joined #melange10:18
*** rocker has joined #melange10:29
*** samgtr has quit IRC10:46
*** mang0 has joined #melange10:58
*** mang0 has joined #melange10:58
*** mang0 has quit IRC11:03
*** mang0 has joined #melange11:04
*** mang0 has joined #melange11:04
*** madrazr has quit IRC11:16
*** Abhishek_ has quit IRC11:30
*** Abhishek_ has joined #melange11:46
*** penguinRaider has quit IRC11:47
*** rocker has quit IRC11:47
*** AnujSharma has joined #melange11:49
*** penguinRaider has joined #melange12:03
*** rocker has joined #melange12:03
*** karanp has joined #melange12:37
*** saurabhsood91 has joined #melange13:28
*** suranga has joined #melange13:48
*** carols has joined #melange14:03
*** samgtr has joined #melange14:14
*** AnujSharma has quit IRC14:14
*** Abhishek_ has quit IRC14:20
*** asmeurer has joined #melange14:56
*** asmeurer has quit IRC14:57
*** AnujSharma has joined #melange15:07
*** AnujSharma has quit IRC15:19
*** meflin__ has joined #melange15:21
*** AnujSharma has joined #melange16:01
*** Abhishek_ has joined #melange16:01
*** Slurpee has joined #melange16:15
SlurpeeHow does one edit documentation in Melange? <- (org admin with recently finished students available to help update info)16:16
*** meflin__ has left #melange16:16
*** cs_shadow has joined #melange16:17
*** rocker has quit IRC16:19
*** AnujSharma has quit IRC16:23
*** samgtr has quit IRC16:26
*** rocker has joined #melange16:45
*** samgtr has joined #melange16:52
*** AnujSharma has joined #melange16:52
*** AnujSharma has quit IRC17:13
*** AnujSharma has joined #melange17:32
*** saurabhsood91 has quit IRC17:38
*** saurabhsood91 has joined #melange17:39
*** saurabhsood91 has joined #melange17:39
*** Slurpee has quit IRC17:55
*** asmeurer has joined #melange18:00
*** robbyoconnor has quit IRC18:03
*** asmeurer has quit IRC18:05
Robert_SSlurpee: You're gone, but if you come back, please be more specific about which documentation.18:18
*** rigelk has joined #melange18:24
*** shikher has joined #melange18:40
*** shikher has quit IRC18:41
*** samgtr has quit IRC19:06
*** karanp has left #melange19:14
*** robbyoconnor has joined #melange19:15
*** samgtr has joined #melange19:24
*** AnujSharma has quit IRC19:24
*** asmeurer has joined #melange19:25
*** robbyoconnor has quit IRC19:28
*** robbyoconnor has joined #melange19:28
*** Abhishek_ has quit IRC19:30
*** robbyoconnor has quit IRC19:30
*** madrazr has joined #melange19:44
*** ChanServ sets mode: +o madrazr19:44
*** hammad_ has joined #melange19:52
*** carols has quit IRC20:11
*** carols has joined #melange20:14
*** carols has quit IRC20:49
*** cs_shadow is now known as cs_shadow|afk21:20
*** samgtr has quit IRC21:36
*** rigelk has quit IRC21:39
*** rigelk has joined #melange21:57
*** hammad_ has quit IRC22:22
*** asmeurer has joined #melange22:46
*** asmeurer has quit IRC22:49
*** asmeurer has joined #melange22:53
*** asmeurer has quit IRC23:19
*** asmeurer has joined #melange23:21

Generated by irclog2html.py 2.12.1 by Marius Gedminas - find it at mg.pov.lt!