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
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.
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
--~--~-~--~~~---
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
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
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,
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
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
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 [
... 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
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
--~--~
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
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
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
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
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
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
--~--~-~--~~~---~--~-
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
--~--~-~--~~---
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
--~--~-~--~~
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
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
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
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
--~--~-
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
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
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
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
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
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
>
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
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
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)
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
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
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
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
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
-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
')
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
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,
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
',)
==
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 "/
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
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
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
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
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.
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
--~--~-~--~
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
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
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
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
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
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
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
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
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
use ['Kansas','Illinois'], but it does not work :(
so, how can i create a simple list?
thanks,
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
59 matches
Mail list logo