2009-7-22

23:21 kthakore
hi ya ppl!
23:21 kyrix
yeah, me talking to myself
23:21 kyrix
ojii: that was for u
23:22 kyrix
hi k.
23:22 kyrix
ojii: and webfaction is slightly cheaper. just depends on your individual needs though
23:23 ojii
kyrix, doesn't look like enough ram does it?
23:23 kthakore
ummm ... I was playing around with django and I had a weird idea. Has anyone used django with pygame ?
23:23 kyrix
ojii: its almost like a vps. thats the ram you have available to you.
23:23 mattmcc
kthakore: Doesn't seem like a particularly useful combination.
23:24 kyrix
ojii: i mean, almost like a vps in funcionality. ram: thats the ram that is available to you. on a vps you have your apps + operating system
23:24 brenbren
Any simple way to make a django contact forum?
23:24 ojii
well too late now kyrix
23:24 kyrix
ojii: hehe. next time :D
23:24 kyrix
ojii: installing django on webfaction is almost 1 click :p
23:25 ojii
kyrix, django wasn't the problem, not at all
23:25 kthakore
23:25 kthakore
where the django sits on pygame and twisted instead of web code?
23:26 mattmcc
kthakore: But why? :)
23:26 mattmcc
What does Django contribute to that?
23:26 kthakore
mattmcc: Quicker game development
23:26 kthakore
mattc oh django doesn;t do that
23:26 mattmcc
Which part of Django makes that quicker?
23:27 kthakore
mattmcc, I do I am just wondering if anyone has tried doing something like this for django
23:27 kyrix
mattmcc: probably to go where no man has gone before. great ideas come out of boredom sometimes
23:27 kthakore
kyrix, exactly.
23:27 mattmcc
I guess it's been awhile since I was that bored.
23:27 ojii
anyone here a mod_rewrite god??
23:28 ojii
oops that's one question mark too much
23:28 kyrix
talking about boredom, i was in the bathtub and was thinking about a site called wikimodels
23:28 kthakore
mattmcc : work for a bank parsing text files in abap and perl and oracle
23:28 kyrix
where you type in Car, and you get a standard Car Model definition that you could use dynamically.
23:28 kthakore
ojii, no one is a mod_rewrite god
23:29 kthakore
kyrix omg thats brilliant
23:29 cx42net_
mattmc : what would be the best maneer ? because I ran though templatetags, wrapped generic views, etc :p
23:29 ojii
well kthakore in my definitions a mod_rewrite god can do the very basics of mod_rewrite within 48 hours
23:29 kthakore
ojii definatly not me
23:29 ojii
dammit
23:29 kyrix
whats a mod? whats rewrite? ;)
23:29 andym
cx42net_: generic views are ok and fine, by 90% of the time i through them out after the first prototype, don't get too wound up about trying to use them all the time
23:30 [530]
ojii: ask a question instead :)
23:30 andym
god i must be out of it s/by/but, s/through/throw
23:30 t3mp3st
I'm interacting with a model via a form; this interaction alters the underlying database but also performs a bunch of validation. I'd like to do this interaction after clean() has been called (in my form's save() method) but I don't know how to do pre-validate that the model's method will work. Is there a standard practice for doing this?
23:30 kthakore
so back to the question I had has anyone use or twisted django for something other then web apps?
23:30 cx42net_
maybe add a class in my model that return the correct i18n_profile from profile ? something like : p = Profile.objects.get(pk=1) and p.get_i18n_profile() taht return the correct profile regarding to the context (that contain the current language)
23:30 cx42net_
Is that would be a way to achieve my goals ?
23:31 t3mp3st
i.e., should my model have "validate_action()" and "commit_action()" where commit_action does no validation?
23:31 ojii
okay what i want: lets say someone calls my site www.mysite.com/blah. i want mod_rewrite to check if blah is a subfolder of /my/folder/ and if yes send the user there, if not it should call my wsgi script
23:33 kthakore
ps mattmcc: this is where I had this idea come from http://osdir.com/ml/DjangoUsers/2009-07/msg0012...
23:33 [530]
ojii: in the DocumentRoot?
23:34 kyrix
of course, that would be wikimodel v1. wikimodels version two, would also come with prepopulated data, and then ill write the part of django where model data can reside anywhere on the web, and then... ahh. :) i guess im happy i managed that aggregate :D
23:34 ojii
[530], at the moment i have a WSGIScriptAlias to / but i want to change that to DocumentRoot and then via mod_rewrite or whatever method split all incoming requests to either those files or to the wsgi file.
23:34 mattmcc
kthakore: Sure, I run console Django scripts all the time, to interact with models.
23:35 mattmcc
kthakore: I'm still not sure how Django would be of use to a pygame app.
23:35 ojii
the folder and the wsgi file are not in the same directory tho, could be move if really necessary tho
23:35 kyrix
anybody here a bored geodjango freak?
23:35 [530]
ojii: that really would be best
23:36 ojii
okay [530] lets say those things are all in the same folder, how would i do that?
23:36 t3mp3st
simpler fundmental django question: should model method's do validation? or should validation occur in the associated forms?
23:37 kyrix
t3mp3st: well, you could argue both :D
23:37 mattmcc
t3mp3st: At the moment, models don't do validation. That's a GSoC project.
23:38 mattmcc
t3mp3st: So presently, the question is: If you did put validation in your model, how would you deal with invalid data?
23:38 mattmcc
Unless you have a good answer for that, you're probably better off using forms to validate.
23:38 kthakore
mattmcc: imagine making controllers, model django style with the views and events handle by pygame
23:39 t3mp3st
mattmcc: I've been tempted to put the logic in the forms -- alas, I'm concerned that in the future I'll want to interact with my models via a different interface
23:39 mattmcc
kthakore: But you're talking about two fundamentally different event models.
23:39 t3mp3st
mattmcc: the trouble is that the operation and the validation occur in parallel -- (do step 1; validate result; if good, do step 2; validate... etc)
23:39 kthakore
mattmcc: hence the mediator pattern from the above link
23:39 mattmcc
kthakore: I still don't see the benefit.
23:40 mattmcc
It sounds like a solution looking for a problem.
23:40 kthakore
mattmcc: exactly ... : P .
23:40 t3mp3st
essentially, I'm not sure if it would be better to swallow my pride and have the model method's be naive (no validation) and assume interaction will always use the form; or, to split model method into validate/commit variants
23:41 kthakore
mattmc: let me get back with a proof of concept.
23:41 t3mp3st
mattmcc: i realize this is a totally unfair question :P but I was hoping you might be willing to point me in one direction or the other
23:41 mattmcc
t3mp3st: At the moment, if you want to validate data, I'd just make sure interactions with models (Which involve writing data) go through forms.
23:41 andym
t3mp3st: do it in the forms or use another framework ;0
23:42 kthakore
mattmcc, my question then is where can I read about django's event models.
23:42 mattmcc
t3mp3st: I wouldn't want to spend time with the other approach, knowing what's coming down the line anyway.
23:42 t3mp3st
andym/mattmcc: thank you :D... sometimes I need a little bit of hand holding ;)
23:42 shivraj_
I put my static files in apache /var/www under apache and changed my media url to http://localhost:80/static/ but it doesnt work from another computer on the local area network, what do I set MEDIA_ROOT to ?
23:42 mattmcc
kthakore: This would be a good read for that: http://www.b-list.org/weblog/2006/jun/13/how-dj...
23:42 cx42net_
mattmcc: thanks for your help, I appreciate. Now it's 1.40 am, I'm going to bed, I'll try to figure it out tomorrow how to achieve my problem !
23:43 kthakore
mattmcc: Thanks
23:45 SmileyChris
shivraj_: of course another computer won't see http://localhost:80/static
23:46 shivraj_
aghh .. ok
23:46 SmileyChris
shivraj_: set MEDIA_URL to either http://yourhostname/static or http://[yourip]/static
23:46 ojii
[530], do you know how i mod_rewrite to a wsgi script? is that even possible?
23:46 SmileyChris
shivraj_ ... with a trailing / of course
23:47 djbpython
anyone have experience with pinax?
23:49 shivraj_
SmileyChris: yes, I get it, just need to work on this thing from a laptop ... thanks
23:51 [530]
ojii: not directly, but you can redirect to a url that is served using the wsgi, so easier if you have the wsgi served at different "dir"
23:52 djbpython
I've come to the conclusion, there isn't a public drop in blog app for django
23:52 [530]
23:53 ojii
yea just found one as well [530] , also you can redirect to wsgi
23:53 ojii
but you need to AddHandler on that directory
23:54 ojii
only problem i have left is that / shows an index and not the index of the wsgi script
23:56 [530]
ojii: i'm no expert at mod rewrite but can you dpaste the config?
23:57 SmileyChris
djbpython: http://byteflow.su/docs/index.html doesn't look bad
23:57 ojii
nvm [530] got it :D
Page 33 of 33   ← Previous  (3,298 total)