Re: Can't get django comments to pick up alternate form

2009-01-24 Thread Theme Park Photo, LLC
> Do you have django.contrib.comments   > coming before your own app in INSTALLED_APPS, by any chance? Yes I did! Thanks for the hint. I put my own app first, and now it's finding it just fine! --~--~-~--~~~---~--~~ You received this message because you are

Re: Can't get django comments to pick up alternate form

2009-01-24 Thread Eric Abrahamsen
On Jan 25, 2009, at 1:54 PM, Theme Park Photo, LLC wrote: > > Also from reading the source, I don't see any mechanism by which it > would pick up form.html from any other than the three directories > enumerated there. Am I really supposed to edit and setup.py install > the django framework to

Re: Can't get django comments to pick up alternate form

2009-01-24 Thread Theme Park Photo, LLC
Also from reading the source, I don't see any mechanism by which it would pick up form.html from any other than the three directories enumerated there. Am I really supposed to edit and setup.py install the django framework to change the comments template? On Jan 24, 5:13 pm, "Theme Park Photo,

Re: sqlite3 problems setting up

2009-01-24 Thread DragonSlayre
On Jan 25, 6:04 pm, Steve Holden wrote: > > When you install something by running > >   python setup.py install > > it gets installed into the python that is used to run setup.py. It looks > like you had /usr/local/bin on your path when you installed django, but > not when

Re: sqlite3 problems setting up

2009-01-24 Thread Steve Holden
DragonSlayre wrote: > Just doing some exploring - noticing that: > > * /usr/lib/python2.5/site-packages has a pysqlite2 folder as well as a > PIL folder > * /usr/local/lib/python2.6/site-packages has just django in it > > I'm not sure how the whole site-packages things work, or why python > 2.5

Re: sqlite3 problems setting up

2009-01-24 Thread DragonSlayre
Just doing some exploring - noticing that: * /usr/lib/python2.5/site-packages has a pysqlite2 folder as well as a PIL folder * /usr/local/lib/python2.6/site-packages has just django in it I'm not sure how the whole site-packages things work, or why python 2.5 is in /usr/lib/ and python 2.6 is

Re: Queryset unexpectedly turning into list

2009-01-24 Thread mb0...@googlemail.com
Ah, ok thanks for the explanation :) --~--~-~--~~~---~--~~ 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

Iterating over jwplayers

2009-01-24 Thread Skylar
I have a simple page with not much css and just trying to iterate over some videos and get them all to display on the same page. They seems to be stacking on top of eachother rather than each having it's own space. This is not really a Django issue but I'm wondering if anyone has had a similar

Re: sqlite3 problems setting up

2009-01-24 Thread DragonSlayre
Importing sqlite3 fails as well (if I type this into a python shell) import sqlite3 Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.6/sqlite3/__init__.py", line 24, in from dbapi2 import * File "/usr/local/lib/python2.6/sqlite3/dbapi2.py",

Re: sqlite3 problems setting up

2009-01-24 Thread DragonSlayre
This is my path currently: ['', '/usr/local/lib/python26.zip', '/usr/local/lib/python2.6', '/usr/ local/lib/python2.6/plat-linux2', '/usr/local/lib/python2.6/lib-tk', '/ usr/local/lib/python2.6/lib-old', '/usr/local/lib/python2.6/lib- dynload', '/usr/local/lib/python2.6/site-packages'] On Jan

sqlite3 problems setting up

2009-01-24 Thread DragonSlayre
I've just done a fresh install of python 2.6 and django 1.0.2, and sqlite3 in ubuntu, and I've cloned my repository, and tried python manage.py runserver, but then I get this error: File "/usr/local/lib/python2.6/site-packages/django/db/backends/ sqlite3/base.py", line 27, in raise

Re: Multithreaded development server

2009-01-24 Thread Graham Dumpleton
On Jan 25, 11:08 am, Almad wrote: > Hello, > > is there a way to run development server multithreaded, so it can > handle recurring requests? Just use Apache/mod_wsgi instead as described in: http://blog.dscpl.com.au/2008/12/using-modwsgi-when-developing-django.html Use

Re: Datetime and apache log files show wrong timezone

2009-01-24 Thread Graham Dumpleton
On Jan 25, 2:27 am, simong wrote: > On Jan 24, 2:30 pm, Graham Dumpleton > wrote: > > > > > On Jan 24, 8:46 pm, simong wrote: > > > > My apologies in advance if this isn't a direct django issue but I > > > can't work

Re: django-smtpd allows you to handle email messages just like Django processes HTTP requests

2009-01-24 Thread John M
Wow, very cool. How will this integrate on a production server? is this a true Mailto: link or something else. I mean it doesn't look like a real SMTP engine. I love the idea though! J On Jan 24, 8:29 am, nside wrote: > Hello, > > I just started a new project that

Re: Multithreaded development server

2009-01-24 Thread John M
Some threads on here have used CherryPy's django Plug-in and it's a full server too. You only need to account for Admin files via some well know workings. J On Jan 24, 4:08 pm, Almad wrote: > Hello, > > is there a way to run development server multithreaded, so it can > handle

Re: Django-OAuth Issue

2009-01-24 Thread Chris
Hello David sorry for the late response. I think that I found a minor bug with django-oauth. So I tried Malcolm Tredinnick's recommendation and used the client oauth library found here: http://oauth.googlecode.com/svn/code/python/oauth/example/client.py I filled in the variables as so: SERVER

Can't get django comments to pick up alternate form

2009-01-24 Thread Theme Park Photo, LLC
The documentation for render_comment_form hints that you can override the default template by putting comments/form.html with your own form in your templates directory. No matter what I do, it won't pick up my alternate form. Is there anyway to see the actual directories django is checking for

Re: Multithreaded development server

2009-01-24 Thread Chris
On Jan 24, 7:08 pm, Almad wrote: > Hello, > > is there a way to run development server multithreaded, so it can > handle recurring requests? > > Thanks, > > Almad Yes, there's a patch attached to http://code.djangoproject.com/ticket/3357 that will enable multi-threading in the

Multithreaded development server

2009-01-24 Thread Almad
Hello, is there a way to run development server multithreaded, so it can handle recurring requests? Thanks, Almad --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Adding a slug

2009-01-24 Thread Russell Keith-Magee
On Sun, Jan 25, 2009 at 2:14 AM, Adi Sieker wrote: > > Hi, > > as far as I know loaddata doesn't use the ORM to insert the data. Incorrect. loaddata does use the ORM, but it uses raw save mode, which disables custom save methods. Raw save mode also disables any database field

Re: Queryset unexpectedly turning into list

2009-01-24 Thread Alex Koshelev
All magic happens in line: if(queryset):#check if query returned somethin To perform this check QuerySet is evaluated and makes query to DB and stores result in list. After that QuerySet slice operation make real slice on underlying cache and of cource return list. On Sun, Jan 25, 2009 at 1:26

Re: Queryset unexpectedly turning into list

2009-01-24 Thread Ramiro Morales
On Sat, Jan 24, 2009 at 8:26 PM, mb0...@googlemail.com wrote: > > Hi, > > please have a look at: http://dpaste.com/112603/ > > Can someone tell me why the sliced queryset suddenly turns into a > list? > I'm still new to Python/Django so I can't tell if it is a bug... but >

Queryset unexpectedly turning into list

2009-01-24 Thread mb0...@googlemail.com
Hi, please have a look at: http://dpaste.com/112603/ Can someone tell me why the sliced queryset suddenly turns into a list? I'm still new to Python/Django so I can't tell if it is a bug... but it sure cost me some time because in my eyes it was something complete out of the blue. Django

Customize form fields after instantiation

2009-01-24 Thread George Sakkis
Hello all, I'd like an easy way to customize one or more form fields after being instantiated by a ModelForm. I didn't find anything close in the docs so I came up with the following: from django.forms import ModelForm class CustomModelForm(ModelForm): # a mapping of field names to

Re: Use _meta.fields to return the datatype

2009-01-24 Thread dj
Thanks!!! It was exactly what I was looking for :-). On Jan 24, 3:20 am, Steve Holden wrote: > dj wrote: > > On Jan 23, 10:12 pm, dj wrote: > > >> Hello All, > > >> I am a Django novice, and I recently discovered the _meta methods for > >> use with

Re: Problem with contenttype/renaming of an app

2009-01-24 Thread felix
look in auth_permission I would just rename them by hand or by sql http://crucial-systems.com On Sat, Jan 24, 2009 at 8:19 PM, Benjamin Buch wrote: > > Hi, > > during development, I messed around with an app name. > First it was called 'body copies' (no native speaker!),

RELEASED: django-batchimport 0.2

2009-01-24 Thread Keyton Weissinger
Hi Folks, I've updated the django-batchimport project to version 0.2. This new version allows for easy import of relationship data (many-to-many, for example) for previously imported data -- even if your original data doesn't have unique IDs. There's also the new ability to override field values

Re: Need help with models

2009-01-24 Thread Adrián Ribao
Do you use a custom Model Manager or something similar to make it optimal? I'm using this approach now but it needs to make a query for every element, which is not very efficient. I'd be happy if one of the django "brains" tell us how could we do this. Thank you. On 24 ene, 21:07, Kless

Re: Need help with models

2009-01-24 Thread Kless
I also was looking for a solution for it and I found that the most optimal is the first approach --at least for me--. You have a normal table with data entered into a language by default, and then it's used another one to translating the text fields from that main table. The difference with

Re: InternalError and transactions

2009-01-24 Thread Rob Hudson
On Jan 24, 11:41 am, Karen Tracey wrote: > Just a note -- what you are describing is unique URLs per-user.  You > confused me a bit with how you phrased it as duplicate URLs are allowed by > what you have specified, so long as they are associated with different > users.

Re: InternalError and transactions

2009-01-24 Thread Karen Tracey
On Sat, Jan 24, 2009 at 12:52 PM, Rob Hudson wrote: > > I'm a bit at a loss as to where to go from here... > > I have simple Link and Category models. My Link model is essentially: > user_id, category (FK), name, URL. I have a Meta unique_together on > (user, url) so no

Problem with contenttype/renaming of an app

2009-01-24 Thread Benjamin Buch
Hi, during development, I messed around with an app name. First it was called 'body copies' (no native speaker!), then I renamed it to 'stanza', which I liked better. No problem there: As there was no data in the db, I deleted the tables and created them again, with other names. Then I

Formset for user-specific data

2009-01-24 Thread Roman Odaisky
Greetings, In a Web app, users can create categories for their data. Categories are stored in a model as (PK, user, name, description). I want users to be able to edit categories that belong to them using a formset. To display a subset of the fields is simple, I just use the queryset

Re: Where can i get a wiki formatting widget?

2009-01-24 Thread Brian Neal
On Jan 24, 10:23 am, Brian Neal wrote: > On Jan 24, 9:44 am, Gath wrote: > > > Guys > > > Where can i get a wiki formatting widget for django? > > > I have enough notes fields in my models and i would want a nice wiki > > widget for entering data! > > >

Re: Multiple static media roots?

2009-01-24 Thread John Baker
OK thanks and yes it does but that's half the story. I haven't made myself very clear. The ImageField still tries to append /media/ to the image upload_to path rather than /uploads/ which would retrieve them from the dynamic media root rather than the application media. My point was how do I get

InternalError and transactions

2009-01-24 Thread Rob Hudson
I'm a bit at a loss as to where to go from here... I have simple Link and Category models. My Link model is essentially: user_id, category (FK), name, URL. I have a Meta unique_together on (user, url) so no duplicate URLs get entered. I'm testing this by trying to purposefully enter a

Re: Import Fixtures per test

2009-01-24 Thread Vitaly Babiy
Yeah this is true, that would work. Thanks, Vitaly Babiy On Sat, Jan 24, 2009 at 12:38 PM, Alex Koshelev wrote: > Extract this test to its own TestCase with needed fixtures. > > > On Sat, Jan 24, 2009 at 8:15 PM, Vitaly Babiy wrote: > >> Is there a way

Need help with models

2009-01-24 Thread Adrián Ribao
Hello everybody, I need to create dinamic content in several models. I have 3 approaches: approach 1: class News(models.Model): date = ... visible = ... text = models.CharField(max_length=255) class NewsTrans(models.Model): news = models.ForeignKey(News) lang =

Re: Import Fixtures per test

2009-01-24 Thread Alex Koshelev
Extract this test to its own TestCase with needed fixtures. On Sat, Jan 24, 2009 at 8:15 PM, Vitaly Babiy wrote: > Is there a way to specify which fixtures I want to import per test? > > Vitaly Babiy > > > > --~--~-~--~~~---~--~~ You

Re: Last-Modified headers and render_to_response

2009-01-24 Thread Alex Koshelev
Just now you can store response object for a while and don't return it immediately. When set needed headers response = render_to_response("foobar.html") response["Last-Modified"] = "some value" return response On Sat, Jan 24, 2009 at 8:24 PM, Viktor Nagy wrote: > Hi, >

Last-Modified headers and render_to_response

2009-01-24 Thread Viktor Nagy
Hi, I would like to provide proper Last-Modified headers, but in general my code uses the render_to_response shortcut. As far as I understand the code, even though I can add a **kwargs argument to render_to_response, it won't get added to my response object. Is there an easy way to still achieve

Import Fixtures per test

2009-01-24 Thread Vitaly Babiy
Is there a way to specify which fixtures I want to import per test? Vitaly Babiy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Adding a slug

2009-01-24 Thread Adi Sieker
Hi, as far as I know loaddata doesn't use the ORM to insert the data. So things like signals and overloaded save methods don't work when using loaddata. adi On 24.01.2009, at 17:48, Kless wrote: > > > > On 24 ene, 15:51, Daniel Roseman > wrote: >> Are you

Re: Getting Logged in User with Test Client

2009-01-24 Thread Vitaly Babiy
Yes either way would work I was just wondering if there was a more cleaner way of doing so. Vitaly Babiy On Sat, Jan 24, 2009 at 11:47 AM, Masklinn wrote: > > On 24 Jan 2009, at 06:22 , Vbabiy wrote: > > > >def test_showAccountWithZeroTrackers(self): > >

Re: Automatically Generating Non-Ajax Client-Side Form Validation

2009-01-24 Thread Tim
See http://code.google.com/p/django-ajax-forms/ I started this project to handle your use case. On Jan 24, 3:52 am, Chris wrote: > Is anyone aware of a simple way to automatically generate non-Ajax > form validation? I've seen some useful posts aboutAjax-form > validation

django-smtpd allows you to handle email messages just like Django processes HTTP requests

2009-01-24 Thread nside
Hello, I just started a new project that basically allows you to write email handlers in Django. It could be used in a user-registration application where the user could reply to the email instead of clicking on a URL. I drafted a quick documentation at

Re: Adding a slug

2009-01-24 Thread Kless
On 24 ene, 15:51, Daniel Roseman wrote: > Are you saying that the slug is not being created when you reload your > previously dumped data via ./manage.py loaddata? This is expected > behaviour. Yes, that's it. The slug is succesfully created when a new objects

Re: Getting Logged in User with Test Client

2009-01-24 Thread Masklinn
On 24 Jan 2009, at 06:22 , Vbabiy wrote: > >def test_showAccountWithZeroTrackers(self): >self.client.login(username='user', password='test123') > > How can I get the user model when I use the client to login in to the > application? > Why not simply use

Re: Getting Logged in User with Test Client

2009-01-24 Thread Nathaniel Whiteinge
On Jan 23, 10:22 pm, Vbabiy wrote: > How can I get the user model when I use the client to login in to the > application? This method is a little ugly, but it works:: from django.contrib.auth.models import User def test_showAccountWithZeroTrackers(self):

Re: Where can i get a wiki formatting widget?

2009-01-24 Thread Brian Neal
On Jan 24, 9:44 am, Gath wrote: > Guys > > Where can i get a wiki formatting widget for django? > > I have enough notes fields in my models and i would want a nice wiki > widget for entering data! > > Paul I'm using the markItUp! javascript editor to enter Markdown syntax,

Re: Access to Settings

2009-01-24 Thread Daniel Roseman
On Jan 24, 3:28 pm, nosrednak...@gmail.com wrote: > Hello Django Users, > > I am writing an application that needs to do some 'advanced' SQL to update   > some tables. I am curious about the best way to lock tables and make the   > transaction safe. The solution I wrote for a Quick and dirty is:

Re: API mismatch bug with CursorDebugWrapper?

2009-01-24 Thread Nathaniel Whiteinge
On Jan 23, 7:14 pm, Karen Tracey wrote: > Take a look at the implementation of CursorDebugWrapper > __getattr__ in django/db/backends/util.py -- CursorDebugWrapper defers to > the wrapped cursor for anything it itself doesn't implement. Thanks, Karen. You're exactly right. I

Re: Adding a slug

2009-01-24 Thread Daniel Roseman
On Jan 24, 12:49 pm, Kless wrote: > I want to add a new field --slug-- to tables where any data is being > used in the URL > > I dumped all data, added that new field > -- > slug = models.SlugField(_('slug')) > -- > > And I created a hook to save it. >

Re: Multiple static media roots?

2009-01-24 Thread Daniel Roseman
On Jan 24, 2:43 pm, John Baker wrote: > > write a custom file > > storagehttp://docs.djangoproject.com/en/dev/topics/files/ > > Thanks. However, I know I can store them somewhere else but my problem > is serving them up again in the local development environment. The >

Where can i get a wiki formatting widget?

2009-01-24 Thread Gath
Guys Where can i get a wiki formatting widget for django? I have enough notes fields in my models and i would want a nice wiki widget for entering data! Paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Access to Settings

2009-01-24 Thread nosrednakram
Hello Django Users, I am writing an application that needs to do some 'advanced' SQL to update some tables. I am curious about the best way to lock tables and make the transaction safe. The solution I wrote for a Quick and dirty is: DATABASE_ENGINE =

Re: Datetime and apache log files show wrong timezone

2009-01-24 Thread simong
On Jan 24, 2:30 pm, Graham Dumpleton wrote: > On Jan 24, 8:46 pm, simong wrote: > > > > > My apologies in advance if this isn't a direct django issue but I > > can't work out where the problem is coming from. > > > My server's system time

Re: Datetime and apache log files show wrong timezone

2009-01-24 Thread simong
On Jan 24, 2:30 pm, Graham Dumpleton wrote: > On Jan 24, 8:46 pm, simong wrote: > > > > > My apologies in advance if this isn't a direct django issue but I > > can't work out where the problem is coming from. > > > My server's system time

Re: Multiple static media roots?

2009-01-24 Thread John Baker
> write a custom file storagehttp://docs.djangoproject.com/en/dev/topics/files/ Thanks. However, I know I can store them somewhere else but my problem is serving them up again in the local development environment. The django.views.static.serve doesn't take an argument for serving from a

Re: Datetime and apache log files show wrong timezone

2009-01-24 Thread Graham Dumpleton
On Jan 24, 8:46 pm, simong wrote: > My apologies in advance if this isn't a direct django issue but I > can't work out where the problem is coming from. > > My server's system time runs Centos 5 and is set to Europe/London: > > -bash-3.2$ date > Sat Jan 24 12:26:14 GMT

Re: Multiple static media roots?

2009-01-24 Thread Kenneth Gonsalves
On Saturday 24 Jan 2009 6:59:57 pm John Baker wrote: > I need to separate static media roots into "static" (belonging to > application - css, images etc) and "dynamic" (uploaded by users with > filefields etc). > > The point is that truly "static" media doesn't change and is part of > the

Re: Multiple static media roots?

2009-01-24 Thread Raffaele Salmaso
John Baker wrote: > Any suggestions? write a custom file storage http://docs.djangoproject.com/en/dev/topics/files/ -- ()_() | That said, I didn't actually _test_ my patch. | + (o.o) | That's what users are for! | +---+ 'm m' |

Multiple static media roots?

2009-01-24 Thread John Baker
I need to separate static media roots into "static" (belonging to application - css, images etc) and "dynamic" (uploaded by users with filefields etc). The point is that truly "static" media doesn't change and is part of the deployed code. Dynamic "static" media is uploaded and kept in a

Re: Related Field has invalid lookup error

2009-01-24 Thread dwil...@gmail.com
Ramiro, Thanks very much - I knew I must have been overlooking something. Adding __exact did the trick nicely. Derek On Jan 24, 7:38 am, Ramiro Morales wrote: > On Sat, Jan 24, 2009 at 2:30 AM, dwil...@gmail.com wrote: > > > I've got an odd-looking error

Adding a slug

2009-01-24 Thread Kless
I want to add a new field --slug-- to tables where any data is being used in the URL I dumped all data, added that new field -- slug = models.SlugField(_('slug')) -- And I created a hook to save it. -- def save(self): #if not self.slug: self.slug =

Datetime and apache log files show wrong timezone

2009-01-24 Thread simong
My apologies in advance if this isn't a direct django issue but I can't work out where the problem is coming from. My server's system time runs Centos 5 and is set to Europe/London: -bash-3.2$ date Sat Jan 24 12:26:14 GMT 2009 -bash-3.2$ date -u Sat Jan 24 12:26:17 UTC 2009 -bash-3.2$

Re: Related Field has invalid lookup error

2009-01-24 Thread Ramiro Morales
On Sat, Jan 24, 2009 at 2:30 AM, dwil...@gmail.com wrote: > > I've got an odd-looking error when I try to use a related model's > field in the ORM. Here's the traceback: > > [...] > File "/home/dwillis/lib/python2.5/django/db/models/fields/ > related.py", line 157, in

Re: Using dinamically created tables

2009-01-24 Thread Ned Batchelder
I guess I would still recommend that you not get too fancy. Your data rate is 50 plants, 8000 records each, for a total of 400k records per day. I have a MySQL table that added 500k records in the last 24 hours, and it's fine. It's just an ordinary Innodb table, with no special

Re: Using dinamically created tables

2009-01-24 Thread Alessandro Ronchi
One simple solution for my problem is table partitioning. Both MySQL and PosgreSQL can handle that. On PGSQL I can create a master table for my model and one partition for every value of a master key. It should be great. Do you think it's possible to handle a child table creation (also with a

Re: Use _meta.fields to return the datatype

2009-01-24 Thread Steve Holden
dj wrote: > On Jan 23, 10:12 pm, dj wrote: > >> Hello All, >> >> I am a Django novice, and I recently discovered the _meta methods for >> use with models. >> Using _meta.fields to return the field names in a model instance, the >> current value of an instance