2008-3-24

22:57 DaveyJoe_
Magus-: Thanks, I really need to just look into newforms a bit more so that I can get my head around it!
22:57 axiak
wmealin1: (And I know it gets much harder, but then we just increase dimensions)
22:57 illsci
ok I found using firebug its setting the css with vTextField but if I grep for that "vTextField" that text doesn't appear in any of the templates...
22:57 Magus-
illsci: of course it doesn't
22:57 Magus-
the forms aren't in the templates
22:57 Magus-
the form html is from oldforms
22:57 illsci
where would you override that
22:57 wmealin1
axiak: I've already "solved" the problem, but its not generalised ( see http://code.google.com/p/junkcode-wade/source/b... )
22:58 axiak
wmealin1: no I understand
22:58 wmealin1
aye.
22:58 wmealin1 nods
22:58 axiak
but it sounds like it can be generalized using algebra
22:58 axiak
rather than a tree structure
22:58 wmealin1
ok.. i'll take a look into it.
22:58 Magus-
illsci: why would you?
22:58 wmealin1
i never thought of using that.
22:58 Magus-
illsci: if you want to change how the forms are styled, you should be overriding the css
22:58 Magus-
not the html
22:59 illsci
Magus-: I want certain text fields to be different sizes so more fit on the page
22:59 illsci
yeah tahts what I want to do
22:59 illsci
hmmm
22:59 Magus-
so do so
22:59 Magus-
you can identify unique textfields from the ids as well, of course
22:59 wmealin1
axiak: will let you know how it goes.. (reading up on http://en.wikipedia.org/wiki/Eigenvalue_algorithm now)
22:59 illsci
well it calls vTextField... so i was thinking I could change that to a different css setting like vMacAddress that I would create... and I would need to edit the html to change that
22:59 illsci
so i was looking for where it used vTextField
23:00 axiak
wmealin1: well now you got me intrigued...I'm gonna think about it for a little while :)
23:00 Magus-
yah, that's not happening, illsci
23:00 Magus-
you can't change the html generated for fields in oldforms, really
23:00 wmealin1
axiak: glad to be of service.
23:00 illsci
so how do I get it to use different css
23:00 axiak
wmealin1: ;)
23:01 Magus-
just copy the admin css to where you mapped it from and edit as you see fit
23:01 illsci
I dont want to modify all the forms that use vTextField
23:01 illsci
just one
23:01 Magus-
then edit that template to include another css file
23:01 illsci
well i could just add this css to the one its including now
23:02 illsci
but in the end dont i have to edit the html and tell it to use differen css
23:02 Magus-
not the form generated html, of course
23:02 Magus-
which is the entire point
23:02 Magus-
the normal templates you can edit just fine
23:03 illsci
yeah im not getting it.. yet
23:05 axiak
wmealin1: wait...I ran your example...how is the first step legal?
23:06 wmealin1
�� �� �� �� �� �� �� �� �� �� �� ��if jug1.current_volume == jug2.current_volume: ?
23:06 axiak
(7,9,0) -> (7,2,7)
23:07 axiak
I thought you have to fill the other jar?
23:07 wmealin1
that is pouring the second jar 9, into the third jar.. 7. 2 is left.
23:08 wmealin1
and not fill, both jug1 and jug2 must have the same volume
23:08 wmealin1
as the "finish" state
23:08 axiak
oh so the first step is (0, 0, 16) -> (7, 9, 0)...I didn't see that :)
23:08 wmealin1 checks his logic
23:08 wmealin1
ah, probably should move print status
23:08 axiak
it's okay
23:08 axiak
I just want to understand what's going on so that I can try to model it
23:09 wmealin1
i dont usually solve these kinds of problems, so this is pretty new to me.
23:10 axiak
ah, actually since we're actually looking for a path, I think a search algorithm is probably better for this...sigh
23:10 axiak
we can probably use Dijkstra's
23:12 axiak
wmealin1: you want the shortest path, right?
23:12 wmealin1
pretty much
23:12 axiak
wmealin1: is 16 steps for this problem the shortest?
23:12 wmealin1
i believe so.
23:12 Yuchant
Is there a way to loop through/use dictionaries returned by simple tags in the template engine? {% for item in ..... {% tag textfield_to_be_returned_as_dictionary %} basically.
23:14 axiak
wmealin1: so the way to think about this is an N-dimensional space, where N is the number of "jugs"
23:15 axiak
wmealin1: and there are only a few nodes in this space that you can go, so you have to find the minimum path in this space
23:15 Magus-
Yuchant: you cannot use a simple tag like that
23:15 wmealin1
so, we walk the tree ?
23:15 axiak
wmealin1: it's a graph, not a tree
23:16 wmealin1
sorry, walk the graph, you are correct.
23:16 Magus-
there, redirects in place for old blog article urls to the new location
23:16 axiak
wmealin1: and sort of .. Dijkstra's can do it in O(V^2) where V is the number of possible locations
23:17 truebosko
What can this mean. In my admin I'm trying to access my Profile section (I extended the user profile from settings.py etc) and I get this errror: coercing to Unicode: need string or buffer, User found
23:18 axiak
wmealin1: an example python implmentation: http://aspn.activestate.com/ASPN/Cookbook/Pytho...
23:18 wmealin1
axiak: my terminology is very aussie, you'll have to excuse that.. no pitchers here. ;)
23:18 axiak
(They have everything :))
23:19 wmealin1
neat.
23:21 axiak
wmealin1: btw, have you read http://orodruin.axiak.net/upload_handling.html ? :)
23:21 wmealin1
nice skin
23:21 axiak
haha
23:22 wmealin1 bookmarks that
23:22 Zal
Yuchant your tags can assign a new name in the template context, and later tags can refer to it.
23:22 axiak
wmealin1: maybe some day something like that will end up in django ;)
23:22 wmealin1
where would one get source code for said beast.
23:22 Zal
truebosko maybe it means that you defined __unicode__ to return self.user ?
23:23 axiak
which beast? 2070?
23:23 wmealin1
i assume that is how you are solving 2070
23:23 wmealin1
its in 2070 ?
23:23 truebosko
Zal - You're right .. and that fixed it, thanks
23:23 wmealin1 hunts
23:24 axiak
that's the framework that 2070 provides...a diff is available at http://repo.or.cz/w/fdr-django.git?a=commitdiff...
23:24 axiak
this will always be the most recent
23:24 axiak
even when I don't always post to #2070
23:24 DjangoBot
23:25 __machine
can i override or subclass something to make all Textarea widgets/fields strip leading and trailing white space when processing the form?
23:26 __machine
or should i override the save method on any models that have a Char field that will store multiline text and strip it prior to saving?
23:26 Yuchant
Zal later tags? will the template have to reload for them to be accessible?
23:26 wmealin1
sweet, well .. its starting time for work now, i'll let you know what I come up with.
23:27 axiak
wmealin1: awesome
23:27 axiak
wmealin1: it's very much like the word game, right?
23:27 axiak
:)
23:27 wmealin1
very much so
Page 32 of 33   ← Previous  Next →(3,252 total)