Re: Trivial view sometimes fails in Chrome

2011-10-11 Thread Pigletto
> > Honestly I don't have any experience with Django and AJAX Yet. Just in > case you haven't checked it out yet -- I've read you've got to submit > the CSRF with your calls though. Not sure if that helps at all. Good > luck! Thanks for the tip but I've switched CSRF off. I've just noticed

Trivial view sometimes fails in Chrome

2011-10-11 Thread Pigletto
and in WSGI environment (I've checked with uWSGI and Cherokee, Django 1.3 and trunk). Example application that exposes the problem: https://bitbucket.org/pigletto/chrometest/src Live version of this application at: http://chrometest.natcam.pl (clicking first button sometimes fails in Chrome

Re: Your IDE of choice

2009-01-06 Thread Pigletto
> I really like PyScripterhttp://pyscripter.googlepages.com/, its very > fast and has many, many features. Interesting but Windows only... -- Maciej Wisniowski --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Your IDE of choice

2009-01-06 Thread Pigletto
> What is your favorite IDE for coding Django projects? Netbeans -> see http://wiki.netbeans.org/Python > Any ideas about PyDev and ActiveState Komodo IDE? PyDev uses Eclipse so you must be prepared for huge amount of hangups, strange exceptions, lost workspaces, unpredictable behaviour etc.

Re: "Segmentation Fault" (mod_python) and "incomplete headers (0 bytes)..." (FastCGI)

2008-11-19 Thread Pigletto
> Sometimes pages load well but sometimes I get "Internal Server Error" > at the same URL. In this case I have to reload page once or twice to > load it properly. I'm using FastCGI and after fault I can see the > following message in the apache logs: > "[error] [client 127.0.0.1] FastCGI:

Re: caching queryset for filtering

2008-11-19 Thread Pigletto
If you need to work with trees then these projects might be worth looking at: http://code.google.com/p/django-treebeard/ http://code.google.com/p/django-mptt/ -- Maciej Wisniowski --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Non-Programmer Help: filter_insterface error?

2008-10-15 Thread Pigletto
> TypeError: __init__() got an unexpected keyword argument > 'filter_interface' > > Can someone please help me with this? The application you're trying to use is not compatible with latest django version. As you can see at:

Re: json

2008-09-24 Thread Pigletto
> does anyone have a very simple example of how to use json and jquery > to communicate between django and javascript. i'm trying to use > $.getJSON but getting confused what parameters to provide to it. docs > say > getJSON(url,data,func). well, func is my javascript function which > handles

Re: WebFaction memories

2008-05-29 Thread Pigletto
> Someone have some experiences to compile scipy and dependances on WebFaction > hosting ? For me, the biggest problem at Webfaction (but not only there) is limited memory size. But if you have so small traffic then 85 MB of memory should be enough, especially if you set up your django with

Re: Help with custom validator - please, please, please

2008-05-15 Thread Pigletto
On 15 Maj, 03:43, Brandon Taylor <[EMAIL PROTECTED]> wrote: > I saw this example in the > documentation:http://www.djangoproject.com/documentation/forms/#validators > > But where does this code live? Does this go into my models.py as a > subclass of my Model, or is it a separate file? Link

Re: Thread-safe or not?

2008-05-14 Thread Pigletto
> Yeah, I've read that paper -- it looks like an investigation, but it > seems to have no conclusion which could help me to make a right design > decision. (...) > I don't use any Django templating (Mako instead) -- should I still > avoid creating multiple threads in my Django instance? I think

Re: Thread-safe or not?

2008-05-14 Thread Pigletto
> > > What is the most up-to-date information about multithread safety in > > > Django? Is it a good idea to spawn several threads and use models from > > > there? You may take a look there: http://code.djangoproject.com/wiki/DjangoSpecifications/Core/Threading Recently I tried Apache in MPM

Re: mod_python vs. mod_wsgi

2008-05-11 Thread Pigletto
> Obviously be aware that in daemon mode you will still have multithread > issues to contend with if they run with multiple threads. To avoid it > you would need a config such as: > > ... processes=5 threads=1 > > Ie., use prefork model with mod_wgsi daemon mode. This isn't going to > get you

Re: mod_python vs. mod_wsgi

2008-05-09 Thread Pigletto
> If you mean compared to Apache prefork and mod_python then answer is > yes. Yes > Even without using mod_wsgi though, one can do better than prefork > with mod_python by using Apache worker MPM instead. Because Apache > worker MPM processes are multithreaded you don't need as many to be >

Re: mod_python vs. mod_wsgi

2008-05-08 Thread Pigletto
> The only thing that mod_wsgi would still give you through its daemon > mode is the ability to isolate WSGI applications into their own > processes so they do not interfere with each other. As I understand it > though, WebFaction has limits on the number of persistent processes > you have, thus

Re: YUI Autocomplete

2008-04-28 Thread Pigletto
> Dear all, > I'm trying to put YUI autocomplete in my form, following this > tutorial:http://www.djangosnippets.org/snippets/392/ I've slightly updated the snippet code but I can't check it now so if you'll try it then let me know if something is still wrong. -- Maciej Wisniowski

Re: YUI Autocomplete

2008-04-28 Thread Pigletto
Hi! This is my snippet, that you're using, so I hope I can help :) > 1) Inside the my form class, if I specify: > > def __init__(self,*args, **kwargs ): > super(QuizForm, self).__init__(*args, > **kwargs) > n_lookup_url = reverse('djangoOp.op.views.json_lookup') # url to your > view > n_schema

Re: Queryset returning unexpected results

2008-03-06 Thread Pigletto
On 6 Mar, 00:04, Darthmahon <[EMAIL PROTECTED]> wrote: > Ahh ok. Something like this then? > > qset = (Q(tags__title__icontains=query) | Q(title__icontains=query)) > results = Blog.objects.filter(qset).extra(LEFT OUTER JOIN tag ON > blog.tag = tag.id) No, because if you use

Re: Queryset returning unexpected results

2008-03-05 Thread Pigletto
> Basically, the queryset in views.py will ONLY return results if that > particular Blog has a Tag related to it. If I haven't specified a tag > for a particular blog, it will NEVER appear in my results. > > Any ideas? Is my query only getting results with both a TITLE and > TAG_TITLE? You need

Re: Problems using cron to run a python script

2008-03-05 Thread Pigletto
> OK, I'm getting a different error now: > > Traceback (most recent call last): > File "update_feeds.py", line 58, in ? >update_feeds() > File "update_feeds.py", line 14, in update_feeds >from knoxd.apps.aggregator.models import Feed, FeedItem > ImportError: No module named

Re: "can't adapt" - mod_python, multiple interpreters, psycopg2

2008-03-04 Thread Pigletto
> > Problem is possibly with multiple interpreters and psycopg2 again, > > Why do you say that? The thread you refer to above doesn't talk about > mod_python, so do you have any extra evidence that support this claim? There was a bug in psycopg2 with Decimal data type that sometimes caused error

Re: How to give a style for "CHOICE FILED" in py file

2008-03-04 Thread Pigletto
> group_name=forms.ChoiceField(choices=[("itp","ITP"),("csg", "CSG"), > ("nwg","NWG"),("pcis","PCIS"),("serv","SERV"),("swg","SWG"), > ("wsg","WSG")],required = False) > I WANT TO GIVE A STYLE FOR CHOICE FILED DATA(swg,wsg)... HW CAN I? I'm not sure if I understand what you mean, but

"can't adapt" - mod_python, multiple interpreters, psycopg2

2008-03-04 Thread Pigletto
Hi! I'm observing that "can't adapt" error appears on my Django powered site sometimes. After Apache restart everything is OK for few days and again... can't adapt appears. This is same thing as described there:

Re: Random UnicodeDecodeError ??

2008-02-14 Thread Pigletto
> no error occured. > > I also recognised this error only occurs on one of my two machines. > the productive one of course! ;) > productive: > ubuntu 6.06, mysql 5.0.22, Python 2.4.3 > develop: > ubuntu 7.10, mysql 5.0.45, Python 2.5.1 > (uses a mysqldump of the productive) Try to add debug code

Re: Specifying custom upload to with FileField

2008-02-08 Thread Pigletto
> With this the uploaded files will go to <>/files/, > howeverI want to upload all files to a subdirectory with the name of > the project, how can I do that? Same question was asked yesterday: http://groups.google.com/group/django-users/browse_thread/thread/7e193c1532920a6f# -- Maciej Wisniowski

Re: custom model field validation

2008-02-08 Thread Pigletto
> So If I create a newforms field then how do I tell the admin to use > that when building the form in the admin? If you need this in admin then possibly you have to define your own newforms field with validation. It may be called: myfields.MyField Then you define descednant of CharField from

Re: Django AutoComplete Search

2008-02-07 Thread Pigletto
> I was wondering if anyone had any experience with creating a search > box in Django that would make suggestions (such as a drop down right > below the search box) about what they may be looking for. For example > if a database was being searched, it could recommend the names of > database

Re: custom model field validation

2008-02-07 Thread Pigletto
On 7 Lut, 09:58, Mackenzie Kearl <[EMAIL PROTECTED]> wrote: > I am having trouble finding documentation on how to add custom > validation to a custom model field. > > example: > > class PostalField(models.CharField): > def __init__(self,*args,**kwargs): >

Re: django version for production?

2008-02-06 Thread Pigletto
On 6 Lut, 04:50, "Christian W. Koch" <[EMAIL PROTECTED]> wrote: > i'm no django expert, yet, but i use trunk. now, for production > purposes i still use trunk because before i "svn up" on production i > make sure that the site runs on my development box on the latest > trunk. > > you do have a

Re: django version for production?

2008-02-05 Thread Pigletto
On 5 Lut, 12:57, Aljosa Mohorovic <[EMAIL PROTECTED]> wrote: > please post your opinions on using 0.96 or trunk version in production > environment. > which would you choose and why? I'm using svn version from newforms-admin branch with some additional patches. As Kenneth already said, svn

Re: Image upload in user's directory

2008-02-01 Thread Pigletto
On 1 Lut, 11:35, django_user <[EMAIL PROTECTED]> wrote: > Thanks it worked.. :) Nice to hear that :) -- Maciej Wisniowski --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Trying to dynamically generate labels in newforms

2008-01-31 Thread Pigletto
> Yes, but I won't know the value of 'foo' until runtime. There's no > other way to set it? I don't want to hardcode a bunch of entries like > "self.somefield = whatever" in __init__, either, because I'm trying to > consolidate a bunch of ad-hoc code into a single inheritable class. Use fields

Re: newforms.ModelForm: some customizing

2008-01-24 Thread Pigletto
> Would you be so kind to help me to solve some problems? I have some > questions. Good questions, as these are (I think) common problems and finding answers in documentation is not obvious (or not even possible sometimes). > 1. How may I use my own field DateField (I mean not forms.DateField)

Re: How sublcass a form and get the fields not on top?

2008-01-19 Thread Pigletto
> However, if I subclass this form this fields get on TOP of it (I > prefer have it on bottom or in the middle). Exist a way to control > this? If you're talking about fields order then try: class AnotherCityForm(CityForm): def __init__(self, *args, **kwargs): super(AnotherCityForm,

Re: How do _you_ handle versioning your CSS/JS files?

2008-01-16 Thread Pigletto
> script> I'm using something like: