Which apps/solutions are most appropriate for model based search in Django?

2009-10-21 Thread chefsmart
This is on stackoverflow.com also, but I guess not all Django users visit that site so I am posting this here also: - I have a Django app where most of the search is driven by foreign keys. For example, assuming Student, School, State, and EducationalQualification are Django models, the user

ANNOUNCE:- ibm_db_django-0.1.4 IBM Dataservers backend support for Django 1.1 Released

2009-10-21 Thread Tarun Pasrija
IBM_DB_DJANGO-0.1.4 --- IBM_DB_DJANGO adaptor enables access to IBM databases from Django applications http://www.djangoproject.com/. The adaptor is developed and maintained by IBM. What's New? We are pleased to announce the release of

django-bbcode

2009-10-21 Thread Jonas Obrist
Hi django-users I wrote a django app called 'django-bbcode' which parses bbcode (or any whatever you want it to) into html (or whatever you want it to). The code is hosted on http://bitbucket.org/ojii/django-bbcode/wiki/Home for all those who are interested. I also wondered if there is any

Re: Does anyone know what happened to djangopluggables.com?

2009-10-21 Thread Andy McKay
> I've been seeing that for a few months now when trying to visit the site. Before djangopluggables has been dead for many months. Before it went offline, I spidered everything into http://djangozen.com/, its been growing slowly since then. -- Andy McKay

SSL Redirect on apache.

2009-10-21 Thread Sonal Breed
Hi all, In my application, I need to have https on sign-in, sign-up pages and any page that user visits after log in. I am running my django app on apache 2.2.14 server. I made use of following snippet http://www.djangosnippets.org/snippets/880/ along with many others like 80, 240, 1760 But

Re: syncdb fails to update Not NULL property in PostgreSQL 8.4

2009-10-21 Thread Tomasz Zieliński
On 21 Paź, 19:20, "Thomas B. Higgins" wrote: > Using the SVN trunk version of Django, I have observed that if a model > IntegerField or FloatField is changed by adding "null=True" syncdb > does not update the Not NULL property of the column using PostgeSQL > 8.4. Is

Re: admin actions bar in django 1.1

2009-10-21 Thread kkerbel
it doesn't appear to be working for any apps. everything else on the admin page shows fine to my knowledge...just not the admin actions bar. On Oct 21, 4:47 pm, kkerbel wrote: > within the templates folder for my app (events in this case)...I just > have a folder named

Re: admin actions bar in django 1.1

2009-10-21 Thread kkerbel
within the templates folder for my app (events in this case)...I just have a folder named events containing templates for the pages...I do not have any admin template mods. On Oct 21, 12:47 pm, Peter Bengtsson wrote: > What customizations have your done in the

Re: Does anyone know what happened to djangopluggables.com?

2009-10-21 Thread James Bennett
If anyone knew what had happened to it, it's likely they'd have responded in one of the multiple other threads asking this question. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~-~--~~~---~--~~ You received this message

nginx, apache, and odd admin error

2009-10-21 Thread rd-london
Hi, Wonder if someone can help.This issue is all with a local dev situation, so this isn't live. I have nginx running on port 81 e.g. http://127.0.0.1:81/ and serving static media - which in turn proxies through to Apache running on port 96. All works fine (apart from the issue I outline below)

Re: Does anyone know what happened to djangopluggables.com?

2009-10-21 Thread Wayne Koorts
>> It's been giving me a "502 Bad Gateway >> nginx" for at least a couple weeks now. I've been seeing that for a few months now when trying to visit the site. Regards, Wayne --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Does anyone know what happened to djangopluggables.com?

2009-10-21 Thread Lemuel Formacil
On Oct 22, 2009, at 12:32 AM, Brian McKeever wrote: > > It's been giving me a "502 Bad Gateway > nginx" for at least a couple weeks now. Yeah, looks like it's down. Here are the guys who made it: http://sidebarcreative.com/ > > Are there any other good sources of django plugins? with some

edit fieldset.html template

2009-10-21 Thread onoxo
hi! i have a model and I'm using it as inline in admin site. here is the code: models.py class PhotoItem(models.Model): order = models.IntegerField(blank = True, null = True) itemset = models.ForeignKey('PhotoSet', related_name='photoset') item = models.ForeignKey('Photo',

Re: Preview model before saving it

2009-10-21 Thread akonsu
hello, anything is possible. you just need to decide how you are going to store your changes before the model gets "really" saved so that the preview functionality works. where would preview get the values from? i propose a "published" boolean field in the model. konstantin On Oct 21, 3:41 pm,

order_by date_trunc ?

2009-10-21 Thread akonsu
hello, i have a datetime field in my model. is there a way to order a query set by this field truncated to the given precision? even worse. i have another field in the model that specifies the precision ('year', 'day', etc), i need to order the query set by the datetime field truncated using

Does anyone know what happened to djangopluggables.com?

2009-10-21 Thread Brian McKeever
It's been giving me a "502 Bad Gateway nginx" for at least a couple weeks now. Are there any other good sources of django plugins? I know of the official python packages: http://pypi.python.org/pypi?%3Aaction=browse and django snippets: http://www.djangosnippets.org/

Re: 500.html does not load

2009-10-21 Thread akonsu
hello, there is a setting in settings.py that controls where django searches for templates. konstantin On Oct 21, 2:50 pm, NoviceSortOf wrote: > Although I have 500.html in my > site-packages/django/contrib/admin/templates folder 500.html does not > appear when it

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

2009-10-21 Thread Antoni Aloy
2008/3/5 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

Preview model before saving it

2009-10-21 Thread Aaron
I'm wanting to set up model previews in the admin. I've been following this guide: http://latherrinserepeat.org/2008/7/28/stupid-simple-django-admin-previews/ However, that guide seems to only apply to models that have already been saved (how is it different from "View on site"?). I wish to be

500.html does not load

2009-10-21 Thread NoviceSortOf
Although I have 500.html in my site-packages/django/contrib/admin/templates folder 500.html does not appear when it should, below see my errors (I've included the traceback items below). Is there something else I need to configure to get 500.html to load? Mod_python error: "PythonHandler

Restricting date_hierarchy

2009-10-21 Thread Manfre
I am working against a legacy database with over 25 years of historical data. I really like the functionality provided by date_hierarchy, but having all 25 years appear above the list is quite ugly. My users will only ever need the past 2-3 years. Is there a way of restricting the year links

Re: Do I have to pass the httprequest object to render_to_response every time?

2009-10-21 Thread Andrew Ingram
jul wrote: > hi, > > in my base.html template I've got a header which needs httprequest > (request.path, request.user.is_authenticated...). > In all my views I'm passing the request object to render_to_response. > Is there any better way to do that? > > thanks > jul Hi jul, There is a context

Do I have to pass the httprequest object to render_to_response every time?

2009-10-21 Thread jul
hi, in my base.html template I've got a header which needs httprequest (request.path, request.user.is_authenticated...). In all my views I'm passing the request object to render_to_response. Is there any better way to do that? thanks jul --~--~-~--~~~---~--~~

Re: admin actions bar in django 1.1

2009-10-21 Thread Peter Bengtsson
What customizations have your done in the templates/admin/ folder of the app that isn't working? On 21 Oct, 17:22, kkerbel wrote: > i upgraded django 1.0.2 to 1.1 stable and I cannot see the admin > actions bar in one of my apps...or any of them for that matter.  My > fresh

Re: Authenticate returns None when it should validate... what I am I doing wrong here?

2009-10-21 Thread Social Network in DJango
Just tested it on my deployment environment. It still works there. Why is it failing on my development machine?? Deployment environment: Python 2.5.4 (r254:67916, Aug 5 2009, 12:42:40) [GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2 Type "help", "copyright", "credits" or "license" for more

Authenticate returns None when it should validate... what I am I doing wrong here?

2009-10-21 Thread Social Network in DJango
My django program will not log in on one of my development machines, yet it works fine in my deployment environment. I managed to isolate the bug to the following code: Any help is greatly appreciated. Jonathan (Python Shell) >>> from django.contrib.auth import authenticate >>> from

Re: syncdb fails to update Not NULL property in PostgreSQL 8.4

2009-10-21 Thread Karen Tracey
On Wed, Oct 21, 2009 at 1:20 PM, Thomas B. Higgins wrote: > > Using the SVN trunk version of Django, I have observed that if a model > IntegerField or FloatField is changed by adding "null=True" syncdb > does not update the Not NULL property of the column using

syncdb fails to update Not NULL property in PostgreSQL 8.4

2009-10-21 Thread Thomas B. Higgins
Using the SVN trunk version of Django, I have observed that if a model IntegerField or FloatField is changed by adding "null=True" syncdb does not update the Not NULL property of the column using PostgeSQL 8.4. Is this correct behavior, or a bug? The two easy workarounds are (1) drop the table

Re: concurrency and threading question

2009-10-21 Thread Mike Thon
On Oct 21, 6:44 pm, Javier Guerra wrote: > On Wed, Oct 21, 2009 at 9:49 AM, Michael Thon wrote: > > Thanks for pointing me towards celery.  Its probably overkill for what > > I want to do right now but I'm going to try to set it up anyway. > > the

Re: concurrency and threading question

2009-10-21 Thread Javier Guerra
On Wed, Oct 21, 2009 at 9:49 AM, Michael Thon wrote: > Thanks for pointing me towards celery.  Its probably overkill for what > I want to do right now but I'm going to try to set it up anyway. the roll-your-own alternative is just setting a DB table with the queued tasks,

admin actions bar in django 1.1

2009-10-21 Thread kkerbel
i upgraded django 1.0.2 to 1.1 stable and I cannot see the admin actions bar in one of my apps...or any of them for that matter. My fresh install of 1.1 has the bar, however, I can't seem to find the discrepancy between the two installs. Have any of you experienced this? Thanks!

Need Help Migrating to Windows 7 (64-bit), Python 2.6, Django 1.1

2009-10-21 Thread JimR
Hello, All, I am trying to migrate my application from Python 2.5, Dango 1.0, PostgreSQL 8.4, Windows XP (32-bit) to Python 2.6, Django 1.1, PostgreSQL 8.4, Windows 7 (64-bit). I have donwloaded and installed the 64-bit version of Python 2.6. I am having a problem with a particular model

import sqlalchemy model

2009-10-21 Thread webdexter
Hi, I search a way ton simply use my sqlalchemy model in a django project. The database already exists (created by sqlalchemy) and I would like to use sqlachemy request on it. I spent a lot of time to search how to do that, I don't want to use inspectdb to create a django model but use

Problem about write data into the DB

2009-10-21 Thread 邓超
Hi all, I deployed a django app on my laptop, the whole environment is like this: the OS is UBUNTU904, the web server is Apache, and the database is sqlite3. The deployment is success, but when I try to write some data into the database, I get the HTTP 500 error. And I check the error log, it

Re: installing Django on Mac OS 10.6

2009-10-21 Thread robin
Daniel and Hector, Thank you very very much. I am off install the module. Robin On Oct 21, 12:29 pm, Hector Garcia wrote: > On the internets? > > http://docs.djangoproject.com/en/dev/ref/databases/#mysqldb > > Hector Garcia - Web developer, musicianhttp://nomadblue.com/ >

Re: concurrency and threading question

2009-10-21 Thread Michael Thon
On Oct 21, 2009, at 11:55 AM, Daniel Roseman wrote: > > On Oct 21, 9:28 am, Mike Thon wrote: >> I'm new to web programming and I have a basic question about the >> design of my Django application. my application will do some number >> crunching on data files uploaded by

Re: "Unsupressing" errors when called from templates

2009-10-21 Thread Peter Bengtsson
On 21 Oct, 14:29, bruno desthuilliers wrote: > On 21 oct, 15:05, Peter Bengtsson wrote: > > > Suppose I've got this code: > > > # template.html > > Info: {{ article_instance.count_words }} words > > > # models.py > > class

Re: More than one stackedinline in admin

2009-10-21 Thread Daniel Roseman
On Oct 21, 2:42 pm, Caisys wrote: > Hi, > Suppose i have 3 model classes: > > class model1(model.Models): >     fields . > > class child1(models.Model): >      model1 = models.ForeignKey(model1) > > class child2(models.Model): >      model1 =

More than one stackedinline in admin

2009-10-21 Thread Caisys
Hi, Suppose i have 3 model classes: class model1(model.Models): fields . class child1(models.Model): model1 = models.ForeignKey(model1) class child2(models.Model): model1 = models.ForeignKey(model1) -- Is it possible to have child1 and child2

Re: "django-pagination" and generic.views.date_based.archive_index()

2009-10-21 Thread tezro
Thanks again. Did it with object_list. Thanks for help :) On Oct 19, 2:16 pm, Михаил Лукин wrote: > Finally, I see only 3 ways: > 1. copy/paste archive index code and change it's behaviour so it can eat > num_latest=None > 2. patch date_based.py in same way as (1) >

Re: extends tag in template

2009-10-21 Thread bruno desthuilliers
On 20 oct, 14:55, knight wrote: > Thanks for the reply. > It doesn't matter where I put {{ MEDIA_URL }}. > I get the error in any case Please post your actual template code somewhere we can read it. --~--~-~--~~~---~--~~ You received this

Re: "Unsupressing" errors when called from templates

2009-10-21 Thread bruno desthuilliers
On 21 oct, 15:05, Peter Bengtsson wrote: > Suppose I've got this code: > > # template.html > Info: {{ article_instance.count_words }} words > > # models.py > class Article(models.Model): >    text = models.TextField() >    def count_words(self): >         raise

Re: "Unsupressing" errors when called from templates

2009-10-21 Thread Peter Bengtsson
Found the ticket for it: http://code.djangoproject.com/ticket/11421 On 21 Oct, 14:17, Peter Bengtsson wrote: > UPDATE! > If I raise some other error inside the python code (e.g. ValueError) > it's not suppressed. > Seems a design error in Django. Will carry on this discussion

Re: "Unsupressing" errors when called from templates

2009-10-21 Thread Peter Bengtsson
UPDATE! If I raise some other error inside the python code (e.g. ValueError) it's not suppressed. Seems a design error in Django. Will carry on this discussion somewhere else. On 21 Oct, 14:05, Peter Bengtsson wrote: > Suppose I've got this code: > > # template.html > Info:

Re: efficiently deleting content based on how old it is

2009-10-21 Thread Peter Bengtsson
On 20 Oct, 15:48, Chris Withers wrote: > Shawn Milochik wrote: > > I know this doesn't answer the hard part of your question, but here's   > > a simple way I delete old stuff from a database via an external script   > > that's run by cron: > > >

"Unsupressing" errors when called from templates

2009-10-21 Thread Peter Bengtsson
Suppose I've got this code: # template.html Info: {{ article_instance.count_words }} words # models.py class Article(models.Model): text = models.TextField() def count_words(self): raise AttributeError('debugging') Then, when I render that page I get: Info: words When I want

Re: frameworks based on Django ?

2009-10-21 Thread ssc
that's exactly the one i had come across and couldn't find again, thank you very much! :-) On 22 Okt., 00:47, Hector Garcia wrote: > http://pinaxproject.com/ > > Hector Garcia - Web developer, musicianhttp://nomadblue.com/ > > On Wed, Oct 21, 2009 at 1:35 PM, ssc

Re: Using variables as keywords in QuerySet

2009-10-21 Thread Hector Garcia
Also note the usage of __exact can be discarded in favor of the 'exact' form of keyword, as it is encouraged here: http://groups.google.com/group/django-users/browse_thread/thread/04b3ca49dc3f9c18/bdfb4849c0e885da?lnk=raot So, MyModel.objects.filter(**{a+'__contains': 'foo', b: 'bar';})

Re: Using variables as keywords in QuerySet

2009-10-21 Thread valler
Thank you, it worked perfectly :) --~--~-~--~~~---~--~~ 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: frameworks based on Django ?

2009-10-21 Thread Hector Garcia
http://pinaxproject.com/ Hector Garcia - Web developer, musician http://nomadblue.com/ On Wed, Oct 21, 2009 at 1:35 PM, ssc wrote: > > The future feature list of the project I am currently working on has a > few items that sound to me like they'd been

Re: installing Django on Mac OS 10.6

2009-10-21 Thread Hector Garcia
On the internets? http://docs.djangoproject.com/en/dev/ref/databases/#mysqldb Hector Garcia - Web developer, musician http://nomadblue.com/ On Wed, Oct 21, 2009 at 12:56 PM, robin wrote: > > I have installed Django on my mac with OS 10.6. It installed just fine >

frameworks based on Django ?

2009-10-21 Thread ssc
The future feature list of the project I am currently working on has a few items that sound to me like they'd been implemented before, but there doesn't seem to be direct support for them in Django itself. I seem to remember coming across a few frameworks built on Django and I was hoping to find

Re: installing Django on Mac OS 10.6

2009-10-21 Thread Daniel Roseman
On Oct 21, 11:56 am, robin wrote: > I have installed Django on my mac with OS 10.6. It installed just fine > and I was setting up my first project. I then ran python manage.py > syncdb as I am using MySQL, but I got the following errors: > > Traceback (most recent call

installing Django on Mac OS 10.6

2009-10-21 Thread robin
I have installed Django on my mac with OS 10.6. It installed just fine and I was setting up my first project. I then ran python manage.py syncdb as I am using MySQL, but I got the following errors: Traceback (most recent call last): File "manage.py", line 11, in execute_manager(settings)

Re: Using variables as keywords in QuerySet

2009-10-21 Thread Doug Blank
On Wed, Oct 21, 2009 at 5:12 AM, Arthur Metasov wrote: > > 2009/10/21 valler <180...@gmail.com>: >> >> Hello. I want to know, if something like that possible: >>  MyModel.objects.filter(name__contains='foo',status__exact='bar') => >> It's OK. >> >> But I want to use dynamic

Re: efficiently deleting content based on how old it is

2009-10-21 Thread David De La Harpe Golden
Jaime Buelta wrote: > When I had to do this kind of tasks, I've added a new management command and > run it from the cron (or manually any time you need it, with params, etc). > You can run it calling > > python manager.py miCommand parameters > "celery" may seem overkill initially, but works

Re: concurrency and threading question

2009-10-21 Thread Daniel Roseman
On Oct 21, 9:28 am, Mike Thon wrote: > I'm new to web programming and I have a basic question about the > design of my Django application.  my application will do some number > crunching on data files uploaded by users.  The data processing will > take from minutes to hours

Re: concurrency and threading question

2009-10-21 Thread Jani Tiainen
Use separate background process (daemon) to handle queue + crunching (or launching crunching). So your web app just posts jobs to background process and then returns control back to user. Otherwise your idea is quite correct. Mike Thon kirjoitti: > I'm new to web programming and I have a

Re: Using variables as keywords in QuerySet

2009-10-21 Thread Arthur Metasov
2009/10/21 valler <180...@gmail.com>: > > Hello. I want to know, if something like that possible: >  MyModel.objects.filter(name__contains='foo',status__exact='bar') => > It's OK. > > But I want to use dynamic keyword generation, like that: >  a='name' >  b='status' >  

Using variables as keywords in QuerySet

2009-10-21 Thread valler
Hello. I want to know, if something like that possible: MyModel.objects.filter(name__contains='foo',status__exact='bar') => It's OK. But I want to use dynamic keyword generation, like that: a='name' b='status' MyModel.objects.filter(a__contains='foo',b__exact='bar') Is it possible

Re: Adding a custom toolbar button

2009-10-21 Thread Joost Cassee
On 20 okt, 00:54, eka wrote: > Is there any way to achieve this with django-tinymce? > > http://tinymce.moxiecode.com/examples/example_20.php > > I tried configuring it, but seems to not like the way I pass the > function. You basically need to generate this piece of

concurrency and threading question

2009-10-21 Thread Mike Thon
I'm new to web programming and I have a basic question about the design of my Django application. my application will do some number crunching on data files uploaded by users. The data processing will take from minutes to hours for each job. I don't expect to ever get a large number of

Re: Unittest, fixture and permission

2009-10-21 Thread Hector Garcia
http://www.djangoproject.com/documentation/models/fixtures/ # Load fixture 1. Single JSON file, with two objects. >>> management.call_command('loaddata', 'fixture1.json', verbosity=0) >>> Article.objects.all() [, , ] # Load fixture 2. JSON file imported by default. Overwrites some existing

Re: Apache2+mod_wsgi autoreload?

2009-10-21 Thread Михаил Лукин
Thanks a lot, it works perfect :) 2009/10/21 Graham Dumpleton > > > > On Oct 21, 5:07 pm, Graham Dumpleton > wrote: > > On Oct 21, 4:00 pm, Михаил Лукин wrote: > > > > > ./manage runserver is OK for debugging

Re: ManyToMany lookups

2009-10-21 Thread koenb
On 20 okt, 21:19, r_f_d wrote: > Why not do this: > > for p in products.objects.all(): >     for c in p.categories.all(): >          print p,' - ', c > > -richard > > On Oct 20, 7:57 am, Михаил Лукин wrote: > This will obviously leave you with a

Re: Apache2+mod_wsgi autoreload?

2009-10-21 Thread Graham Dumpleton
On Oct 21, 5:07 pm, Graham Dumpleton wrote: > On Oct 21, 4:00 pm, Михаил Лукин wrote: > > > ./manage runserver is OK for debugging purposes... unless you use > > server-specific features, in my case - NTLM authentication. When deploying

Re: Apache2+mod_wsgi autoreload?

2009-10-21 Thread Graham Dumpleton
On Oct 21, 4:00 pm, Михаил Лукин wrote: > ./manage runserver is OK for debugging purposes... unless you use > server-specific features, in my case - NTLM authentication. When deploying > Django project with Apache2+mod_wsgi, I need to `rcapache2 reload` to apply >