Re: How to use JSON on my application

2009-04-19 Thread Brot
Hello, there are a lot of good blog posts out there http://www.b-list.org/weblog/2006/jul/31/django-tips-simple-ajax-example-part-1/ http://www.b-list.org/weblog/2006/aug/05/django-tips-simple-ajax-example-part-2/

Re: Is Django right for me?

2009-03-31 Thread Brot
Django has really great documentation http://docs.djangoproject.com/en/dev/ There is a tutorial to get a feeling for the framework On Mar 31, 1:35 pm, Dotan Cohen wrote: > > Dotan, I think once you've got your head around some of the key concepts > > (urls, models,

Re: birth date in a model form

2009-01-05 Thread Brot
r that I must be writing the wrong thing, but I'm not > sure what I should be writing? > > Thanks a lot > > On Jan 6, 11:29 am, Brot <schla...@gmail.com> wrote: > > > Hello, > > > I have the same issue in my app and there is a widget. You can find it

Re: birth date in a model form

2009-01-05 Thread Brot
Hello, I have the same issue in my app and there is a widget. You can find it here: http://code.djangoproject.com/browser/django/trunk/django/forms/extras/widgets.py But for me this widget misses a few features and there are open tickets with patches, but they are not in trunk yet :-(

Re: Address Book Contact Importer in Python/Django?

2008-11-27 Thread Brot
does this help Accessing your Gmail contact list with Python (http://www.holovaty.com/ blog/archive/2004/06/20/0241) [EMAIL PROTECTED] schrieb: > Hi guys, > > Does anybody know of a Python script or Django module that can handle > address book email importing? For instance, if I type my gmail

Re: Migrate app from MySQL to PostgreSQL

2008-10-30 Thread Brot
This doesn't work as expected. I tried the migration with dumpdata month ago. The problem is, that mysql and postgres writes another, incompatible boolean values. I believe sqlite and postgres has the same problem! I reworked the dumpdata output-file. In my case this was possible, because the

Re: callable upload_to problem

2008-10-21 Thread Brot
Is there nobody who can help me with my problem? Is this a bug and should I open a ticket or is it my fault? ~Bernd On 20 Okt., 22:05, Brot <[EMAIL PROTECTED]> wrote: > Hello, > > I am using the latest svn-revision 9236 and tried to use a callable in > the upload_to parameter

callable upload_to problem

2008-10-20 Thread Brot
Hello, I am using the latest svn-revision 9236 and tried to use a callable in the upload_to parameter of the ImageField. The explanation in the django-docs for the instance-parameter of a callable says the following: > An instance of the model where the FileField is defined. More specifically,

forms -> label for required fields

2008-09-26 Thread Brot
Hello, is there a general solution for required fields in models? It would be nice if there could be a class "required" attribute for the label if the field is required. I think this solution is implemented in the django admin, because in the admin the required fields are bold and when I look at

django-projekt - vcs - media folder

2008-09-15 Thread Brot
Hello, if you use a version-control-system, do you also manage your media folder with this vcs? If yes, how do you commit your media-files you are uploading with the django-admin interface? Or do you backup the media-files separately from you source-code? ~Bernd

User subclass vs. User-Profile

2008-09-15 Thread Brot
Hello, what is your preferred way for additional information for the user modell? Do you still use the User-Profile or do you subclass the auth.user model? What are the pros and cons? ~Bernd --~--~-~--~~~---~--~~ You received this message because you are

Re: define "_default_manager" and the admin-interface

2008-09-01 Thread Brot
is there anybody out there who could answer this question? On 29 Aug., 07:59, Brot <[EMAIL PROTECTED]> wrote: > Hello, > > At the moment I am reading the "Practical Django Projects" - Book > written by James Bennett. > On page 120 there is a admonition abou

define "_default_manager" and the admin-interface

2008-08-28 Thread Brot
Hello, At the moment I am reading the "Practical Django Projects" - Book written by James Bennett. On page 120 there is a admonition about using Default Managers. Above this paragraph there is the explanation about the Default Manager und Entry.objects.all() and Entry.live.all(). It seems clear

Re: postgres schema support

2008-07-11 Thread Brot
Hello, I think there are a few open-tickets for this topic: http://code.djangoproject.com/ticket/1051 http://code.djangoproject.com/ticket/6148 http://code.djangoproject.com/ticket/2120 Bernd On Jul 11, 3:50 pm, Jon Brisbin <[EMAIL PROTECTED]> wrote: > I hardly ever put anything in the

mod_python vs. mod_wsgi

2008-05-06 Thread Brot
Hello, today webfaction announced (http://blog.webfaction.com/django-setup- improvements) that they have now a one-click django/mod_wsgi installer. What's your opinion with mod_wsgi? Is it better than mod_python? What's the advantages/disadvantages? Bernd

How can I pass extra context variables into my changelist_view?

2008-05-03 Thread Brot
Hello, today I switched my django installation from the django-trunk to the django newforms-admin branch. With the oldform admin I had changed the changelist for one model based on the explanation in the djangobook (http://www.djangobook.com/ en/1.0/chapter17/) But with the newforms admin I

issue with the development server

2008-04-02 Thread Brot
Hello, I have a problem with the development server. I don't know if this behavior is right or if there is a problem. I have a view which is triggered throught an url. In this view I use urllib2. If I start the view with the development server the process is never ends. But if I start the view

Re: Creating Custom Admin Views

2008-03-31 Thread Brot
does nobody have some helpful input? On 30 Mrz., 17:13, Bernd <[EMAIL PROTECTED]> wrote: > Hello, > > I followed the documentationhttp://www.djangobook.com/en/1.0/chapter17/ > in the section "Creating Custom Admin Views". I try to override the > change_list.html for one of my models. > > I only

Re: Django Admin WAP

2008-03-31 Thread Brot
this could be useful: http://code.google.com/p/django-mobileadmin/ Bernd On 31 Mrz., 10:40, "Ben Ford" <[EMAIL PROTECTED]> wrote: > I'm pretty sure that someone's put together a django admin type thing for > smaller form factor devices... I can't remember where I saw it though, > sorry! > Ben >

Re: How to get unclean data from newform?

2008-02-25 Thread Brot
Hello, http://www.b-list.org/weblog/2007/nov/22/newforms/ http://blog.michaeltrier.com/2007/11/23/getting-started-with-newforms Bernd On 26 Feb., 07:28, shabda <[EMAIL PROTECTED]> wrote: > I have a newform form. It has data bound to it. But it may be invalid. > I want to get the data bound

Re: Problem with django.db.transaction.commit_manually

2008-02-18 Thread Brot
tion.commit() > > else: > > transaction.rollback() > > return render_to_response('template.html', {'result':result}) On Feb 18, 4:48 pm, Brot <[EMAIL PROTECTED]> wrote: > Hello, > > The view works well if I delete the call 'otherfile.test()'

Re: Problem with django.db.transaction.commit_manually

2008-02-18 Thread Brot
Hello, The view works well if I delete the call 'otherfile.test()' There is also no error if I delete the dictionary declaration in 'otherfile.test()'. My example code is only an extraction from my code. In my real 'test-function' is a lot of code (I use urlib, urlib2 and htmllib there). But the

Re: Problem with django.db.transaction.commit_manually

2008-02-17 Thread Brot
Hello again, here is a code example. Hope someone could help me - from otherfile import test @transaction.commit_manually def view(request, secid): result = {'status': 'OK', 'msg': None} try:

Problem with django.db.transaction.commit_manually

2008-02-17 Thread Brot
Hello, If I have a view and use the 'django.db.transaction.commit_manually' decorators. All worked well, but than I inserted a function call into the view. In this function I don't touch the database If I call the view I get following error message: Transaction managed block ended with pending

Re: file upload RAM buffer or stream to tmp

2008-01-14 Thread Brot
On Jan 14, 7:56 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Jan 14, 2008 12:01 PM, Vance Dubberly <[EMAIL PROTECTED]> wrote: > > > Kind of a bummer, guess I'll be using cherrypy for this project. Was > > hoping to use django but it looks like there is no way to hook into > > the request

Re: Violate DRY in my models

2008-01-06 Thread Brot
Hello, thank you for the fast reply. This is what I am looking for. I know I had to add the fields redundantly, but the function is defined once now. ~Bernd On Jan 6, 1:30 pm, Nikolaus Schlemm <[EMAIL PROTECTED]> wrote: > Am Sonntag, 6. Januar 2008 13:04:38 schrieb Brot: > >

Violate DRY in my models

2008-01-06 Thread Brot
Hello, I have a few models which have the same two fields. Based on these fields there is always the same function in these models. But this violates DRY. Is there another possibility for my function/models

Re: Oracle Backend - syncdb

2007-11-21 Thread Brot
Hello, I expand the models.py in the django internal apps like auth, session, contenttypes, sites,.. http://www.djangoproject.com/documentation/model-api/#db-tablespace This worked for me, but It's only a workaround. I created a ticket, because I think it would be great to have the possibility

Oracle Backend - syncdb

2007-11-21 Thread Brot
Hello, yesterday I tried django in my company. We have oracle databases. But now I have a problem! :-( Is it possible to define TABLESPACES for the "syncdb" - CREATE TABLE - Statements? If not, where can I find the Statements in the source code to extend the statement? I am searching the source

Re: Help with design choice...

2007-11-18 Thread Brot
Hello, here is a good article, which explain how to extend the django user- model. http://www.b-list.org/weblog/2006/jun/06/django-tips-extending-user-model/ Bernd On Nov 18, 5:47 pm, radioflyer <[EMAIL PROTECTED]> wrote: > Hello, > > New Django user. > > I'm building an application to help

Re: Using Django Template Engine

2007-11-14 Thread Brot
/templates_python/#rendering-a-context Bernd On 14 Nov., 01:45, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-11-12 at 23:04 -0800, Brot wrote: > > Hello, > > > I found a code example for "Using Markup" in the django wiki: > >http://code.djangoproject.c

Using Django Template Engine

2007-11-12 Thread Brot
Hello, I found a code example for "Using Markup" in the django wiki: http://code.djangoproject.com/wiki/UsingMarkup I need a similar solution, but with the internal django template library. Is there any solution for this requirement? I would like to store little html/template chunks in a

Re: url tag difficulties

2007-11-10 Thread Brot
hello, I am learning a lot from the B-List blog Here is an entry, which could be interesting for you: http://www.b-list.org/weblog/2007/nov/06/urlconf/ (specially the named URL patterns) Bernd On Nov 10, 5:53 am, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote: > I've also been a little frustrated

Re: admin-interface - 500 error - missing MEDIA_URL

2007-11-09 Thread Brot
does this mean, that there is no solution for this problem or is there a smart workaround? I think I could use a custom templatetag. But this would violate DRY. Regards Bernd On Nov 9, 7:49 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On Nov 9, 2007 12:34 PM, Bro

admin-interface - 500 error - missing MEDIA_URL

2007-11-09 Thread Brot
Hello, I have defined a 500.html template in my root template directory. This template "extends" from my base.html template. In the base template I have something like: But if there is an 500 error in the admin interface, it seems that MEDIA_URL is empty.

Re: django used in another server application

2007-11-07 Thread Brot
Hello, I think this link could be useful for you http://www.cotellese.net/2007/09/27/running-external-scripts-against-django-models/ Regards Bernd On 7 Nov., 12:21, schlam <[EMAIL PROTECTED]> wrote: > I am am trying to write a server to communicate with a bit of hardware > in python which

self referencing limit_choices_to

2007-11-05 Thread Brot
Hello, I have a little problem with the "limit_choices_to" functionality. I found two group discussions concerning the same problem, but the authors got no answers.

Re: Ordering by foreign key, class Meta

2007-11-04 Thread Brot
On Oct 19, 3:11 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-10-19 at 06:54 -0700, äL wrote: > > I would like to order a list in a view by foreign key. If I try > >orderinghow in the > > code below my list is ordered by 'person'. And this means that the > > list > > ist

Re: database api question (query/filter related objects)

2007-11-04 Thread Brot
On Nov 4, 7:02 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On 11/4/07, Brot <[EMAIL PROTECTED]> wrote: > > > > > > partner_list = [ep.partner for ep in Event.objects.latest > > > ('date').eventpartner_set.all()] > > > Ok, that

Re: database api question (query/filter related objects)

2007-11-04 Thread Brot
On Nov 4, 4:14 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On 11/4/07, Brot <[EMAIL PROTECTED]> wrote:[snip] > > To get the last event I use: > > > Event.objects.latest('date') > > > To get a list of EventPartners i use: > > Event.obje

database api question (query/filter related objects)

2007-11-04 Thread Brot
Hello, These are my models class Event(models.Model): date = models.DateField(core=True) type = models.ForeignKey(EventType, limit_choices_to = {'useable': True}) class Partner(models.Model): name = models.CharField(max_length=50) class