Re: Non-unicode strings.

2006-09-20 Thread gabor
ect. create a class that wraps around the model instance, and does the unicode-conversion for you. something like: == class UnicodeProxy(object): def __init__(self,model): self._model = model def __getattr__(

how do you name the 'main' app?

2006-09-20 Thread gabor
'? seems as a particularly ugly solution. so, how do you name your 'main' app in a django-project? gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: HTTP response-code for missing querystring?

2006-09-22 Thread gabor
not hierarchic. imagine that you want to show a form, and you would like to prefill some of it's fields... one way is to do something like: http://bla.com/forms/[EMAIL PROTECTED]&urgent=1 how would you propose to do this without query-strings? gabor > > Corey >

Re: Need help understanding Custom Views

2006-09-29 Thread gabor
a php page, then you will probably do something like: def get_php_data(request) { connection = urllib2.urlopen('http://the.web.service/url') data = connection.read() connection.close() //here you process your data, and generate a httpResponse object. return

Re: HTTPS protocol

2006-09-29 Thread gabor
... and everything > else.?? > best regards, > Petru. i think those are nothing django-specific. you have to look up how to do that with the webserver of your choice (apache, lighttpd, whatever). django does not have to do anything special regard

Re: Manipulators problem -- anyone? please help!

2006-10-05 Thread gabor
could you also post your view code? gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this gr

Re: Django + views like a threads

2006-10-14 Thread gabor
eads (depends on your webserver + configuration), so it does not have to be handled on the django-level. gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

Re: reading RSS feeds

2006-10-15 Thread gabor
ron-job to fetch them every hour), and store them in the database, and then in the view, read them from the database, construct the response and show it. (alternatively you can take #1, and simply use the caching framework). to parse the rss/atom i would recommend this: http://f

custom-query or redundant-data, which is worse? :)

2006-10-16 Thread gabor
happen with any non-native-sql db-api. thanks, gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscri

Re: how to tell if django is running from apache or standalone?

2006-11-16 Thread gabor
EBUG variable help you? simply set it to False on the live system (i assume the mod_python one), and to True on the devel system... gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group

Re: Will django work with Apache 1.3 and FastCGI?

2006-11-17 Thread gabor
walterbyrd wrote: > I know that django requires Apache 2.X when using mod_python. But, what > about if using FastCGI? > yes, django does work with apache 1.3 and fastcgi. gabor --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: svg template

2006-11-17 Thread gabor
VG generating view (also no experience in doing this :), the other approach woould be to do the XML-manipulation using an xml library, like ElementTree, and simply return the serialized xml file using django. but as i said, no experience in it :) gabor --~--~-~--~~~--

date-based generic-views + paginate?

2006-05-04 Thread gabor
ny ideas how to solve this? the only idea i have is to write a small wrapper view function that would extract the date-based stuff from the URL, and then call the list-based generic-view directly (using a suitable queryset). any better idea?

slug as primary key: any reason why not?

2006-05-09 Thread gabor
pothetical situations) to put the question differently: are you usually setting primary_key = True when using Slugs? gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: slug as primary key: any reason why not?

2006-05-09 Thread gabor
Tom Tobin wrote: > On 5/9/06, gabor <[EMAIL PROTECTED]> wrote: >> are there any scenarios when it's not a good idea to have [Slugs] as >> primary keys? (except some hypothetical situations) > > The short answer: it's always a *bad* idea. > > The slight

manytomany-relation with extra-data

2006-05-13 Thread gabor
ilter(relations1__person2__name__exact = 'bla') unfortunately does not work :-( generally, what is the best approach for these situations? thanks, gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

add the same fields to all my models: inheritance?

2006-05-14 Thread gabor
-inheritance does not work anymore (since magic-removal). so, is everyone just cut&paste-ing all this stuff into every model? gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: multi-auth branch

2006-05-16 Thread gabor
Joseph Kocherhans wrote: > On 5/16/06, Douglas Campos <[EMAIL PROTECTED]> wrote: >> the multi-auth branch targets some kind of 100% external auth? because >> i've seen some approach using ldap+django users > > I'm not sure what you mean by "100% external" but the backends that > get used are cont

going crazy: foreignkey-reverse-lookup: tests work,my code fails

2006-05-16 Thread gabor
jects.get(poll__question__exact="What's the first question?") Traceback (most recent call last): File "", line 1, in ? File "/Users/gabor/src/django/django/db/models/manager.py", line 66, in get return self.get_query_set().get(*args, **kwargs) File "

Re: going crazy: foreignkey-reverse-lookup: tests work,my code fails

2006-05-16 Thread gabor
gabor wrote: > > for example, with the reverse_lookup test models, this query fails: > > >>> User.objects.get(poll__question__exact="What's the first question?") > Traceback (most recent call last): > File "", line 1, in ? >Fi

Re: No Model Inheritance in Magic-Removal?

2006-05-30 Thread gabor
parent class? if yes, then probably the join-approach is better, if not, then probably the collapse-into-one-table approach is more suitable. gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&qu

Re: Tips for integrate pyLucene in django?

2006-06-08 Thread gabor
that fine with multiple processes (GIL) what about creating a (multithreaded) indexing/searching server in python, and query it from your django app using http? gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: Tips for integrate pyLucene in django?

2006-06-09 Thread gabor
became a simply __contains search in the Index. of course this might become slow when the amount of data increases, and does not allow any "cool" searches, like phonetic or fuzzy searches. but for now it worked, was easy to code and did not need any hea

Re: Subclassing in Trunk

2006-06-11 Thread gabor
; >> if i may ask... are you doing it with table-joins? > > Yes. > >> if yes... won't be there a performance penalty every time i want to >> access a field defined in the parent model? > < snip /> > I am choosing to do thing

Re: FastCGI watcher?

2006-06-14 Thread gabor
ng script of this kind? Or is it some kind of thing > that a decent admin can eat for breakfast every day? :-) no idea :-( the ones i saw on the net were of that kind (http://poocs.net/files/watch-listener.rb) gabor --~--~-~--~~~---~--~~ You received this m

Re: going crazy: foreignkey-reverse-lookup: tests work,my code fails

2006-06-14 Thread gabor
ns with my own scripts. if i am running the django app using the development server, both kind of imports work ok. gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: POST to view loses POST data

2006-06-18 Thread gabor
(). i understand that even currently you can do it with request.META['REQUEST_METHOD'], but it's too long and ugly. and because of that it does not look like the recommended approach. gabor --~--~-~--~~~---~--~~ You received this message becau

Re: Wanted: Screencast showing how to setup a real-world Django site at WebFaction

2006-06-28 Thread gabor
ew clicks. > I hope the new screencast will be in some format playable in linux ;) > > the mov-version can be played fine using mplayer. gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Django & Apache 1.x

2006-07-05 Thread gabor
PythonistL wrote: > Gabor, > what trafic do you have at your website and what server configuration > do you use? I am asking that because you use FastCGI and I had big > problems with FastCGI when there was highload.So I decided to move to > mod_python and no problem since >

Re: Django vs TurboGears

2006-07-30 Thread gabor
t; * Autogenerated admin interface is more advanced than the Turbogears > one. (Last I checked.) Still, you will have to write your own > eventually. and the project's name is MUCH cooler :-) gabor --~--~-~--~~~---~--~~ You received this message beca

Re: Is AJAX Alone Reason to Use TG?`

2006-08-02 Thread gabor
eate a webapp with django, there is a RECOMMENDED configuration with a RECOMMENDED urlconf, a RECOMMENDED templating system and a RECOMMENDED orm. which i will surely use, and only plug in something else if the default/recommended components are not enough. the same way i would like to see a &quo

show many2many data as comma-separated-text. fast/optimal solution?

2006-08-04 Thread gabor
#x27;s not possible (afaik) to ask in the page template for certain value in the dictionary. means i cannot do {{ user_roles.{{ user.id }} }} . or can i? as i said, this seems to be a common situation. how do you approach this problem? gabor --~--~-~--~~~---~--~

order_with_respect_to : explanation?

2006-08-10 Thread gabor
hi, i've read the documentation, i checked the group-archives, but still... i just cannot understand what that setting does. could someone explain it to me? thanks, gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: Django 0.95 on Dreamhost

2006-08-14 Thread gabor
rver: missing FastCGI param SERVER_PROTOCOL required by WSGI! > Status: 200 OK > Content-Type: text/plain > that's ok when you start it from the command-line. i know this sounds stupid, but could you start from the beginning again, and try it

Re: display related objects in admin

2006-08-20 Thread gabor
ommend. If it doesn't come out > looking that great, can't you just change the formatting, by, for > example using a different character rather than a semi-colon? I guess > I don't see the problem... > the only "problem" might be that you (original poster) are

Re: Unicode, unicode, more unicode

2006-08-27 Thread gabor
sorry, i don't know how to set up MySQL. in case of postres, the only thing is to create the db with the correct encoding ("createdb -E utf8"). i assume it's the same for mysql. gabor --~--~-~--~~~---~--~~ You received this message becau

foreignKey + manipulator...performance problem

2006-08-30 Thread gabor
me is to completely bypass the manipulator, but the object with which i work is quite complex, and i'd rather not do that. any ideas? gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group

Re: Django deployment tools?

2006-08-31 Thread gabor
sh bla' calls? or did you do something completely different? gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.co

Re: foreignKey + manipulator...performance problem, SOLVED

2006-09-01 Thread gabor
'm not sure if i agree with the idea of having raw_id_admin=True by default (hmmm..maybe i do... i don't know), but i definitively think that this flag should be mentioned in a more "frequently read" place than the model_api docs... maybe in the tutorials even. gabor --~--~-

Re: mod_python - Using Apache prefork Vs Apache worker

2006-09-05 Thread gabor
afe. and i don't know if django is thread-safe or not (i think it's not). also, when doing multithreaded python applications, the GIL (python's global interpreter lock) might become an issue. so, i'd recommend, that if you have enough memory, use the prefork MPM. gabor --~

Re: Need help getting Python code into Django App

2006-09-05 Thread gabor
rite custom managers? Are my functions (on a > specific model) accessible via an object? Do I need to write custom > views? I love the generic views...do I need to just extend those? > > Help a newb out. =) > hi, could you show us maybe some examples? gabor --~--~-~--

Re: Dojo Editor2 invocation from Django

2006-09-06 Thread gabor
ad-dialog to django? (or you simply used php or something like that?) gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegro

Re: mod_python - Using Apache prefork Vs Apache worker

2006-09-07 Thread gabor
Graham Dumpleton wrote: > gabor wrote: >> Filipe wrote: >>> Hi, >>> >>> The docs say [1] that: >>> "Django requires Apache 2.x and mod_python 3.x, and you should use >>> Apache's prefork MPM, as opposed to the worker MPM." >

Re: non-cascading delete?

2006-09-12 Thread gabor
e)"? and when cascading is set to false, we would only (try to) delete the given object, and leave it to the caller to handle the potential error. for me, this would completely solve my problem. also, in your own model classes, you can simply overri

admin-view, password-md5 problem

2005-12-27 Thread gabor
ormal enter-password-twice dialog,and then populate the password_md5 with it...:-)) thanks, gabor -- Flexibility is overrated Constraints are liberating -- David Heinemeier Hansson, Secrets behind Ruby on Rails

Re: admin-view, password-md5 problem

2005-12-30 Thread gabor
d-twice-and-show-it-using-stars interface. btw. i ended up with doing a new view for handling users, but that was because of other aspects (we wanted to present the "admin" user with a simplified user-management interface). gabor > On 28 Dec 2005, at 7:56, Burhan wrote: > > &g

permission without a model?

2006-01-11 Thread gabor
hi, i'd like to create a permission with is not related to any model object. is there a way to create such permission? for now i'm just adding them to a model object, but that's a little ugly :( gabor

unordered_list... explanation?

2006-01-18 Thread gabor
wanted to create a simple flat list. i thought i can use ['Kansas','Illinois'], but it does not work :( so, how can i create a simple list? thanks, gabor

Re: unordered_list... explanation?

2006-01-18 Thread gabor
Luke Plant wrote: On Wed, 18 Jan 2006 21:22:29 +0100 gabor wrote: i'm trying to use the unordered_list filter, with little success :( i tried the provided example ( ['States', [['Kansas', [['Lawrence', []], ['Topeka', [, ['Illinois'

Re: Some thoughts about slug and slugify

2006-01-27 Thread gabor
odule to decompose the strings accented characters into separate character and accent-mark characters. then he goes through the string, and only takes the characters that are normal characters. please note that it's 1:38AM here, so my code can be very wrong :) (but it works :)...and it's clearly not optimized for speed :) gabor

using the devel-webserver for production?

2006-02-20 Thread gabor
nd then try a fastcgi setup? i'd like to keep the config as simple as possible for now. thanks, gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Re: using the devel-webserver for production?

2006-02-20 Thread gabor
Jacob Kaplan-Moss wrote: > On Feb 20, 2006, at 3:28 PM, gabor wrote: >> 1. except that it was not meant for that, are there any fundamental >> problems with the "runserver"-webserver? > > Using runserver in production is like driving your car on a spare > ti

only show something(form) if javascript-enabled

2006-02-20 Thread gabor
ebpage (or the whole webpage) if javascript is enabled? i know about but i need the opposite :) p.s: for all who want to send me a reply that i shouldn't rely on client side validation. i know :) gabor --~--~-~--~~~---~--~~ You received this message b

admin-logout + opera8.52?

2006-02-21 Thread gabor
hi, is there anyone using opera8? because for me it seems that i am unable to log out using opera8.* from the admin interface. so before i start digging deeper...does anyone else has this problem? thanks, gabor --~--~-~--~~~---~--~~ You received this message

Re: only show something(form) if javascript-enabled

2006-02-21 Thread gabor
ttached. yes, it's quite ugly :) ps2: i'm only overriding when the user is not superuser. superusers get the "standard" user-manager page. best regards, gabor farkas --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: only show something(form) if javascript-enabled

2006-02-21 Thread gabor
Jason F. McBrayer wrote: > On Tue, 2006-02-21 at 23:52 +0100, gabor wrote: > >> i wanted to have in the user-manager form a way to do the normal >> password-thing (2 password fields, check if they are equal, and so on). >> >> so, i created a page-template, put it

Re: Django in Boo

2006-03-05 Thread gabor
> it can catch a lot of errors, especially in big projects. > >>> def f(y): ... x = y * 3 ... return x + y ... >>> f(5) 20 >>> f('_django_') '_django__django__django__django_' >>> you know...this whole 'static typing&#x

Re: Django + fastCGI + bluehost

2006-04-09 Thread gabor
at the beginning? (it seems that you either buy a 12month subscription for 7.95$/month, or a 24month one for 6.95$/month) thanks, gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Re: Django vs Rails

2006-04-13 Thread gabor
point of the gui? yes, i had to work for some time with zope, and right now i think i enjoy much more the "thin" approach that django chose. p.s: of course, i'm not bashing zope there. it's a different architecture, with different goals. and django's approach suits me

Re: "fake"/custom Package/ContentType. is it dangerous?

2006-04-18 Thread gabor
e "yellow" status messages (request.user.add_message), and the LogEntry objects. are there any better approaches? gabor is there perhaps a better way? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

found solution: opera + django-admin

2006-04-23 Thread gabor
te. if you also have a non-admin part, you probably do not want to forbid caching for that part. read the docs, there you can find info about how to specify the cache-settings more precisely. gabor --~--~-~--~~~---~--~~ You received this message because you are su

Re: found solution: opera + django-admin

2006-04-23 Thread gabor
Jan Claeys wrote: > Op zo, 23-04-2006 te 18:37 +0200, schreef gabor: >> so when one clicks on the logout link, it's simply not submitted. > [...] >> i don't know what's the correct behavior from the http point of view >> (if a page does not specify an

Re: Non English characters in URL

2006-05-01 Thread gabor
it's not possible, and my advice did not help, please describe to us: - the charset you use in the URL - which browser - an actual example (an url that exhibits the problem) gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Non English characters in URL

2006-05-01 Thread gabor
James Bennett wrote: > On 5/1/06, gabor <[EMAIL PROTECTED]> wrote: >> but then it also depends on the browser, for example firefox >> (intentionally) does not display them correctly... > > Actually, in this case there are multiple "correct" ways to display &

No module named parts.media.photos ?

2006-05-03 Thread gabor
= if you open the 'object list' view of this in the admin-interface, you get this error: === Traceback (most recent call last): File "/Users/gabor/src/django_src/django/template/__init__.py" in render_node 68

how to automatically call an additional function on saving a model?

2009-02-15 Thread Gabor Nyers
Hi all, I'm learning Django (and for that matter Python) for 2 weeks now and bumped into a problem I've been struggling with a few days. Apologies if it's obvious, but I've been looking at the Django documentation for 2 days now. It might be there, but in that case I think I keep missing it. Ca

How to integrate @etag(etag_func) decorator for a view

2021-02-08 Thread Gabor Cristian
Hello, I am currently developing a system to block users from updating a form data in case another user is also updating the same data at the same time. My application uses REST API's with DRF and I choose to use django-rest-framework-condition