2009-7-5

21:19 Gulopine
it doesn't mean all that much, no
21:19 lauren_
k
21:19 mattmcc
lauren_: It means there are more Rails books than Django books, and nothing more.
21:19 Gulopine
it mostly means, as david said, that rails has been around longer
21:19 davidcramer
Rails is a much more mature framework
21:19 mib_mib
lauren_: djangobook
21:19 sjl
davidcramer: here's the code in my template http://dpaste.com/63524/
21:19 lauren_
i hope it doesn't mean Rails can grow faster cuz of the support available
21:19 Gulopine
i would doubt that
21:19 davidcramer
sjl: honestly I ran into the issue of trying to make my own things like that so I wrote that template filter for anything else I write custom widgets
21:19 mattmcc
lauren_: No, it doesn't mean anything beyond what you already said.
21:19 Gulopine
you'd be surprised at the quality of the django books available ;)
21:20 lauren_
k :)
21:20 davidcramer
sjl: it puts lots of classes/wrappers so it was easy to style things or hook them with JS
21:20 mattmcc
lauren_: Quantity isn't quality, nor does it speak in any meaningful way to the community or the project.
21:20 lauren_
mattmcc: true
21:20 sjl
davidcramer: Yeah, for the most part what I'm doing works perfectly but the initial data is what I'm getting hung up on. I was hoping there was a simple solution
21:21 Gulopine
unfortunately, though, there are some large organizations that use the availability of published books as an indication of the maturity of a project
21:21 Gulopine
and thus the sheer number of books on something can, sometimes, impact its adoption
21:21 davidcramer
sjl: ya IMO the data access needs standardized
21:21 Gulopine
but that's not very common, and not good practice anyway
21:21 davidcramer
because you honestly dont see a difference between initial and current, you usually are only caring about current, which can be initial (but its not setup that way)
21:21 mattmcc
Well, there's not much we can do about poor decision making skills in organizations.
21:22 Gulopine
true
21:22 marcooliva
hello
21:22 sjl
davidcramer: Yep. On the first round current should == initial, subsequent rounds current should == data
21:22 axelis
mattmcc http://dpaste.com/63523/ (i have removed some unnecessary code but the required parts are there) , the point is that if on my render_to_response i pass 'form" : form , it renderes the original data , but with "form": fc (where fc the cleaned data )it doesnt work )
21:23 sjl
I guess I could pass an additional "has_been_submitted" variable to the form through the view (because the view knows when it's the Nth go-round) and decide on initial/data based on that...
21:23 sjl
s/to the form/to the template/
21:24 sjl
That seems kind of ugly though
21:24 mattmcc
axelis: There's a pattern to form processing established in the docs to address this.
21:24 marcooliva
In ubuntu hardy with django 0.96. i have the problem -> http://pastebin.com/d1ab2ccd when i go to the http://127.0.0.1:8000/admin/ . Help, please.
21:25 davidcramer
sjl: it is ugly, and im not quite sure if Im just not educated on the manner, but its one of my biggest complaints with the form libs
21:25 axelis
mattmcc , i am not quite sure i understand what you mean , there is an example in the documentary on how to solve this ?
21:25 mattmcc
21:25 dwsBeta2
marcooliva: did you do a syncdb after adding sessions?
21:26 mattmcc
marcooliva: If at all possible, you should stop using 0.96.
21:26 marcooliva
dwsBeta2: Yes. i run python manage.py syncdb
21:26 marcooliva
mattmcc: But ubuntu hardy only have this version.
21:27 mattmcc
marcooliva: Ignore it, install a newer version by hand.
21:27 axelis
matmcc , but i dont want to send an empty form , i need to send the cleaned_data back
21:27 mattmcc
You do not want to be starting a new project with 0.96.
21:28 mattmcc
axelis: Wait, you want to redisplay the form if it _is_ valid?
21:28 davidcramer
i hate how ubuntu requires an entire os upgrade just to get new software :)
21:28 hylje
you can install new software from 3rd party sources just fine
21:28 davidcramer
yes but through aptitude
21:28 brendoli
my network connection is terrible... did my message get through?
21:28 davidcramer
which managing non-deb packages = a pita on many servers
21:28 mattmcc
davidcramer: Not unlike any other OS..
21:28 marcooliva
gnewsense only have the main and universe repos
21:29 davidcramer
mattmcc: not quite, i just dont see a reaso they cant upgrade say 2 year old ubuntu repos with new versions of django for eample
21:29 brendoli
did anyone see my previous (long) message? if not, i repost
21:30 mattmcc
davidcramer: It'd be unrealistic from a support perspective.
21:30 davidcramer
brendoli: just repost
21:30 brendoli
Hey, I'm designing my portfolio website on top of Django. There are two sections at the moment...The front page, and the portfolio page. The front page has a completely different layout (only same colors) than the portfolio section of the site. What is the best way to handle the different styles? Should I write two separate style sheets? Should I set the different style sheets as variables in Django and pass them in as template tags? A
21:30 davidcramer
mattmcc: why? justmake sure dependancies are available in the repo if they are then a package should be able to update
21:30 mattmcc
davidcramer: You fall into the RedHat trap of "I'm running RHEL4" not meaning anything, because it could be RHEL4+all sorts of errata.
21:30 davidcramer
i mean they obviously allow updates
21:30 davidcramer
but i dont get where the line is drawn
21:31 ericholscher
security updates
21:31 mattmcc
In Debian, the line is drawn quite simply; no new packages that add more than security updates.
21:31 mattmcc
Otherwise you can't promise your customer base that a particular version of your OS is functionally stable.
21:31 davidcramer
ya, i figured, and i ahte it :)
21:31 mattmcc
It's a good thing. Critical, even, if you expect to be providing a product that people can depend upon.
21:31 davidcramer
or at least make a apt-get upgrade-my-effing-os-for-me
21:32 mattmcc
Upgrades between Ubuntu versions tend to be a one-click affair.
21:32 davidcramer
(on that note, i have no idea how upgrades work)
21:32 davidcramer
we have a server admin for that, but its always hours of downtime
21:33 ubernostrum
Debian and Debian-based systems have dist-upgrade for that.
21:33 ericholscher
davidcramer, use gentoo then
21:33 ubernostrum
Point your source list at the new repo, do a dist-upgrade, you're done.
21:33 mattmcc
If you have hours of downtime, it's probably due to other matters.
21:34 axelis
mattmcc , on my form validating , for specific fields (example the user giving me a huge integer) , instead of raising a forms.ValidationError , i am setting the number to another value , i want to be able to send those values back to be redisplayed to the user , i need to know if i can send the form.cleaned_data back to the user ,
21:34 ubernostrum
Of course, you still want to stage that and do QA before deploying to a production setting, but at least the process of installing the new packages is fairly simple.
21:35 mattmcc
axelis: I would still use validation. You can tell your form's clean function to both raise an error and change the value.
21:35 axelis
how can i tell the form to change the value ?
21:35 axelis
and display that value to the user
21:35 axelis
(i can do it by making a new form and setting initial={} but i am looking for something else)
21:36 davidcramer
ok anyone who suggested lxml, loving it ;)
21:36 axelis
i don't want to raise an error , just to be able to send the cleaned_data back to the user
21:37 mattmcc
As a prepopulated form.
21:37 tie
davidcramer: suprisingly enough, I was getting better results with lxml compared to BS too
21:38 davidcramer
i plan to see if i cant simply extend its objectify method so the class returned has a bunch of simple accessors for the common rss/atom nodes
21:38 axelis
So you mean like i said to set initial={} ?
21:52 mib_mib
in a form, someone puts in a URL - on this URL i want to validate some stuff, so I fetch the html and look through it. If it is valid, later, I want to do stuff with the html. WHere is the best place to validate the URL? Also, if i do this in clean_url method, then how do I pass the HTML to the view?
21:53 mib_mib
(does this make sense?)
21:54 mib_mib
I was thinking about validating in the clean_url method, but how do I pass the newly gotten html to the view from this clean method?
21:56 carlocci
mib_mib, I'm not quite sure whether I understood you correctly, but you can access the cleaned data in dictionary form through yourforminstance.cleaned_data
21:56 rozwell
mib_mib: that's not really the right place to do such a thing unless the html is part of the validation
21:57 mib_mib
rozwell: right - well, what i am doing is parsing out an rss feed href from the html, the URL is only valid if it contains an rss feed tag
21:57 mib_mib
what is the best way to do this then?
21:59 mib_mib
carlocci: right - i was thinking about creating a hidden input widget, and then setting this value in one of the clean methods, and then overriding the main clean method so that it didn't screw up the html input...
22:01 mib_mib
i guess i can use some ajax then to do that instead
22:06 davidcramer
30 minutes and and my RSS/Atom parser is already a huge step up over feedparser, haha
22:07 jlilly
davidcramer: I suppose what you're measuring steps in.
22:07 jlilly
*it depends on
22:07 davidcramer
jlilly: trust me ;)
22:08 jlilly
there are likely a lot of edge cases your's doesn't cover, and while that isn't likely something you're worried about, is kinda nice for a general purpose library.
22:08 davidcramer
its just wrapping the output of lxml.objectify
22:08 davidcramer
basically grabs the feed type, and returns a proper handler which returns different things for diff tags
Page 10 of 11   ← Previous  Next →(1,085 total)