Simple Django search

2007-06-06 Thread Maciej Bliziński
o. It's biggest strength is that it's enough to put few files into the django/contrib directory and run syncdb -- it's ready to go. All comments are very welcome! Maciej Bliziński --~--~-~--~~~---~--~~ You received this message becau

Re: unicode in filters

2007-02-19 Thread Maciej Bliziński
. In such a case we assume ASCII. But hey again, this is not an ASCII character! I'm going to complain! I hope it helps in the future, so you know what decoding and encoding means. Cheers, Maciej -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~~---~-

Re: How to mount django on a non root apache setting through fastcgi ?

2006-12-26 Thread Maciej Bliziński
On Dec 20, 10:41 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: However, I am wondering if I can tell a particular project to mount onhttp://mydomain.com/my_django/instead on root. This way I would have more flexibility like running multiple django instance. You can probably write such a

Re: Django + FastCGI Problems

2006-12-25 Thread Maciej Bliziński
On Dec 6, 3:18 am, "Uros Trebec" <[EMAIL PROTECTED]> wrote: I am sorry to report that this method does NOT work on my machine/account. I've tried different users (on the same machine) and it does not work. Symptoms are the same. Hey, I've run into next-level 500 Internal Server Error problems

Sitemaps and pagination

2006-12-11 Thread Maciej Bliziński
include in the sitemap, are the _pages_ of topics. What would be a correct approach to this problem in your opinion? Regards, Maciej -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Re: Fast fcgi on dreamhost --> shauwn of the dead, help me shoot zombies

2006-12-03 Thread Maciej Bliziński
coulix napisał(a): > Any idea on how to fix these problems on dreamhost? I'm not sure if what you're currently experiencing is the same problem I had few days ago. I did notice zombie processes and my Django app on Dreamhost was down every now and then. I've solved this problem by renaming django

Re: Django + FastCGI Problems

2006-11-30 Thread Maciej Bliziński
Mike, I was experiencing the same problems: incomplete headers and timeouts. I did a simple trick that made my Django application run smoothly. Perhaps you can try the same thing (it requires simple changes). I described it on my blog: http://automatthias.wordpress.com/2006/12/01/django-on-dream

Pairing objects with two OneToOneFields

2006-11-27 Thread Maciej Bliziński
ve any ideas how to solve my problem? Should the above class be valid and should Django successfully create the tables? Or is there some other way to map objects from two classes in 1-1 manner without creating additional columns in their database tables? Maciej -- Maciej Bliziński http://automatth

Re: Ubuntu Dapper Drake installation question

2006-09-22 Thread Maciej Bliziński
mmand. Regards, Maciej [1] http://www.djangoproject.com/documentation/install/#installing-the-development-version -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: [patch] Generating slug for words with accents

2006-08-27 Thread Maciej Bliziński
pt those which use cyrylic alphabet. One thing... some characters want to be translated into _two_ ASCII characters, for example Æ to AE. This would require a different data structure. In present form, I just entered E. The same with ß which I replaced with single S. Regards, Maciej -- Maciej Bl

Re: [patch] Generating slug for words with accents

2006-08-26 Thread Maciej Bliziński
utogenerated slug="sre"; correct is "srsen"). That's right. I've been experiencing the same thing. > I will be glad, If some others of you add your own national characters. I'm attaching a modified patch with Polish characters ad

Re: Editting both sides of self-referential m2m relationship

2006-08-21 Thread Maciej Bliziński
enter any other information, just the relationship changes. So I didn't use the admin interface, I just rolled my own. If anybody has a better idea, please share it, because how I did it was neither clever nor pretty. -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~-

Re: Editting both sides of self-referential m2m relationship

2006-08-21 Thread Maciej Bliziński
ito [ ] Stork --- While he wants to see: --- Editing Animal Animal name: Frog ... Preys: [v] Fly [v] Mosquito [ ] Stork Predators: [ ] Fly [ ] Mosquito [v] Stork --- -- Ma

Re: Django Models, DRY, Scalability

2006-08-20 Thread Maciej Bliziński
didn't like it, but the only real problem was to memorize the ALTER TABLE syntax. -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gr

Re: What relating model should I use?

2006-08-17 Thread Maciej Bliziński
rited_by', symmetrical = False, filter_interface = models.HORIZONTAL) -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&quo

Re: Multiple applications One server Big problem.

2006-08-15 Thread Maciej Bliziński
Seth, my apologies. I've got it wrong, my fault. The Evolution fooled me by the way it displays the threads. I've seen something like this: http://img243.imageshack.us/my.php?image=screenshotsj5.png And that was it... I'm sorry, for both being mistaken and rude. -- Maciej

Re: Multiple applications One server Big problem.

2006-08-15 Thread Maciej Bliziński
ost is still unanswered. Now, imagine that I wish to look at the mailing list to seek for unanswered posts. The "Learning Django" post appears to be answered! By whom? By you! By hijacking a thread, you greatly reduce the probability of the original post to be ans

Re: Forcing a view to expire from cache

2006-08-12 Thread Maciej Bliziński
everal expensive queries and I didn't want to code caching of each of them separately. Regards, Maciej -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &q

Re: Forcing a view to expire from cache

2006-08-12 Thread Maciej Bliziński
m django.views.decorators.cache import cache_page def slashdot_this(request): ... slashdot_this = cache_page(slashdot_this, 60 * 15) I removed the middleware references from the settings. The keys still look the same, with the MD5-sum at the end. Do I need to use the cache.set() and cache.get

Re: Forcing a view to expire from cache

2006-08-12 Thread Maciej Bliziński
On Sat, 2006-08-12 at 13:13 -0700, Don Arbow wrote: > On Aug 12, 2006, at 12:38 PM, Maciej Bliziński wrote: > > > > This is a data-analysis site, and after I change some parameters, I > > want > > to clear the cache for one of the views. How can I force a view to >

Forcing a view to expire from cache

2006-08-12 Thread Maciej Bliziński
iews. How can I force a view to expire? Reading the docs http://www.djangoproject.com/documentation/cache/ I think that I need to use the vary_on_headers, but I need to create a custom header and modify it whenever my data gets modified. I just don't know how to do it. Can you give me a hint?

Re: models that reference each other through foreign key

2006-08-12 Thread Maciej Bliziński
models.TextField() Use the ManyToManyField here. members = models.ManyToManyField(Person, related_name = 'member_of') -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Where to store large SQL queries code

2006-08-11 Thread Maciej Bliziński
directory? What would you suggest? Keep swingin' Maciej -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Generate static HTML files

2006-08-06 Thread Maciej Bliziński
not, what technique would you suggest? -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us

Re: Scandinavian characters in .po files and timezones

2006-08-01 Thread Maciej Bliziński
'. Also the variable 'fileencodings' is important. Vim will guess the fileencoding by itself, but the encoding needs to be on the 'fileencodings' list. I've blogged about it once: http://automatthias.wordpress.com/2006/07/18/vim-utf-8-a

Filter objects spanning two relations

2006-07-29 Thread Maciej Bliziński
_many_to_many', 'add_to_class', 'content', 'delete', 'document_set', 'id', 'newtag_set', 'objects', 'save', 'validate'] So there's something called newtag_set in the old tag object. It allows to fet

Re: Loading an url takes 60 sec.

2006-07-28 Thread Maciej Bliziński
ll"), but the IP address is currently inaccessible. Delete the DNS server from the network configuration then. -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

Re: Loading an url takes 60 sec.

2006-07-28 Thread Maciej Bliziński
k if the line: 127.0.0.1 localhost is present in the hosts file. If not, add it as well. * * * However, if you use "manage.py runserver" and browse from the local machine, I have no idea other that "127.0.0.1 localhost" line is missing from the hosts fi

Re: Loading an url takes 60 sec.

2006-07-28 Thread Maciej Bliziński
ou say that the HD is idle, so it's probably not the memory. -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to th

Re: Loading an url takes 60 sec.

2006-07-28 Thread Maciej Bliziński
ow too. So the delay probably comes from the reverse-DNS queries. The machine asks a question (who is asking me to serve a webpage? 192.168.0.1? who is 192.168.0.1?) and waits 60s for the answer. -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~~

Re: Loading an url takes 60 sec.

2006-07-28 Thread Maciej Bliziński
er "blinking" connections. What is the processor load during those 60 seconds? Is it 100% busy or is it idle? The same question with the hard disk. -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you

Re: pls help with a m2m sql

2006-07-26 Thread Maciej Bliziński
xplanation and a plot on my blog: http://automatthias.wordpress.com/2006/07/23/malcolm-tredinnicks-sql-puzzle-solution/ Regards, Maciej -- Maciej Bliziński http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are sub

Re: pls help with a m2m sql

2006-07-23 Thread Maciej Bliziński
t, and which wasn't attended by any of the students from the second list. Best regards, Maciej -- Maciej Bliziński <[EMAIL PROTECTED]> http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: pls help with a m2m sql

2006-07-23 Thread Maciej Bliziński
a4/5e64e2fa06255f90#5e64e2fa06255f90 -- Maciej Bliziński <[EMAIL PROTECTED]> http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Pagination and relative URLs

2006-07-21 Thread Maciej Bliziński
because of that) * Redirect from ^objects/ to ^objects/page1/? * Custom view for URL scheme ^objects/pageX/ that defines a variable which indicates that ../ should be used? * Other solution? -- Maciej Bliziński <[EMAIL PROTECTED]> http://autom

Malcolm Tredinnick's SQL puzzle

2006-07-21 Thread Maciej Bliziński
think of a way to make Django perform two (and more) aliased joins with the same table. -- Maciej Bliziński <[EMAIL PROTECTED]> http://automatthias.wordpress.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Related tags query, many-to-many double join

2006-07-19 Thread Maciej Bliziński
ple instances of each tag, while I need counts. I could write: Tag.objects.filter(document__tags__name='mytag').exclude(name='mytag').distinct() But then I'd lose the counts. I think I have to write myself a function that will count the instances of each tag. -- Maciej

Related tags query, many-to-many double join

2006-07-19 Thread Maciej Bliziński
, that tag5, tag2 and tag8 are associated with the same documents as tag1 in 6 cases. And so on. The question is: is it possible to make the same thing without writing custom SQL code? -- Maciej Bliziński <[EMAIL PROTECTED]> http://automatthias.wordpress.com --~--~-~--~~

Re: Execute a script in manage.py shell

2006-07-18 Thread Maciej Bliziński
On Tue, 2006-07-18 at 22:52 +0200, Maciej Bliziński wrote: > I already checked the documentation for manage.py, but it doesn't > mention anything about executing a script. Magus- from #django @ Freenode provided a solution: import sys,os sys.path.append('/path/to/root/of

Execute a script in manage.py shell

2006-07-18 Thread Maciej Bliziński
e.py shell, but non-interactive and not executed by the web-server. How can I do that? I already checked the documentation for manage.py, but it doesn't mention anything about executing a script. -- Maciej Bliziński <[EMAIL PROTECTED]> http://