Re: SUPPORTS_TRANSACTIONS Error while running tests

2010-10-06 Thread Russell Keith-Magee
On Thu, Oct 7, 2010 at 1:32 PM, girish shabadimath wrote: > Hi all, > > im using django 1.2 > > i dont want django to create test_db for testing, instead should use the > main database > > i have override  run_tests method to do unit tests,,, > here is the run_tests

SUPPORTS_TRANSACTIONS Error while running tests

2010-10-06 Thread girish shabadimath
Hi all, im using django 1.2 i dont want django to create test_db for testing, instead should use the main database i have override run_tests method to do unit tests,,, here is the run_tests code: class Custom_TestSuiteRunner(DjangoTestSuiteRunner): def run_tests(self, test_labels,

Re: Django Registration password reset problem

2010-10-06 Thread Joel Klabo
Thanks for checking it out, this is the way it's set up: http://dpaste.org/e6Ra/ it looks like it's using registration.auth_urls to direct to the django.contrib.auth.urls ? I don't understand why registration.auth_urls would exist... On Oct 6, 6:32 pm, Ian Lewis wrote: > I

Re: Django in Depth

2010-10-06 Thread girish shabadimath
Hi Paul, http://djangocon.blip.tv/file/3322277/ On Thu, Oct 7, 2010 at 9:55 AM, Gath wrote: > Guys, > > Please someone out there help me with a download link of James Bennett > video on "Django in Depth" that was presented during pycon2010. > > All the links am getting

Manually sorting items in a table - Doubly-Linked List vs sort_index

2010-10-06 Thread Steven Sacks
I've got items in a list that a user can arbitrarily move around in whatever order they want. Additionally, they can add a group of items to a list in a specific position within that list. Further, they can sort multiple items at once, meaning they can select one to many, sequential or

Geometry field, WKT vs JSON, precision

2010-10-06 Thread Daniel
When I read the value of my PolygonField in the usual way, ie. 'modelInstance.field', I get a WKT string with what looks like all of the decimal places the type carries, eg: POLYGON ((26.7383422851562500 37.3787307739257812, 26.7313919067382812 37.3698196411132812, 26.7424850463867188

Django in Depth

2010-10-06 Thread Gath
Guys, Please someone out there help me with a download link of James Bennett video on "Django in Depth" that was presented during pycon2010. All the links am getting don't have a download link. Thanks Paul -- You received this message because you are subscribed to the Google Groups "Django

Re: unique_together to bind three fields

2010-10-06 Thread Shawn Milochik
The answer is in the error: ManyToManyFields are not supported in unique_together. Instead, you can put custom validation in your form's save(), your ModelForm, or (in Django 1.2) in your model validation. -- You received this message because you are subscribed to the Google Groups "Django

unique_together to bind three fields

2010-10-06 Thread meenakshi
Hi, I am new to Django and Python and have been working through the tutorial. I would like to modify the polls app in the tutorial such that I can track individual users who vote in a poll, keep a record of their choice, and not allow any user to vote more than once in any given poll.

Re: Django Registration password reset problem

2010-10-06 Thread Ian Lewis
I just took a cursory look at this but did you make sure to add something like the following to your urlpatterns in urls.py? urlpatterns=patterns('', ... (r'^accounts/', include('django.contrib.auth.urls')), ... ) On Thu, Oct 7, 2010 at 1:29 AM, Joel Klabo

Re: data synchronization

2010-10-06 Thread Steve Holden
On 10/6/2010 9:17 PM, hooda_28 wrote: > good day django peeps, i don't know if this is the right place to post > here but im giving it a try, > > website A is a publishing company, then website B is an agent of > website, as an agent some of the orders from website B are given to > website A.

data synchronization

2010-10-06 Thread hooda_28
good day django peeps, i don't know if this is the right place to post here but im giving it a try, website A is a publishing company, then website B is an agent of website, as an agent some of the orders from website B are given to website A. both websites run in django. how will i synchronize

Confoo 2011 Call for Speakers

2010-10-06 Thread Mathieu Leduc-Hamel
Greetings Djangoers, We, Montréal-Python, are the coordinators of the Python track at ConFoo 2011 and we are very proud to announce our call for speakers. PHP-Québec, Montréal-Python, Montreal.rb, W3Qc, and OWASP Montréal are organizing the first edition of the ConFoo conference, which will be

Overriding mod_python's default 500 error when "wonky" Django config problems strike

2010-10-06 Thread palewire
When Django is up, it handles 500 errors. When Django is screwed, mod_python will throw a bare bones "Internal Server Error." This is described well in the docs at the following link: http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#error-handling My question: Is there a way to

Re: Strange 404s

2010-10-06 Thread Sam Walters
I concurr. I have seen: /phpMyAdmin/scripts/setup.php /phpmyadmin/ /user/soapCaller.bs I guess there are security holes in old versions of phpmyadmin. Some sort of content management with setup.php left unconfigured/unsecured so the bots are just checking out all of those url's. sam_w On Thu,

Re: Strange 404s

2010-10-06 Thread Daniel Roseman
On Oct 6, 10:32 pm, Scot Hacker wrote: > We have enabled the option to have 404 requests automatically emailed   > to admins. It works well, but sometimes we get strange reports like   > this: > > > Referrer:http://ourdomain.edu/forums/software/ > > Requested URL:

Strange 404s

2010-10-06 Thread Scot Hacker
We have enabled the option to have 404 requests automatically emailed to admins. It works well, but sometimes we get strange reports like this: Referrer: http://ourdomain.edu/forums/software/ Requested URL: /forums/software/ User agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) IP

Modeltranslations Inheritance Problem

2010-10-06 Thread Katrina
I am using the Modeltranslations app to translate some of my model fields. The way the app works is this: you specify which languages you are using in settings.py and which fields you are translating in a translation.py file located in your project folder. At runtime, modeltranslations creates

Re: How can I flush my response stream in django?

2010-10-06 Thread Jeremy Dunck
On Wed, Oct 6, 2010 at 3:58 PM, Emil Stenström wrote: > On Aug 24 2007, 8:18 pm, "Jeremy Dunck" wrote: >> >> On 8/24/07, whitesmell wrote: >> > One of my  response content was build by several synchronous method, >> > how can Iflushmy  

Re: How can I flush my response stream in django?

2010-10-06 Thread Emil Stenström
On Aug 24 2007, 8:18 pm, "Jeremy Dunck" wrote: On 8/24/07, whitesmell wrote: > One of my response content was build by several synchronous method, > how can Iflushmy response to client browser as soon as some part of > the response content is ready?

Re: unset vary:cookie header with generic views / 13285

2010-10-06 Thread jfenton
Here's a stick to whack this with: NoVarySessionMiddleware - http://github.com/jbalogh/commonware On Aug 26, 2:15 pm, jfenton wrote: > I'm using 1.1.1.  I've got a bunch of legacy code written with date- > based generic views: django.views.generic.date_based . I think that >

possible model relations?

2010-10-06 Thread alecx
Hello, I try to build a kind of call tracker app. The call intaker creates a new item (main model) and makes some notes (subject, issue and which printer nr, customer, technician,... all with modelfields) all in one view. But I am struggling with the model relations and the form saving. I cannot

Re: Django admin in app installed in directory below root.

2010-10-06 Thread Daniel Roseman
On Oct 6, 5:35 pm, Joe Murphy wrote: > Okay, so I've got my django project "bar" installed in, say,www.foo.com/bar/ > . I'm going to install another project inwww.foo.com, so I have nginx > using /bar/ as the root for the bar. This works fine for everything > except... the

RE: adding process_exception() to middleware; newbie needs help

2010-10-06 Thread Sells, Fred
Thanks to Daniel and Bruno, will try your suggestions soonest. -- 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...@googlegroups.com. To unsubscribe from this group, send email to

Re: admin site not working, problem with urls.py?

2010-10-06 Thread Lisa
Hi, It seems you're right CSS isn't being served correctly, so what is the easiest way to include the css files, I'm using apache2 w/ a conf file and modpython... Thanks, Lisa On Oct 6, 11:36 am, Sandro Dutra wrote: > Ah yeah, forget to comment this... > > If you're using the

Re: admin site not working, problem with urls.py?

2010-10-06 Thread Sandro Dutra
Ah yeah, forget to comment this... If you're using the django dev server to test your application, you'll have to set where the static files are, you can do this with a builtin view: django.views.static.serve. 2010/10/6 Steve Holden > It's much more likely that your CSS

Django admin in app installed in directory below root.

2010-10-06 Thread Joe Murphy
Okay, so I've got my django project "bar" installed in, say, www.foo.com/bar/ . I'm going to install another project in www.foo.com, so I have nginx using /bar/ as the root for the bar. This works fine for everything except... the django admin, which is at /bar/admin/ . The markup in the admin is

Re: Django Registration password reset problem

2010-10-06 Thread Joel Klabo
So now I am redirecting to the named url in the URL conf. That is now giving me the error: The included urlconf registration.auth_urls doesn't have any patterns in it ... http://dpaste.org/OOw5/ any ideas would be greatly appreciated On Oct 5, 5:56 pm, Joel Klabo wrote: >

Re: admin site not working, problem with urls.py?

2010-10-06 Thread Steve Holden
It's much more likely that your CSS style sheets are not being served correctly - you can check this by looking at the page's HTML source and then pasting the style sheet's URL into your browser's location bar. The Django 1.0 admin is a reasonably well-styled layout, so you certainly shouldn't be

Re: admin site not working, problem with urls.py?

2010-10-06 Thread Sandro Dutra
Your Django version is really outdated. I think you can update using the Update Manager or calling the terminal and typing: sudo apt-get update This command will resync the packages with the current version on distro repository. Alternatively you can update via python setuptools, using the

Id fields replacement in ModelFormSet forms

2010-10-06 Thread Avanguard
Hello! I use model formset with queryset parameter and found some strange django behaviour: In my model formset forms 'id' fields are always replaced by ModelChoiceField instances. That become to be a problem when formset.is_valid() and formset.save() methods are called - every such call

Re: Confused about testing a page protected with @login_required

2010-10-06 Thread Brandon Taylor
Apparently, this is a cookie related issue: http://stackoverflow.com/questions/2705235/django-test-failing-on-a-view-with-login-required I'm using Django 1.1.1 for use with Django-CMS and Python 2.6.5, so the problem with cookies as described by the Stack Overflow article explains why my test

Re: admin site not working, problem with urls.py?

2010-10-06 Thread Lisa Gandy
Thanks for the help, This ended up working (r'^admin/(.*)', admin.site.root) Now, when I look at the admin panel, its really funky looking, it definitely works, but its like its missing a template. Do yout hink its b/c the version of django on teh server is old? Its 1.0.4 If thats the

Re: Iterating tree-like data structures with django

2010-10-06 Thread Cesar Canassa
I had the same issue a few months ago. My only answer to you is that is not worth to develop this all for self. There is a great django library called django-mptt that does all the heavy lifting for you. It's very fast, has many helper functions and even

Re: Iterating tree-like data structures with django

2010-10-06 Thread Paweł Roman
Yuck, in_bulk() is useless! I thought it would return a nice dictionary just as expected, but instead it makes me deliver a list of keys first. Why? Eventually I wrote something more usable: mydict = {} for model in MyModel.objects.all().iterator(): mydict[model.id]=model

Re: Iterating tree-like data structures with django

2010-10-06 Thread Paweł Roman
OK, I've got it. It's in_bulk() :) Nevermind the question. On Oct 6, 5:27 pm, Paweł Roman wrote: > I have a model which has a tree-like structure (not exactly a FK on > self but we can assume that's the case). > > I want to visualise this tree using all records from the

Iterating tree-like data structures with django

2010-10-06 Thread Paweł Roman
I have a model which has a tree-like structure (not exactly a FK on self but we can assume that's the case). I want to visualise this tree using all records from the db. It seems impossible to do with QuerySet, if I have say 100 records (100 nodes in the tree) and I try building the tree

Re: django graphs

2010-10-06 Thread shacker
On Oct 6, 3:24 am, ashy wrote: > Hi All, > > I want to create line graph in django. I have installed django graphs, > but there aren't sufficient examples for line graphs in the examples > folder.  Any ideas how should I go ahead for graphs in django? Emit JSON from your

Re: adding process_exception() to middleware; newbie needs help

2010-10-06 Thread bruno desthuilliers
On 6 oct, 16:42, Fred wrote: > My django app is working great with Debug=True.  But now I'm in > production and I want to email exceptions to me That's the default behaviour if you correctly filled the relevant parts of your settings.py (that is, mainly, the ADMINS,

Re: adding process_exception() to middleware; newbie needs help

2010-10-06 Thread Daniel Roseman
On Oct 6, 3:42 pm, Fred wrote: > My django app is working great with Debug=True.  But now I'm in > production and I want to email exceptions to me and print them to my > logfile.  I've been googling and searching the docs for the last 2 > hours and what I really need is

adding process_exception() to middleware; newbie needs help

2010-10-06 Thread Fred
My django app is working great with Debug=True. But now I'm in production and I want to email exceptions to me and print them to my logfile. I've been googling and searching the docs for the last 2 hours and what I really need is a snippet that shows how to do it in middleware/settings.py. I've

Re: django graphs

2010-10-06 Thread Carlton Gibson
On 6 Oct 2010, at 14:42, ashy wrote: > I am basically looking for a dynamic line graph, where in the points > on the x axis and the points on the graph are clickable. Also, I want > it to be integrated with the django app I am working. The YUI Charts library is pretty good.

Re: Possible backwards incompatibility introduced by change 12950 (in upgrade from 1.1.1 to 1.1.2)

2010-10-06 Thread Russell Keith-Magee
Hi Jyrki, My apologies for not responding -- your message ran off the bottom of my inbox. I've had a look at your sample code; the problem is that you're importing the app1 module in two different ways. As a result of a quirk of Python's module importer, 'r12950.app1.models' and 'app1.models'

Re: django graphs

2010-10-06 Thread Brian Bouterse
I've used the google-chartwrapperwith some success, maybe they have a chart type that would work for you. It has support for the Django template language seen here . Best, Brian

Re: inner join and only method

2010-10-06 Thread refreegrata
starting from Abc works with "select_related" -- 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...@googlegroups.com. To unsubscribe from this group, send email to

Re: django graphs

2010-10-06 Thread ashy
Thanks guys!! I am basically looking for a dynamic line graph, where in the points on the x axis and the points on the graph are clickable. Also, I want it to be integrated with the django app I am working. thanks ashy -- You received this message because you are subscribed to the Google

Re: django graphs

2010-10-06 Thread Tim Sawyer
I've used http://teethgrinder.co.uk/open-flash-chart-2/ and http://g.raphaeljs.com/ To do charts in a Django app. Tim. > ashy wrote: >> Hi All, >> >> I want to create line graph in django. I have installed django graphs, >> but there aren't sufficient examples for line graphs in the examples

Re: inner join and only method

2010-10-06 Thread refreegrata
that don't work. The query can find the "User" fields. On 6 oct, 05:43, Daniel Roseman wrote: > On Oct 6, 2:44 am, refreegrata wrote: > > > > > Hello list. I'm have a questio. if I have an "inner join" query an use > > an "only" restriction, how can

Re: django graphs

2010-10-06 Thread Thomas Guettler
Hi, I think you get more results if you search for python and graphs. I once used matplotlib like this: http://www.scipy.org/Cookbook/Matplotlib/Django But the matplotlib code ist not very easy to read... maybe there are better solutions. Thomas ashy wrote: > Hi All, > > I want to

SUPPORTS_TRANSACTIONS Error while running tests

2010-10-06 Thread girish shabadimath
Hi all, im using django 1.2 i have override run_tests method to do unit tests,,, i dont want django to create test_db for testing, instead should use the main database here is the run_tests code: class Custom_TestSuiteRunner(DjangoTestSuiteRunner): def run_tests(self, test_labels,

combine two testrunner

2010-10-06 Thread Julian
Hi, I'm testing an app doing it with django-nose.NoseTestSuiteRunner. Now I want to use django-coverage by default, it got an own test-runner function. Is there a way to concat those two testrunner? ATM I'm doing it as follows: from django_nose import NoseTestSuiteRunner def

Re: Django app that uploads media files and servers them through a view?

2010-10-06 Thread m1chael
what about something like x-sendfile in apache? On Wed, Oct 6, 2010 at 7:27 AM, Steve Holden wrote: > On 10/6/2010 7:17 AM, Kenneth Gonsalves wrote: >> On Thu, 2010-09-30 at 04:20 -0700, Stodge wrote: >>> Is anyone aware of a Django app that lets you upload media files (not

Re: Django app that uploads media files and servers them through a view?

2010-10-06 Thread Steve Holden
On 10/6/2010 7:17 AM, Kenneth Gonsalves wrote: > On Thu, 2010-09-30 at 04:20 -0700, Stodge wrote: >> Is anyone aware of a Django app that lets you upload media files (not >> necessarily in the admin site) but serves them through a view instead >> of as static files via the web server? I need to

Re: Django app that uploads media files and servers them through a view?

2010-10-06 Thread Kenneth Gonsalves
On Thu, 2010-09-30 at 04:20 -0700, Stodge wrote: > Is anyone aware of a Django app that lets you upload media files (not > necessarily in the admin site) but serves them through a view instead > of as static files via the web server? I need to control access to the > media using permissions.

Problem with FileField and FileSystemStorage and upload_to

2010-10-06 Thread Stodge
I'm trying to use the FileField with a custom FileSystemStorage class. I have my location and upload_to set: location = /opt/files/ upload_to = mike I want files to upload to /opt/files/mike but the filenames are prefixed in the database with /mike, which I don't want. So based on the docs I

Re: [ Error infinite loop ]

2010-10-06 Thread Shamail Tayyab
On Wednesday 06 October 2010 02:47 PM, Tsolmon Narantsogt wrote: Hello everybody I got a this error when i call a page. *Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in ignored* * * Thank you Tsolmon -- You received this message because you are

django graphs

2010-10-06 Thread ashy
Hi All, I want to create line graph in django. I have installed django graphs, but there aren't sufficient examples for line graphs in the examples folder. Any ideas how should I go ahead for graphs in django? thanks ashwin -- You received this message because you are subscribed to the

Re: inner join and only method

2010-10-06 Thread Daniel Roseman
On Oct 6, 2:44 am, refreegrata wrote: > Hello list. I'm have a questio. if I have an "inner join" query an use > an "only" restriction, how can i put a field of the second table in > the "only" tuple? > > Example: > > Model > - > class Abc(models.Model): >    

Re: [ Error infinite loop ]

2010-10-06 Thread Tsolmon Narantsogt
Good On Wed, Oct 6, 2010 at 5:22 PM, Daniel Roseman wrote: > On Oct 6, 10:17 am, Tsolmon Narantsogt wrote: > > Hello everybody > > > > I got a this error when i call a page. > > > > *Exception RuntimeError: 'maximum recursion depth exceeded while calling

Re: unit test :how to call a single test method alone

2010-10-06 Thread Daniel Roseman
On Oct 6, 4:07 am, jimgardener wrote: > hi > In my application,I have the following structure for tests > > myapp---__init__.py > | > | > tests- __init__.py #contains from functional import * from utility > import * >        | >        | >        functional -

Re: [ Error infinite loop ]

2010-10-06 Thread Daniel Roseman
On Oct 6, 10:17 am, Tsolmon Narantsogt wrote: > Hello everybody > > I got a this error when i call a page. > > *Exception RuntimeError: 'maximum recursion depth exceeded while calling a > Python object' in ignored* > * > * > Thank you > Tsolmon Oh good. Well, that's

[ Error infinite loop ]

2010-10-06 Thread Tsolmon Narantsogt
Hello everybody I got a this error when i call a page. *Exception RuntimeError: 'maximum recursion depth exceeded while calling a Python object' in ignored* * * Thank you Tsolmon -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Customising comment framework and keeping moderation working

2010-10-06 Thread Phil Gyford
Thanks Klaas. That second one does seem related to my problem although after a couple of days struggling with this issue I'm now at the limits of my knowledge and don't know if it actually helps me :) I found what seems like a related ticket that's been opened and closed a couple of times and

Re: Separating application media from project media

2010-10-06 Thread Benedict Verheyen
On 1/10/2010 11:48, bruno desthuilliers wrote: > This is fine when using the dev server, but what when you will serve > your static files directly from the frontend web server ? Hi Bruno, to answer your question, i'll post the relevant parts of configs. I use apache with the wsgi module, nginx

Re: Where to create a Mezzanine project

2010-10-06 Thread Sithembewena Lloyd Dube
Thanks Steve, will try out your recommendation in the group post. On Wed, Oct 6, 2010 at 4:32 AM, Stephen McDonald wrote: > For anyone who comes along at a later point looking for an answer to > this, it was provided on the mezzanine-users mailing list. > > >

Re: Customising comment framework and keeping moderation working

2010-10-06 Thread Klaas van Schelven
Phil, A quick reply so I may be wrong on the details. I think you're running into a limitation on the standard way of doing things in Django. I've talked about this before here:

Re: Possible backwards incompatibility introduced by change 12950 (in upgrade from 1.1.1 to 1.1.2)

2010-10-06 Thread Jyrki Pulliainen
Sorry for bump up, but anything to say about this? Should I create a ticket about the problem? - Jyrki On Oct 1, 9:41 am, Jyrki Pulliainen wrote: > On Oct 1, 3:30 am, Russell Keith-Magee > wrote: > > Not really -- I've tried to reproduce the 2 apps