Re: shared apps and template tags

2008-01-11 Thread Malcolm Tredinnick
On Thu, 2008-01-10 at 13:24 -0800, [EMAIL PROTECTED] wrote: > OK, new question along the same lines > > I've got > site1/ > site2/ > shared/ (not utils) > shared/samples/ > > all in line, the template tags are working, but in trying to implement > the sites framework I'm hitting a snag when I t

Re: advice on table joins

2008-01-11 Thread Malcolm Tredinnick
On Wed, 2008-01-09 at 19:47 -0800, Ken wrote: > I need some advice. I'm struggling with a query that spans 4 tables. > "Struggling" is a bad word; I'll explain later. Django uses a model- > oriented query system together with a Foreign Key manager to get to > the "next" joining table. A query

Re: When to use templatetags and how to use views.py

2008-01-11 Thread Malcolm Tredinnick
On Thu, 2008-01-10 at 23:18 -0800, Darthmahon wrote: > Thanks for the reply, I've also just found out about context > processors, which to me sound extremely similar to templatetags. The > only problem I can see with both of these options is that I can't see > how you pass extra options into them

Re: i18n problem: Some template variables "get stuck" in one language

2008-01-11 Thread Emil
Hi Peter, thanks for the tip, I'm reading up on the vary_on_headers-decorator right now, I'm gonna see if that clears things up. Just seems weird from my reasoning, and another project I'm working on doesn't have this problem, with nearly excactly the same setup. Oh well, I'll poke around and see

Re: models and python circular import

2008-01-11 Thread Grindizer
On 8 jan, 14:54, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Its very strange that so "hard linked" applications can produce clean > and logic architecture:) g ! :-) You were rigth, finally i review my project's logic, and then put ModelsA3 where it shoud be, i.e in app B, and now it's more

strange duplicate key error (generic issue?)

2008-01-11 Thread Bram - Smartelectronix
Hello all, I have this model: class Favorite(models.Model): content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() content_object = generic.GenericForeignKey() user = models.ForeignKey(User) created = models.DateTimeField() class M

Re: i18n problem: Some template variables "get stuck" in one language

2008-01-11 Thread Emil
Nope, that doesn't seem to be it - same problem with dummy caching on dev server. More likely the culprit is the Advanced Locale From URL Middleware I'm using[1]. I inspected the response headers I get, and even if the language is set to English on the site, response headers always show Content-La

Re: i18n problem: Some template variables "get stuck" in one language

2008-01-11 Thread Emil
I think I got it! Wrong ordering of middleware - I had the i18n-urls middleware before some other stuff, which screwed up a lot... It's working now, and my hair will probably grow back eventually... //emil On Jan 11, 12:41 pm, Emil <[EMAIL PROTECTED]> wrote: > Nope, that doesn't seem to be it -

Make Money working Online. I Make $850 in 7 Days....

2008-01-11 Thread Kiran
Make Money working Online. I Make $850 in 7 Days Only because of http://cashplus.freehostia.com The Only Source where i can make money without investment. http://cashplus.freehostia.com --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Problem with two applications importing models from each other?

2008-01-11 Thread Grindizer
On 10 jan, 22:00, Josh Ourisman <[EMAIL PROTECTED]> wrote: > It's for the purpose of defining foreign keys. Basically, ClassA1 > needs to be able to reference ClassB1 and ClassB2 as foreign keys, > while ClassB3 needs to reference ClassA1 as a foreign key. > > More specifically, the project has

One-to-One relationship

2008-01-11 Thread Narso
Hi, When I have put a models.OneToOneField in a model, the changelist page of the related model, lost the filtering box. Why? I had tried to make this manually, changing the field to models.ForeignKey field, with a PrimaryKey attribute set. Then I got a Select SQL Error. I need both OneToOneFiel

Re: email in settings.py

2008-01-11 Thread Bill
It looks like those variables are documented in the SVN docs, but not 0.96: http://www.djangoproject.com/documentation/email/ If your server doesn't use authentication for SMTP, try not setting _USER and _PASSWORD. As for why those vars weren't in your settings.py, I believe the settings.py sho

Re: How to cache pages with GET parameters like /some_page?page=2

2008-01-11 Thread Alex Koshelev
You can write your own middleware that will be fit all your requirements On 11 янв, 16:45, sector119 <[EMAIL PROTECTED]> wrote: > Hi All! > > In Django docs I read that the cache middleware caches every page that > _doesn't_ have GET or POST parameters. > But I want to cache pages which has GET p

Re: Need a replacement of pyLucene :(

2008-01-11 Thread Alex Koshelev
http://xapian.org/ On 11 янв, 18:46, mamcxyz <[EMAIL PROTECTED]> wrote: > Hi, > > Because the issue > herehttp://www.opensolaris.org/jive/post!reply.jspa?messageID=192094 > I need a working & viable alternative to pyLucene that: > > - Work on Solaris & Windows (A must) and maybe linux > - Open s

Need a replacement of pyLucene :(

2008-01-11 Thread mamcxyz
Hi, Because the issue here http://www.opensolaris.org/jive/post!reply.jspa?messageID=192094 I need a working & viable alternative to pyLucene that: - Work on Solaris & Windows (A must) and maybe linux - Open source/Free - Search engine library - Basic NOT, AND, OR - Reasonable fast for work und

Re: email in settings.py

2008-01-11 Thread Thomas
Hello Michael, you might need to know if your mail server requires a secure connection. This is what works for gmail: EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = '[EMAIL PROTECTED]' EMAIL_HOST_PASSWORD = '' EMAIL_PORT = 587 Good luck. Thomas On Jan 11, 2:4

Re: shared apps and template tags

2008-01-11 Thread [EMAIL PROTECTED]
Malcolm, I think you misunderstood me. There's only one app in shared, and at this point the app is working fine. Where I run into a problem is when I try to run manage.py. I get the ImportError: No module named shared every time. I see the code work, and I'm not throwing any errors, but I'm not

Dynamic Models

2008-01-11 Thread WoonZai
Hi, I was trying to follow the example on Dynamic Models over here but it didn't work for me. [http://code.djangoproject.com/wiki/ DynamicModels] I copied the code for def create_model in the file models.py, and when I try to create a model in the shell, I have the following errors. >>> model =

Re: Need a replacement of pyLucene :(

2008-01-11 Thread Brett Parker
On 11 Jan 07:46, mamcxyz wrote: > > Hi, > > Because the issue here > http://www.opensolaris.org/jive/post!reply.jspa?messageID=192094 > I need a working & viable alternative to pyLucene that: > > - Work on Solaris & Windows (A must) and maybe linux > - Open source/Free > - Search engine librar

How are the ids for Django models calculated?

2008-01-11 Thread shabda
Django adds an ID field to all models by default. Some questions about that. How are the values calculated. If Django asks the DB to provide it those values, can we be sure, for all supported backends, that 1. The ids are auto incrementing, (and not just unique). 2. They start from zero. 3. The d

Re: Dynamic Models

2008-01-11 Thread Marty Alchin
On Jan 11, 2008 10:39 AM, WoonZai <[EMAIL PROTECTED]> wrote: > >>> model = create_model('Empty') > Traceback (most recent call last): > File "", line 1, in > File "/Users/../models.py", line 36, in create_model > return type(UserForm, (models.Model,), attrs) > File "/.../site-packages/d

autoload template tag

2008-01-11 Thread heru
hi all, is there a way to autoload template filter/template tag ? --~--~-~--~~~---~--~~ 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 unsubscrib

email in settings.py

2008-01-11 Thread Michael Allen
Hiya, I'm a noob running official release .96, please be gentle. I'm trying to enable email functionality. Per this doc http://www.djangoproject.com/documentation/0.96/settings/#DEFAULT_CHARSET I should see a set of email settings in my settings.py file. I don't see any of the following: EMAIL_HO

How to cache pages with GET parameters like /some_page?page=2

2008-01-11 Thread sector119
Hi All! In Django docs I read that the cache middleware caches every page that _doesn't_ have GET or POST parameters. But I want to cache pages which has GET parameters - some views which data were _paginated_ and which urls have page=N GET parameters. How can I do that? Thanks. --~--~-

Re: The last records of table by using of Pagination

2008-01-11 Thread shabda
instead of q_list = ObjectPaginator(Queue.objects.all(), 20) Provide a order_by, if you would like them to be in descending order, in order when they were created have, q_list = ObjectPaginator(Queue.objects.all().order_by('-id'), 20) Or better yet have a created_on field in the model, w

newforms-admin: login page isn´t showing an error when the user doesn´t have permission

2008-01-11 Thread Michel Thadeu Sabchuk
Hi guys! I´m using the has_permission method of the AdminSite class to filter which users can access the admin page: class SuperuserAdminSite(admin.AdminSite): def has_permission(self, request): return super(SuperuserAdminSite, self).has_permission(request) and request.user.is_superu

Re: Menus and such [starting to use django]

2008-01-11 Thread [EMAIL PROTECTED]
The best way would be to use an inclusion tag: http://www.djangoproject.com/documentation/templates_python/#inclusion-tags On Jan 11, 1:38 pm, Christoph Egger <[EMAIL PROTECTED]> wrote: > Hi > > I have searched the web but could not find any advice on how to write > some dynamic Menu. As far as I

Re: How are the ids for Django models calculated?

2008-01-11 Thread James Bennett
On Jan 11, 2008 11:02 AM, shabda <[EMAIL PROTECTED]> wrote: > How are the values calculated. If Django asks the DB to provide it > those values, can we be sure, for all supported backends, that > 1. The ids are auto incrementing, (and not just unique). > 2. They start from zero. > 3. The differen

Re: Cannot assign requested address

2008-01-11 Thread [EMAIL PROTECTED]
I think the issue here is actually with send_mail. My guess is that it can't open a SMTP port to send mail from. I'm trying to track down how to fix this right now and will update here once I do so. On Dec 27 2007, 4:01 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > While I was f

Re: When to use templatetags and how to use views.py

2008-01-11 Thread Darthmahon
Hi Malcolm, Thanks for the great writeup, it has certainly made things clearer. Like you say, don't sweat the small stuff - I'll try not to :) Thanks, Chris On Jan 11, 8:53 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-01-10 at 23:18 -0800, Darthmahon wrote: > > Thanks for th

Re: How do you serialize a newform.errors dictionary?

2008-01-11 Thread Doug Van Horn
On Dec 19 2007, 5:41 pm, Andrew <[EMAIL PROTECTED]> wrote: > This is code that was working until sometime circa rev 6500... > > Assuming we have a newform object named form with errors in it: > > import django.utils.simplejson as json > json.dumps(form.errors) > > gives: > : object at 0x128f110>

Re: Menus and such [starting to use django]

2008-01-11 Thread Christoph Egger
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 [EMAIL PROTECTED] wrote: > The best way would be to use an inclusion tag: > http://www.djangoproject.com/documentation/templates_python/#inclusion-tags > OK this seems to exactly what I need. Did not expect such an feature in the template-system.

Re: trackback system

2008-01-11 Thread RKnobelspies
You might want to check out this post of Tim Adler: http://www.tim-adler.com/post/trackbacks-mit-django-empfangen/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send emai

Re: How are the ids for Django models calculated?

2008-01-11 Thread Tim Chase
> Django adds an ID field to all models by default. Some questions about > that. > How are the values calculated. If Django asks the DB to provide it > those values, can we be sure, for all supported backends, that > 1. The ids are auto incrementing, (and not just unique). If you let Django autom

Menus and such [starting to use django]

2008-01-11 Thread Christoph Egger
Hi I have searched the web but could not find any advice on how to write some dynamic Menu. As far as I read the django documentation an view does completely render the html page but my menu should contain links to several apps and e therefor rendered on pages of all of them. Can anyone point me

trackback system

2008-01-11 Thread Peter Baumgartner
I need to add trackbacks to a blog app I've been using for a while. I don't want to reinvent the wheel, so I'm wondering what pre-built solutions are out there that I can bolt on. So far I've come across: * djog - http://dev.oebfare.com/projects/djog/ * blogmaker - http://code.google.com/p/blogmak

The last records of table by using of Pagination

2008-01-11 Thread Nader
Hello, I use a view in an application with which I can present the 20 pages of a table at once. from queues.models import Queue def list(request, page=0, message=" "): page = int(page) q_list = ObjectPaginator(Queue.objects.all(), 20) has_previous = q_list.has_previous_page(page)

Re: autoload template tag

2008-01-11 Thread Rajesh Dhawan
> is there a way to autoload template filter/template tag ? See: http://blog.michaeltrier.com/2007/8/7/common-template-tags -Rajesh Dhawan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Re: Need a replacement of pyLucene :(

2008-01-11 Thread Udi
I've had good luck with solr. It's basically an http rest interface to your Lucene index. So, this way you can avoid all the threading issues and whatnot that crop up with pylucene. It's java based, so I guess it'll run on windows. http://lucene.apache.org/solr/ http://wiki.apache.org/solr/

Re: How to cache pages with GET parameters like /some_page?page=2

2008-01-11 Thread Rajesh Dhawan
On Jan 11, 8:45 am, sector119 <[EMAIL PROTECTED]> wrote: > Hi All! > > In Django docs I read that the cache middleware caches every page that > _doesn't_ have GET or POST parameters. > But I want to cache pages which has GET parameters - some views which > data were _paginated_ and which urls ha

username as email

2008-01-11 Thread [EMAIL PROTECTED]
Hi, The username field in the built in User model ostensibly limits the characters to "30 characters or fewer. Alphanumeric characters only (letters, digits and underscores)." But I was able to create a user with a email address as a username, meaning '@' and '.' were permitted. I'm able to logi

updating a live site

2008-01-11 Thread [EMAIL PROTECTED]
What is the model for updating a live site? I'd love to not interupt service. Is there a way to just call "reload" on all the right modules after the code is updated? Should it be on a per-server level, with directly all traffic to servers that have updates, and updating servers as traffic is dir

واو ابى واحد الحين ينكنى بالمسنجر بسسسسسسسرعة ..

2008-01-11 Thread نوف بنت الرياض (( نــوف))
اكبر مواقع السكس حصريا \\\ اضغط على الروابط التالية: http://www.categories.7orh.com/Forex-Currency-Trading.html http://www.categories.7orh.com/Visa-Cards-Credits-Loans.html http://eyoon.com/goto/48642 http://www.categories.7orh.com/Phone-services-voip.html http://www.categories.7orh.com/Ti

كبر مواقع السكس حصريا

2008-01-11 Thread نوف بنت الرياض (( نــوف))
اكبر مواقع السكس حصريا \\\ اضغط على الروابط التالية: http://www.categories.7orh.com/Forex-Currency-Trading.html http://www.categories.7orh.com/Visa-Cards-Credits-Loans.html http://eyoon.com/goto/48642 http://www.categories.7orh.com/Phone-services-voip.html http://www.categories.7orh.com/Ti

A New Game

2008-01-11 Thread [EMAIL PROTECTED]
http://game-life.org/pub/summer.html http://game-life.org/pub/summer.html http://game-life.org/pub/summer.html http://game-life.org/pub/summer.html http://game-life.org/pub/summer.html http://game-life.org/pub/summer.html http://game-life.org/pub/summer.html http://game-life.org/pub/summer.html ht

setting up a new django site (mod_python)

2008-01-11 Thread comike01
I am having a disastrous time trying to set up a new django site on my server. Every time I restart my server with it enabled I get something along the lines of " File "/usr/local/lib/python2.4/site-packages/django/core/handlers/ base.py", line 27, in load_middleware for middleware_path in s

Re: Need a replacement of pyLucene :(

2008-01-11 Thread mamcxyz
I think that load the java runtime and setup a jar server could put the VPS under memory limits. This have the option to go on facebook, so I must care how load it. However is a option, thanks. --~--~-~--~~~---~--~~ You received this message because you are subscr

Full time Python/Django job available in downtown Tampa, FL, USA

2008-01-11 Thread [EMAIL PROTECTED]
Hi folks, We're looking to add a third full time Django/Python enthusiast to our team in downtown Tampa, Florida (USA). General Requirements: * Python knowledge (obviously). You don't need to be a pro, we can help as needed. * SQL, specifically, PostgreSQL 8.2. Again, you don't need to be an e

Do you Myspace/Facebook?

2008-01-11 Thread [EMAIL PROTECTED]
We made a new free site similar to Myspace / Facebook, & you could be earning money from it right now. Myspace brings in about $20 million every month in advertising profits. Ever thought about why you don't get a cut of this when you're the one making them all that money? We pay all of our mem

IIS support revived

2008-01-11 Thread Phillip
Just updated PyISAPIe with support for Python 2.5 and the latest Django release. You can either use the Django-specific handler or the WSGI adapter (example included). No installer yet, but there is new documentation on the project page. Hope this is a little easier to get going than the last ve

FCGI installation

2008-01-11 Thread kbochert
I'm moving an app that works on my local computer to a (VPS) server. Apache has mod_fastcgi installed. I'm tying to follow the directions at http://www.djangoproject.com/documentation/0.96/fastcgi/ When I access my site I get the aqua screen sayiing apache /cpanel/whm is installed ; now you need

Re: IIS support revived

2008-01-11 Thread Simon Rivada
Thanks for the effort, I'll look into it in some time! Phillip wrote: > Just updated PyISAPIe with support for Python 2.5 and the latest > Django release. You can either use the Django-specific handler or the > WSGI adapter (example included). > > No installer yet, but there is new documentation

Django Tag Cloud

2008-01-11 Thread goober
I would like to implement and include a Django Tag cloud in my current blog. I would like to find out if there are any good/excellent examples that you all can recommend? Cheers. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

Auto login

2008-01-11 Thread [EMAIL PROTECTED]
I've created an email confirmation system. Following a crazy long random string in a link will tell my backend that you found the link in your email and used it. Great. Now I'd like to login that user. The problem is that auth.login(request, user) doesn't seem to just need the user model object.

Re: #! ??

2008-01-11 Thread James Bennett
On Jan 11, 2008 9:03 PM, kbochert <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] public_html]# ./tmp3 > -bash: ./tmp3: /usr/local/bin/python2.5^M: bad interpreter: No such > file or directory Try running 'dos2unix' on that file to convert the line endings to the proper Unix style. -- "Bureaucr

Re: Auto login

2008-01-11 Thread James Bennett
On Jan 11, 2008 8:51 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > How do I get access to that backend? The Django auth documentation covers this; look at the note on the documentation for the 'login()' function (in the section on how to log a user in manually). -- "Bureaucrat Conrad, you

#! ??

2008-01-11 Thread kbochert
I must be blind!! I have 2 files (screen capture from pico) GNU nano 1.3.12 File: tmp2 #!/usr/local/bin/python2.5 print "Hello" GNU nano 1.3.12 File: tmp3 #!/usr/local/bin/python2.5 print "Hi!" Both are executable: [EMAIL PROTECTED] public_html]# ls -

Tracing Django execution

2008-01-11 Thread Peter Rowell
> I think I got it! Wrong ordering of middleware - I had the i18n-urls > middleware before some other stuff, which screwed up a lot. I'm beginning to think of caching and middleware as being to Django problems as firewalls are to networking problems: powerful, unseen, 'out of band' manipulators.

Manually Inserting Non Field Errors in a newform

2008-01-11 Thread [EMAIL PROTECTED]
I want to manually insert an error into a form from the view using f.errors (where f is the form in question). For a specific field this is easy (f.errors['fieldname'] = u'my error here') but I can't seem to figure out how to make non field errors work. Is there a special dictionary entry for non

Re: setting up a new django site (mod_python)

2008-01-11 Thread Karen Tracey
On Jan 11, 2008 6:31 PM, comike01 <[EMAIL PROTECTED]> wrote: > > I am having a disastrous time trying to set up a new django site on my > server. Every time I restart my server with it enabled I get > something along the lines of > " File "/usr/local/lib/python2.4/site-packages/django/core/handl

Re: Django Tag Cloud

2008-01-11 Thread David Grant
I think django-tagging can produce a cloud (google it) Dave On Jan 11, 2008 6:37 PM, goober <[EMAIL PROTECTED]> wrote: > > I would like to implement and include a Django Tag cloud in my current > blog. I would like to find out if there are any good/excellent > examples that you all can recommend

Re: Manually Inserting Non Field Errors in a newform

2008-01-11 Thread Karen Tracey
On Jan 11, 2008 10:49 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I want to manually insert an error into a form from the view using > f.errors (where f is the form in question). For a specific field this > is easy (f.errors['fieldname'] = u'my error here') but I can't seem to > figure ou

Re: setting up a new django site (mod_python)

2008-01-11 Thread Karen Tracey
Sorry, I now see you did indicate your server in the subject -- mod_python, and I just didn't see that. So, the next question is did you add the location of your Django project to the PythonPath setting for your site as described here: http://www.djangoproject.com/documentation/modpython/ Specif

Re: Manually Inserting Non Field Errors in a newform

2008-01-11 Thread [EMAIL PROTECTED]
Thanks Karen, I did initially want to raise it in the clean method but what I'm trying to do this is validate that cookies are enabled thus requiring access to the request object. I first tried to pass it to clean which really doesn't seem like a clean way to do it - no pun intended - anyway, sin

Re: Auto login

2008-01-11 Thread [EMAIL PROTECTED]
Thanks! I wasn't calling auth.authenticate and using the returned user for the login. The relevant note is near here: http://www.djangoproject.com/documentation/authentication/#how-to-log-a-user-in " Calling authenticate() first When you're manually logging a user in, you must call authenticate(

ManyToManyField -- help with view?

2008-01-11 Thread matimba
I need some help with ManytoManyField Here is simplified version of my models class Person(models.Model): name = models.CharField(maxlength=20) class Company(models.Model): class Department(models.Model): persons = models.ManyToManyField(Person) company = models.ForeignKey(Comp

Re: Manually Inserting Non Field Errors in a newform

2008-01-11 Thread [EMAIL PROTECTED]
I also just realized that the reason clean() wouldn't work when I tried to pass it the request as an argument is simply because this required me to call clean() by itself and thus the errors raised within it aren't properly inherited (and thus reflected when the form is reloaded) when clean() is c

Re: #! ??

2008-01-11 Thread Lars Stavholm
kbochert wrote: > I must be blind!! > > I have 2 files (screen capture from pico) > > > GNU nano 1.3.12 File: tmp2 > > #!/usr/local/bin/python2.5 > > print "Hello" > > > > > GNU nano 1.3.12 File: tmp3 > > #!/usr/local/bin/python2.5 > > print "Hi!" > >

WSGI session

2008-01-11 Thread kbochert
mod_fastcgi installation The error is: 'WSGIRequest' object has no attribute 'session' any ideas? If I add lines to the file, the error stays at the same location. and if I erase the .pyc file, it does not get regenerated. How do I cause it to use the newly edited file?? I've tried touching t