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

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.

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 --~--~-~--~~~---

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 s

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

2006-11-16 Thread gabor
ble 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. To post

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

2006-10-16 Thread gabor
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 unsubscribe from this group,

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

Re: Django + views like a threads

2006-10-14 Thread gabor
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, send email to dja

Re: Manipulators problem -- anyone? please help!

2006-10-05 Thread gabor
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 group, send email to [

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: Need help understanding Custom Views

2006-09-29 Thread gabor
ike: 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 response } does this help? gabor --~--~

Re: HTTP response-code for missing querystring?

2006-09-22 Thread gabor
ot 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]=1 how would you propose to do this without query-strings? gabor > > Corey > > On Sep 22, 2006, at 9:2

how do you name the 'main' app?

2006-09-20 Thread gabor
ution. 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 group, send email to django-users@googlegroups.com

Re: Non-unicode strings.

2006-09-20 Thread gabor
del instance, and does the unicode-conversion for you. something like: == class UnicodeProxy(object): def __init__(self,model): self._model = model def __getattr__(self,name): return getattr(_model,nam

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." &g

Re: Dojo Editor2 invocation from Django

2006-09-06 Thread gabor
pload-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: Need help getting Python code into Django App

2006-09-05 Thread gabor
ions (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: mod_python - Using Apache prefork Vs Apache worker

2006-09-05 Thread gabor
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: foreignKey + manipulator...performance problem, SOLVED

2006-09-01 Thread gabor
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: Django deployment tools?

2006-08-31 Thread gabor
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.com To unsubscribe fro

foreignKey + manipulator...performance problem

2006-08-30 Thread gabor
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. To post to this group, send email

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 because you are

Re: display related objects in admin

2006-08-20 Thread gabor
hat 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 doing a db-query for every Comittee object. gabor --~--~-

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 exact

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 Google

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

2006-08-04 Thread gabor
ik) 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 --~--~-~--~~~---~--~~ You received this messa

Re: Is AJAX Alone Reason to Use TG?`

2006-08-02 Thread gabor
s 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 "recommended" javascript libr

Re: Django vs TurboGears

2006-07-30 Thread gabor
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 because you are subscribed to the Google Gro

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: 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: POST to view loses POST data

2006-06-18 Thread gabor
t 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 because you are subscribed to the Google Groups "Django users" g

Re: Subclassing in Trunk

2006-06-11 Thread gabor
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 things > in the most natural (to me)

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: No Model Inheritance in Magic-Removal?

2006-05-30 Thread gabor
s, 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" group. To post

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 ? >File &q

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 "/User

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

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 all this stuff into every model? gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

manytomany-relation with extra-data

2006-05-13 Thread gabor
') 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 users" group. To post to this group, send email to dj

slug as primary key: any reason why not?

2006-05-09 Thread gabor
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 group,

date-based generic-views + paginate?

2006-05-04 Thread gabor
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? thanks, gabor

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 688. result = node.render(context) File "/

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 displ

Re: Non English characters in URL

2006-05-01 Thread gabor
y 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 the Google Groups "Djang

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 any cache-sett

found solution: opera + django-admin

2006-04-23 Thread gabor
o 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 subscribed to

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

2006-04-18 Thread gabor
us 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 "Django users" group.

Re: Django vs Rails

2006-04-13 Thread gabor
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 better. that's all. gabor --~--~-~--~

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" gro

Re: Django in Boo

2006-03-05 Thread gabor
f 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' thing is a little a double-edged sword, isn't

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

2006-02-21 Thread gabor
uite 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 to the Google Groups "Dja

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

only show something(form) if javascript-enabled

2006-02-20 Thread gabor
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 because you are

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

using the devel-webserver for production?

2006-02-20 Thread gabor
en 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 group, sen

Re: Some thoughts about slug and slugify

2006-01-27 Thread gabor
o 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

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', [ ), and it works, but i am unable to understand

unordered_list... explanation?

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

admin-view, password-md5 problem

2005-12-27 Thread gabor
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