Re: Select child objects of parents in QuerySet

2010-12-23 Thread Javier Guerra Giraldez
On Fri, Dec 24, 2010 at 12:36 AM, muzhig wrote: > > how to select all entries of blogs in category? Entry.objects.filter(blog__category = category) -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To post

Select child objects of parents in QuerySet

2010-12-23 Thread muzhig
Hi! For example, I have models: Category Blog Entry Way to select all entries of blog is simple: blog.enty_set entry_set is a QuerySet Way to select all blogs in category is same: category.blog_set But it is not obvious to me, how to select all entries of blogs in category? or, in other

Re: What's your workflow?

2010-12-23 Thread Dana
@Carl I agree that virtual environments are very useful. I would argue they are almost essential in a Python/Django project. I'm starting to wonder if there are compelling reasons NOT to use a virtualenv when developing, especially one that is so isolated as a "--no-site- packages" one. It seems

Re: What's your workflow?

2010-12-23 Thread Dana
@Subramanyam > South is a good tool, but my point is its better not to get to the point > that we have to use South. Why do you think South is a fallback rather than part of your toolset? >From what I can see it is a great tool and adds a lot of great features to a Django developers arsenal.

Re: IndexError when validating model formsets

2010-12-23 Thread Andrew Badstubner
Nevermind. I found that I was not instantiating the formset with the "instance" argument, naming the parent object. Once that was added, everything worked as designed. -AB On Thu, Dec 23, 2010 at 9:02 PM, Andrew Badstubner wrote: > I have a form that contains a parent

Re: unsupported operand type(s) for -: 'unicode' and 'int'

2010-12-23 Thread Sam Lai
I'd say you should check if the pagesize variable is a string or not on this line - upperbound=self.pagesize * int(arg0) Remember in Python, 'hello' * 2 == 'hellohello'. On 24 December 2010 05:04, prasad iyer wrote: > Hi Everyone, > I am getting type error on integer. I

Re: default django admin theme

2010-12-23 Thread Jos? Moreira
Hi, django-admins-tools? Gonna take a look. Notice that i didn't meant to criticise grapelly or any other tool, i ment to discuss the out-of-the-box user interface, which i didn't meant it wasn't good in itself. Yeah i know, it's open source and i can put my code where my mouth it's just

IndexError when validating model formsets

2010-12-23 Thread Andrew Badstubner
I have a form that contains a parent object in the header and then lists the children as a formset in the same HTML . I can create new "families" of parent objects and children just fine, but I can't edit them. I've tracked the error down to the line where the view is trying to instantiate the

Re: SSL through WSGI

2010-12-23 Thread Jakob H
On Dec 23, 3:41 pm, Mike Seidle wrote: > On Wednesday, December 22, 2010 05:08:05 pm Jakob H wrote: > > > Hi, I have a related SSL question using WSGI and Apache. > > > In my .htaccess file I have something like this: > > If you are using WSGI, then you'll probably have to look

Re: Project management / bugtracking app?

2010-12-23 Thread Jos? Moreira
i've implemented redmine on a small business and been using it for myself without any hassle. -- 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,

Re: default django admin theme

2010-12-23 Thread Russell Keith-Magee
On Thursday, 23 December 2010 at 3:57 PM, Jos? Moreira wrote: > Hello, > > > are there any plans to improve the default Django admin theme? > I'm aware of projects like Grapelli, that the admin is intended to be > customized by the developers and that the default theme is nice, clean and >

{% url %} and None

2010-12-23 Thread Luke Maurer
I have a few pages essentially implementing a master/detail view; it's a report with variably many different constraints on the data. I'm making thorough use of Django's flexible URL configuration — I have just one view, defined by one (rather long) regex with multiple optional capturing

Re: default django admin theme

2010-12-23 Thread Arek
Hi, take a look at django-admin-tools it adds customized themes to admin interface. And few other things. it is lighter than grappelli. On Thu, Dec 23, 2010 at 7:57 AM, Jos? Moreira wrote: > Hello, > are there any plans to improve the default Django admin theme? > I'm

Re: ASK-TinyMCE

2010-12-23 Thread Arek
Hi Emmerling, adding this in admin.py fixed the problem for me. class YourModelOptions(admin.ModelAdmin): class Media: js = ['http://example.site/static/admin/tinymce/jscripts/tiny_mce/tiny_mce.js', 'http://example.site/static/admin/tinymce_setup/tinymce_setup.js',] These

Re: upload files via ajax

2010-12-23 Thread Paul Osman
On Thu, Dec 23, 2010 at 9:39 AM, Mauro wrote: > Hello, > is it possible to upload files via ajax? > > I would like to upload multiple files in my application but i have the > following exception: > > MultiPartParserError: Invalid boundary in multipart: None > > I'm using

Re: Sorl and Apache

2010-12-23 Thread Heath
Solved by setting the /cache/ directory to be owned by (on Ubuntu) www-data:www-data and to correct my earlier guess, /cache/... is the location of the generated thumbnails, not temp storage. -h On Dec 23, 11:52 am, Heath wrote: > By enabling sorl's error - reporting I

ASK-TinyMCE

2010-12-23 Thread Emmerling
Hi, I'm trying to embed TinyMCE into my admin page but it never showed. I followed the tutorial from http://dehora.net/journal/2006/05/using_tinymce_in_djangos_admin.html and http://code.djangoproject.com/wiki/AddWYSIWYGEditor but both are not working and I still get that same plain text area.

Re: Django testing not loading certain fixtures

2010-12-23 Thread churris
Are you loading you fixtures within your test class? eg. fixtures = ['my_fixture.xml'] Make sure that also you have included in yoour settings file the following: FIXTURE_DIRS = ( os.path.join(PROJECT_PATH, '../testing/fixtures') of course with the path where you fixture is. Hope this helps

Re: SSL through WSGI

2010-12-23 Thread Mike Seidle
On Wednesday, December 22, 2010 05:08:05 pm Jakob H wrote: > Hi, I have a related SSL question using WSGI and Apache. > > In my .htaccess file I have something like this: If you are using WSGI, then you'll probably have to look at Apache's config files (usually in /etc/apache2 or /etc/httpd for

Re: Sorl and Apache

2010-12-23 Thread Heath
By enabling sorl's error - reporting I get this error: Caught OSError while rendering: (13, 'Permission denied') Exception Location: /usr/lib/python2.6/os.py in makedirs, line 157 So in tracing the error, I find that the os is trying to create a path in: /cache/c4/dd I'm guessing this is

Re: fcgi, runfastcgi, parameters, docs [noob question]

2010-12-23 Thread broz
Both answers are VERY helpful, and point out how unhelpful my original question was stated. Karen, I admit to being a knucklehead. Thanks for reminding me :-) Shamail Tayyab, I'm not running via command line, using manage.py. I've created my own script, following instructions found in the docs

unsupported operand type(s) for -: 'unicode' and 'int'

2010-12-23 Thread prasad iyer
Hi Everyone, I am getting type error on integer. I have tried converting all the possible variables to int but still the problem persist. Can anyone help me out with this type error following is the stack trace http://dpaste.com/289886/ following are the 2 functions which are giving me the

Re: tutor -request

2010-12-23 Thread John Fabiani
On Thursday, December 23, 2010 10:18:16 am John Fabiani wrote: > Hi, > I have been looking for a kind soul to help me learn Django. I am self > taught and most of my work has been done using "try it and see if it > works". I am willing to pay for an hours time because I will have to > deploy

tutor -request

2010-12-23 Thread John Fabiani
Hi, I have been looking for a kind soul to help me learn Django. I am self taught and most of my work has been done using "try it and see if it works". I am willing to pay for an hours time because I will have to deploy very soon and will need assistance with installing on a Apache server.

Re: django/contrib/auth/models.py goes nuts

2010-12-23 Thread John Fabiani
On Thursday, December 23, 2010 09:05:21 am Steve Holden wrote: > On 12/23/2010 11:54 AM, John Fabiani wrote: > > On Thursday, December 23, 2010 12:39:44 am bruno desthuilliers wrote: > >> On 23 déc, 06:33, John Fabiani wrote: > >> > >> (snip) > >> > >> John, may I suggest

Re: upload files via ajax

2010-12-23 Thread robos85
http://www.swfupload.org/ is all You need :) -- 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/contrib/auth/models.py goes nuts

2010-12-23 Thread Steve Holden
On 12/23/2010 11:54 AM, John Fabiani wrote: > On Thursday, December 23, 2010 12:39:44 am bruno desthuilliers wrote: >> On 23 déc, 06:33, John Fabiani wrote: >> >> (snip) >> >> John, may I suggest that instead of trying whatever comes to mind and >> wonder what happens, you

Re: django/contrib/auth/models.py goes nuts

2010-12-23 Thread John Fabiani
On Thursday, December 23, 2010 12:39:44 am bruno desthuilliers wrote: > On 23 déc, 06:33, John Fabiani wrote: > > (snip) > > John, may I suggest that instead of trying whatever comes to mind and > wonder what happens, you spend some times learning Python, specially > the

Re: text in via model html out in template

2010-12-23 Thread MikeKJ
solution found and I apologise for this I forgot to mention that the input to the field was (note was) a tiny-mce textfield and in doing that it escaped the html into the database and that was the cause of oozlum bird effect. bruno desthuilliers-7 wrote: > > > > On 23 déc, 11:23, MikeKJ

Re: Django testing not loading certain fixtures

2010-12-23 Thread caroline
never mind...error on my side On Dec 23, 1:52 pm, caroline wrote: > I'm experiencing some problems when loading fixtures for Django > unittests. > > If I create a fixture with manage.py dumpdata, then loading of the > fixture works (except for the fact that there is an sql

Re: Calling a Method from a Form

2010-12-23 Thread derek
Brian The short answer is: you need to create a form where you input * no. of dice * no. of sides and then process that POSTed data. The longer answer is that you seem to be confused about a number of basic concepts on Django and web apps. I'd recommend working through The Django Book; Chapter

upload files via ajax

2010-12-23 Thread Mauro
Hello, is it possible to upload files via ajax? I would like to upload multiple files in my application but i have the following exception: MultiPartParserError: Invalid boundary in multipart: None I'm using django 1.1. The ajax request has the content type header set as mulitpart/form- data

Re: django/contrib/auth/models.py goes nuts

2010-12-23 Thread SomeLiang
I have the same problem..hi John!Please talk to me what you have done to make it work?? Seems the auth/model.py is so weak...which makes me cry [?][?][?][?] 2010/12/23 bruno desthuilliers > On 23 déc, 06:33, John Fabiani wrote: > > (snip) >

Re: Subdomain/Accounts

2010-12-23 Thread widoyo
May be this link will help you: http://www.rossp.org/blog/2007/apr/28/using-subdomains-django/ Widoyo On Dec 23, 11:29 am, Parra wrote: > Can someone give me some tips on where to get started with this ?? > -- You received this message because you are subscribed to the

Re: text in via model html out in template

2010-12-23 Thread MikeKJ
changed as below but still not getting html out just text MikeKJ wrote: > > re phrased heading as this is the real problem > > model: > data = models.TextField(help_text='This is the embedding popup code for > the video', null=True, blank=True) > > method: > def data_chunk(self): >

Django testing not loading certain fixtures

2010-12-23 Thread caroline
I'm experiencing some problems when loading fixtures for Django unittests. If I create a fixture with manage.py dumpdata, then loading of the fixture works (except for the fact that there is an sql error, as i am using mysql innodb and django dumps some records before others with foreign key

Re: text in via model html out in template

2010-12-23 Thread bruno desthuilliers
On 23 déc, 11:29, Daniel Roseman wrote: > > You have two attributes on your model called 'data'. One is the field, and > one is a method. Nope, there's only one : the method. You *can not* have two attributes by the same name in a class - since attributes are stored in

How to run a pre-existing django project

2010-12-23 Thread noobcode
Hi I am new to django. I followed the documentation and created my first app on windows machine. I have pything2.7. Now i have a already existing project and i need to run that on my machine. After downloading, i got the manage.py.gz and url.py.gz and db.sqlite.gz and settings.py . I extracted

Re: text in via model html out in template

2010-12-23 Thread bruno desthuilliers
On 23 déc, 11:23, MikeKJ wrote: > re phrased heading as this is the real problem > > model: > data = models.TextField(help_text='This is the embedding popup code for the > video', null=True, blank=True) > > method: >     def data(self): Look no further - this method

Model Formset Pre-Filled Problem

2010-12-23 Thread ozgur yilmaz
Hi, I'm trying to use model formsets. At first, everything is normal. But when i open the form page for the second time, i see that the formset is pre-filled with the previous values. Here is my code: models.py --- class FooModel( models.Model ): a_field =

Re: Project management / bugtracking app?

2010-12-23 Thread rafael.nu...@gmail.com
ClockingIT? Pivotal? On Thu, Dec 23, 2010 at 3:26 AM, Dopster wrote: > Hi any recommendations for a Django project management and bugtracking > application? Also, Git(hub) integration would be a nice-to-have. > > I looked at Redmine but its a Ruby app and I'd rather not

Re: get id to be used in a foreign key with two model forms

2010-12-23 Thread Michael Thamm
For those of you that are having the same issue with saving related data in a model form here is how I solved it. The issue is that I needed to save my form and then point to the saved record in the related record before committing the related record. I'm surprised django doesn't handle this

Re: text in via model html out in template

2010-12-23 Thread Daniel Roseman
On Thursday, December 23, 2010 10:23:40 AM UTC, MikeKJ wrote: > > > re phrased heading as this is the real problem > > model: > data = models.TextField(help_text='This is the embedding popup code for the > video', null=True, blank=True) > > method: > def data(self): > return self.data

text in via model html out in template

2010-12-23 Thread MikeKJ
re phrased heading as this is the real problem model: data = models.TextField(help_text='This is the embedding popup code for the video', null=True, blank=True) method: def data(self): return self.data data.allow_tags = True template: {% for v in x %} {{ v.data|safe }} {%

Re: django/contrib/auth/models.py goes nuts

2010-12-23 Thread bruno desthuilliers
On 23 déc, 06:33, John Fabiani wrote: (snip) John, may I suggest that instead of trying whatever comes to mind and wonder what happens, you spend some times learning Python, specially the part about modules, import and the modules search path ? Your problem - which has