Re: GoFlow - anybody out there used it?

2010-09-06 Thread Thomas Guettler
Hi Steve, please post your result here, if you looked at the different workflow solutions. Thomas Steve Boyle wrote: > Hi, > > I've been writing an application that requires a workflow component > and rather than build one from scratch looked around to see what was &g

Re: home page menu view variables cross every view?

2010-09-07 Thread Thomas Rega
On Tue, Sep 7, 2010 at 8:55 PM, Goran wrote: > I'm Django novice and I want to have some menu (top menu) which have > some dynamically populated items. So inside home page view I have some > variables to get these menu items. But because it's top menu I need it > on every page on the site and i ha

Re: Proto-newbie needs Django for running an app, not for dev work

2010-09-17 Thread Brett Thomas
ango. That said, I agree that somebody with your experience should be able to go to djangoproject.com and learn how to install a dependent app. On Fri, Sep 17, 2010 at 1:51 PM, Thomas wrote: > My first post on this list. I wish to try out a blogging app developed > in Django, cal

Re: Where do you put your business logic in django? Organizing big projects in django.

2010-09-27 Thread Thomas Weholt
On Mon, Sep 27, 2010 at 10:07 AM, Mike Dewhirst wrote: > On 27/09/2010 5:08pm, MrMuffin wrote: >> >> Where do you put your business logic in django? In my project I`ve put >> it into the models.py, but that file soon become huge and hard to >> maintain. Of course I can just stuff it into whatever

Re: Where do you put your business logic in django? Organizing big projects in django.

2010-09-27 Thread Thomas Weholt
h cases it has the > benefit that it forces you to think about dependancies management, > which can greatly helps when it comes to maintainance. Ok, I see your point, but still - there`s nothing about this in the main django documentation as far as I know. The docs should have a section about

Re: Where do you put your business logic in django? Organizing big projects in django.

2010-09-27 Thread Thomas Weholt
On Mon, Sep 27, 2010 at 12:40 PM, Steve Holden wrote: > On 9/27/2010 4:57 AM, Thomas Weholt wrote: >> On Mon, Sep 27, 2010 at 10:38 AM, bruno desthuilliers >> wrote: >>> On 27 sep, 09:08, MrMuffin wrote: >>>> Where do you put your business logic in django?

No caching if request.GET not empty

2010-09-27 Thread Thomas Guettler
update_cache = False return None # Don't bother checking the cache. }}} If the query string would be used in _generate_cache_key() (utils/cache.py), requests with an not empty request.GET could be cached. I see no reason, not to cache requests with a query string. Can someone explain this? Th

Re: Where do you put your business logic in django? Organizing big projects in django.

2010-09-27 Thread Thomas Weholt
On Mon, Sep 27, 2010 at 4:52 PM, bruno desthuilliers wrote: > On 27 sep, 12:55, Thomas Weholt wrote: >> On Mon, Sep 27, 2010 at 12:40 PM, Steve Holden wrote: >> > I think the point is to learn enough Python that you don't need >> > Django-specific advice. >&g

Re: Where do you put your business logic in django? Organizing big projects in django.

2010-09-28 Thread Thomas Weholt
on of boilerplate code. Any thoughts or ideas? I`ll upload it to the cheeseshop as soon as I can get time to debug/test a bit more. The code isn`t pretty at the moment, but it seems to get the job done. -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You received this message because yo

Re: No caching if request.GET not empty

2010-09-29 Thread Thomas Guettler
Hi, there is already a ticket: http://code.djangoproject.com/ticket/4992 Thomas Guettler wrote: > Hi, > > requests with a query string (http://example.com?foo=bar) are not cached in > Django: > > http://code.djangoproject.com/svn/django/trunk/django/middleware/cache.py >

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

2010-09-30 Thread Thomas Weholt
re users can upload and backup their media and access it through a web interface. Serving static media using django was terrible and using nginx was incredibly fast, but I lost all access control to the static media. Any help on this subject would be highly appreciated. -- Mvh/Best regards, Thomas

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

2010-09-30 Thread Thomas Weholt
On Thu, Sep 30, 2010 at 1:52 PM, Xavier Ordoquy wrote: > Hi, > > Although I haven't done it, the following link may give you a good overview > of how to do it: > http://kovyrin.net/2006/11/01/nginx-x-accel-redirect-php-rails/ > > Regards, > Xavier. > > Le 30

Key based session expiration

2010-09-30 Thread Thomas Gautier
ethod than the whole session it belongs to? Thanks in advance for your help, Thomas Gautier. -- 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 fro

Re: Separating application media from project media

2010-10-01 Thread Thomas Weholt
that platform. Doesn`t matter much to me, but we should work to make our apps portable. -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Separating application media from project media

2010-10-01 Thread Thomas Weholt
quot;: http://lifehacker.com/5496652/how-to-use-symlinks-in-windows And it works on my vista box here at work :-) -- Mvh/Best regards, Thomas Weholt http://www.weholt.org -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: A better way of checking if a record exists

2010-10-01 Thread Thomas Guettler
Hi, I really would love the see this dictionary like access: obj=MyModel.objects.get(primary_key) if obj is None: ... does not exist. But the ticket was closed: http://code.djangoproject.com/ticket/5741 Thomas ALJ wrote: > I'm running through a spreadsheet to update customer

Re: Django Tutorial

2010-10-04 Thread Thomas Weholt
to python land in general don`t forget to pick up a book on plain python as well and read that first. "Learning python" is good :-) And as mentioned earlier the standard django tutorial is good, but the http://djangobook.com/ is also a great reference. -- Mvh/Best regards, Thomas Wehol

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, > >

Changing the Language does not work with Internet Explorer

2010-10-15 Thread Thomas Neumeier
okie. To check this, I tried to login in into the admin. This works, but there seems not to be set a cookie either (I cant find one in the folder). How is the session_id set with setlang and admin and why does it work in the admin, but not in setlang? Hoping for help Thomas -- You received this

Re: Spaces in request.GET

2010-10-21 Thread Thomas Guettler
Hi, please try this: BTW, I would use the form library of django. It helps you to reduce bugs and ist easy to use. Rule of thumb: Don't access request.GET or request.POST. Give one of these dictionaries to your form. Thomas Govindarajan wrote: > First off I have to say that I a

using strings as fieldnames to save model

2010-11-03 Thread Thomas M
Hi, I have to save a model with dynamic fieldnames. So the field identifiers are strings. Example: foo = Genre("genre_id"=2,"name"="ente") foo.save() This creates an error. Is it somehow possible to do this with the model instance? Or do I have to use custom

Re: using strings as fieldnames to save model

2010-11-03 Thread Thomas M
Ok, thanks. I'll try it tomorrow. What is the meaning of the **? Thanks, Thomas On 3 Nov., 17:53, Daniel Roseman wrote: > On Nov 3, 4:17 pm, Thomas M wrote: > > > Hi, > > > I have to save a model with dynamic fieldnames. So the field > > identifiers are

Re: How create a simple "brochure" website in django?

2010-11-04 Thread Thomas Rega
another example for a django based CMS: http://www.feinheit.ch/labs/feincms-django-cms/ good luck, TR 2010/11/4 bruno desthuilliers : > On 4 nov, 13:15, Karim Gorjux wrote: >> Hi all! I'm a relative newbie in Django and I spending a lot of time >> study it in these days. I read many tutorials

Re: Automatically assume "models." prefix in models.py

2010-11-15 Thread Thomas Schreiber
You could configure your text editor to insert a starting model class. class Modelname(models.Model): """Modelname description""" name = models.CharField(max_length=256) def __unicode__(self): return u"%s" % (self.name,) On Mon, Nov 15, 2010 at 09:57, James wrote: > On Mon,

Should CSRF Middleware return 403 or 500 error from AJAX call?

2010-11-15 Thread Brett Thomas
Hi there, Ran into some unexpected CSRF behavior - not sure if it's desired or a bug. An AJAX request that includes the "X-Requested-With: XMLHttpRequest" header but does not include csrf token will bypass CSRF middleware. If you hit server error (mine was a TypeError), response has error code 500

Re: django tagging app choices

2010-11-15 Thread Thomas Schreiber
check the grids on django packages: http://djangopackages.com/grids/g/tagging/ On Mon, Nov 15, 2010 at 22:22, gyanguru wrote: > Hi all, > > I am looking for django tag project. I have discovered 2 "django > tagging" and "django tagit". > Does any one has a benchmark regarding this? > or > Any adv

Re: App for the index?

2010-11-17 Thread Thomas Rega
IMHO - an simple extra view might be enough to reach what you are looking for - I do not see the need for an extra app - Am I missing something? In the directory of domain.com/ there is a simple views.py file which defines a simple callback function. 2010/11/17 robos85 : > I'm also beginner. I m

Re: Newbie: can't login as user via standard admin login page

2010-11-17 Thread Thomas Schreiber
Are you sure the user has been marked as is_staff or is_superuser? http://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.models.User.is_staff On Wed, Nov 17, 2010 at 18:26, bingbang wrote: > Dear all, >             Started learning Django 3 days ago. Great tutorials. Just > made a

umlaut

2010-11-29 Thread Thomas Rega
Hi, is there a recommended way to deal with German 'umlauts' (like ü.ö.etc.) I was lookingfor some kind of template filter but without success :( The data is stored as utf-8 format. What I am looking for is an automatic transformation into 'ü, ö etc. Is such a template filter the right approach

Re: umlaut

2010-11-29 Thread Thomas Rega
Thanks a lot for your replies. The following code does the job for me ... >From 8a110f8358f545fae0a9d0c8d69b496fd0e35cdf Mon Sep 17 00:00:00 2001 From: Thomas Rega Date: Mon, 29 Nov 2010 16:51:01 +0100 Subject: [PATCH] custom template filter to convert umlauts This simple custom templ

Re: Django timestamp to Javascript timestamp

2010-11-29 Thread Brett Thomas
I found it easiest to use the javascript date constructor with a date string. Just have Django output the date in whatever time zone you want it displayed to the user: var d=new Date("November 29, 2010 9:22:00"); Unfortunately Django's default Date display, the ISO standard, prints a string that

Re: django to php

2010-11-30 Thread Brett Thomas
Time better spent learning django :) On Nov 30, 2010 9:24 AM, "Tom Evans" wrote: > On Tue, Nov 30, 2010 at 7:26 AM, Akash Mukherjee wrote: >> Hello, >> >> I have a webapp created in django. Now I want to convert the entire >> code into PHP. Is it possible?? If yes, how? >> >> Thanks >> >> Akash >

Re: Django, Python, AJAX position

2010-11-30 Thread Brett Thomas
If nobody responded to you yesterday, you might want to revise the post with some more details, rather than just re-posting it. It's not worth most good developers' time to inquire about 2 sentence job posts that are really ambiguous... On Tue, Nov 30, 2010 at 10:37 AM, Bita Bita wrote: > My cli

Re: Project management software

2010-12-01 Thread Thomas Guettler
Hi, i am interested, but the licence (GPL) ist unfortunately unusable for me. I need a licence like django (BSD or LGPL). Thomas tiemonster wrote: > I finally had a chance to put a demo up online: > > http://freeshell.de/~mscahill/projects/ > > Now obviously this isn't a

Unhelpful template traceback

2010-01-04 Thread Thomas Steinacher
name and line number where the error occurred? It is really annoying as I currently see no way to debug this type of errors other than guessing, which is very difficult, especially when templates are very complex. Thanks, Thomas File "/home/mysite/django-mysite3/django/template/loader.py&q

Re: Unhelpful template traceback

2010-01-04 Thread Thomas Steinacher
t of error. > > That would be my guess =) > > Victor Lima > > 2010/1/4 Thomas Steinacher > > > > > Hey guys, > > > I sometimes get errors which occur rarely, so it is very difficult to > > reproduce them in a development environment. The traceback always

Two Email Backends

2010-01-14 Thread Thomas Guettler
application sends mail. But somehow I don't like this. How do you handle this? Documentation: http://docs.djangoproject.com/en/dev/topics/email/ -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscrib

Extend model choice in project

2010-01-22 Thread Thomas Guettler
ere should I put the code? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- 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...@go

Re: is there a way to cascade foreign keys?

2010-01-26 Thread Brett Thomas
I'm fairly new to django - please correct me if this isn't a good solution. I ran in to a similar issue recently, and found it alot easier to have the ajax views return full html rather than json. So load the page with empty divs for each dropdown, then displaying the second form is much easier:

URL design - why the trailing slash?

2010-01-27 Thread Brett Thomas
Most of the URLConf examples I run across use a trailing slash on all URLs: www.example.com/profile/ I'm not sure why, but I don't like this. I think it looks nicer without: www.example.com/profile Are there any performance or security reasons to use the trailing slash in Django? Seems like there

Re: Newbie Django Mac OS X suggestions.

2010-01-30 Thread Thomas Schreiber
touch anything in System python, and I simply use it to install 2.6.4 as my main python. I run easy_install pip, pip install virtualenv and using virtualenvwrapper, install any other packages into project relevant virtualenvs, always creating with --no-site packages. Thomas On Sat, Jan 30, 2010 at

Re: Applications disapearing from admin at random

2010-02-02 Thread Thomas Schreiber
Missing applications in the admin is the sign of an error in an admin.py I'd double check there first. -Tom On Tue, Feb 2, 2010 at 00:59, CreativeConvergence wrote: > Hi, > I have a django-mingus blog I modified a bit and it's running > perfectly under django integrated development web server.

Re: Unicode name of field in form

2010-02-10 Thread Thomas Turner
In django you would do from django.utils.safestring import mark_safe forms.CharField(label = mark_safe('Ø')) On Dec 24 2009, 9:17 am, Andrij Skalyuk wrote: > Thanks for reply. > > I see, that in this case, i will use replacement system of Unicode > characters to ASCII. > > On Dec 23, 6:09 pm,

Best practices for restricting media?

2010-02-21 Thread Brett Thomas
Hey, this is a pretty basic sysadmin question, but seems pretty critical for django development. What's the best way to limit media on a django site to certain users? A typical example is a photo gallery app. Suppose you are recreating Flickr, and a user's photos should only be viewable by his/her

models.TextField --> \r\n in DB

2010-03-18 Thread Thomas Guettler
Hi, I just discovered that I have a random mix auf rows some with \r\n and some with only \n. I guess it depends on using a windows or linux browser to access the app. I use models.TextField (with django 1.0). Has someone seen this, too? What do you do? Thomas -- Thomas Guettler, http

Aggregating answers from different question types

2010-04-01 Thread Brett Thomas
Hey, this is a pretty basic schema question, but I'm wondering how to best implement it in Django. I have an app that collects user data from a few different question types: multiple choice questions, true/false questions, numerical questions, etc. I'll have a bunch of queries that aggregate all a

readonly unittests for production site

2010-04-15 Thread Thomas Guettler
- A page to list and start the unittests from a webpage (Start one, start all of an application, ...) - Start the unittest from the shell: list all unittests, start one, start all of an application. Anyone else interested? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mai

Re: How do you rollback a transaction outside the context of a request?

2010-04-15 Thread Thomas Guettler
use the commit_on_success decorator. Only the calling script in bin/ uses this. I would not use django.db.transaction.rollback() or something. Use the available decorators. Maybe you need to restructure your code to put the statements which can fail into an new decorated method. HTH, Thomas Bill

Re: Survey: FileBrowser and FancyUpload

2007-06-16 Thread Thomas Steinacher
I'm -0 on this because it's flash-based, but +1 for using MooTools. tom On Jun 16, 2007, at 12:47 PM, patrickk wrote: > > I usually don´t like the idea of using a js-framework for the > filebrowser. > nevertheless, today I´ve seen this: > http://digitarald.de/project/fancyupload/ > > it´s an s

Re: Best way to link to other pages in templates

2007-06-27 Thread Thomas Steinacher
Try the {% url %} tag: http://www.djangoproject.com/documentation/templates/#url tom On Jun 27, 2007, at 6:33 PM, Ryan K wrote: > > What is the best form of a link in my Django site's templates? For > example, I have a base.html which serves as the base template for all > others. It contains l

newforms: prefix delimiter (minus) not javascript friendly

2007-07-03 Thread Thomas Guettler
prefix set. Subclasses may wish to override. """ return self.prefix and ('%s-%s' % (self.prefix, field_name)) or field_name Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: Unicode branch merged into trunk

2007-07-04 Thread Thomas Guettler
Am Mittwoch, 4. Juli 2007 14:41 schrieb Malcolm Tredinnick: > I have just finished merging the Unicode branch into trunk (in r5609). Thank you Malcolm. Thomas Güttler --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

CharField vs. CharField

2007-07-06 Thread Thomas Güttler
Hi, I think it is bad, that there are two CharField classes. One for OR-Mapping and one for HTML (new)forms. Why not change the HTML classes to ...InputField? Thomas -- Thomas Güttler, http://www.tbz-pariv.de/ Bernsdorfer Str. 210-212, 09126 Chemnitz, Tel.: 0371/5347-917 TBZ-PARIV GmbH

Attributes for ManyToMany

2007-07-06 Thread Thomas Güttler
Hi, How can you add attributes to ManyToMany Relations? Given the example: http://www.djangoproject.com/documentation/models/many_to_many/ Publication -- N:M -- Article How can you store the page number of the published article? Thomas -- Thomas Güttler, http://www.tbz-pariv.de

Re: CharField vs. CharField

2007-07-06 Thread Thomas Güttler
Am Freitag, 6. Juli 2007 10:41 schrieb Malcolm Tredinnick: > On Fri, 2007-07-06 at 10:35 +0200, Thomas Güttler wrote: > > Hi, > > > > I think it is bad, that there are two CharField classes. ... > Any particular reason you only want to change CharField? Or any > technic

newforms: I18N (Date und Decimal)

2007-07-06 Thread Thomas Güttler
changed, too. Is someone already working on this? Thomas -- Thomas Güttler, http://www.tbz-pariv.de/ Bernsdorfer Str. 210-212, 09126 Chemnitz, Tel.: 0371/5347-917 TBZ-PARIV GmbH Geschäftsführer: Dr. Reiner Wohlgemuth Sitz der Gesellschaft: Chemnitz Registergericht: Chemnitz HRB 8543 --~--~-

Re: psycopg/psycopg2 - error at the loading

2007-07-06 Thread Thomas Guettler
shell (psql) should fail, too. > But after upgrading it mysteriously decided to stop working... What kind of upgrade? (SuSE, Django, Hardware, ...) Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djang

Re: psycopg/psycopg2 - error at the loading

2007-07-09 Thread Thomas Guettler
Look at /etc/ld.so.conf and "man ldconfig". > When I reinstall psycopg 1 or 2 (properly configured with my lib path / > usr/local/pgsql/lib/), > it works (no error at the install of psycopg) > > but then it can't find this damn lib ! > > --

Re: never_cache

2007-07-10 Thread Thomas Guettler
quest the first time, you need to store somehow that you received this value. If you get the same hidden value again, you need to refuse the POST request. Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dj

Re: Django Book Ch3 error

2007-07-11 Thread Thomas Guettler
Hi, I had the same error. Today, after "svn update" it worked. Thomas Am Dienstag, 10. Juli 2007 08:59 schrieb SM: > Hmmm. As a last resort I replaced the SVN (0.97) version of Django > with the 0.96 version and now it seems to work fine. Very strange, but > I'm rel

Re: newforms

2007-07-20 Thread Thomas Guettler
look at the branch up to now. I use newforms, but often I look into djang/newforms/*.py to find how to use and misuse it. Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To pos

newforms: How to pass onchange="..." ?

2007-07-24 Thread Thomas Guettler
Hi, how can I pass the html attribute onchange="..." with newforms? I want to add it to a ChoiceField. Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: newforms: How to pass onchange="..." ?

2007-07-24 Thread Thomas Guettler
Am Dienstag, 24. Juli 2007 10:32 schrieb Thomas Guettler: > Hi, > > how can I pass the html attribute onchange="..." with newforms? I found one solution myself: http://code.djangoproject.com/attachment/ticket/4961/newforms.diff#preview Adding HTML attri

Re: Django - technology or magic?

2007-07-24 Thread Thomas Guettler
to a web framework? I cannot > see this as technology. All I see is magic. Hi, If you are new to django and python: It is magic. But if you learn python, you can find solutions quickly by looking at the source. Newforms was magic for me first, too.

Traceback of endless loop

2007-07-26 Thread Thomas Güttler
Hi, how can you get a traceback if the script is inside a endless loop. Standalone python apps give you this by sending SIGINT. But this does not work with mod_python or the builtin webserver. Any hints? Thomas -- Thomas Güttler, http://www.tbz-pariv.de/ Bernsdorfer Str. 210-212, 09126

PopUp instead of Select widget (newforms)

2007-07-30 Thread Thomas Guettler
Hi, I want to use a popUp instead of an select widget, since there will be too many entries (>10.000). It would be better to use a PopUp with a search form. Has anyone done something like this? I search some example code to learn from. Tho

Re: Adding fields to form.clean_data

2007-07-30 Thread Thomas Guettler
Hi, if the fields will never be edited, you can use editable=False in your model. I do it like this: instance=formobj.save(commit=False) instance.attribute=... instance.save() BTW: the "commit" keywords does not mean database commit. If means, don't call save() of the instance. Am Montag, 30.

Re: learning django's HttpRequest Object and Middleware

2007-07-31 Thread Thomas Guettler
Am Dienstag, 31. Juli 2007 11:26 schrieb james_027: > Hi, > > I want to make sure that my understanding is right. is middleware the > place where I can add more attribute to the HttpRequest Object and > manipulate the added attribte? > > Is this advisable? if Not where is the right place to do it?

duplicate SQL statements

2007-07-31 Thread Thomas Guettler
MyModelClass.objects.get(id=...) at least for one request. Using the cache low level API is one, but not a good solution. Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: understanding request.user

2007-08-01 Thread Thomas Guettler
eds to be done for every request. You could use caching, but object caching (like for request.user) is not possible up to now. Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: UnicodeEncodeError

2007-08-01 Thread Thomas Guettler
is in latin1 I get this message often. Be sure to use only unicode strings in your code: example: models.py ... foo=models.CharField(maxlength=6, choices=( ("umlaut", u"üöäßÜÖÄ"), Thomas --~--~-~--~~~---~--~~ You received th

Re: How to get selected value set in newforms

2007-08-01 Thread Thomas Guettler
he definition of the choicefield > > status = forms.ChoiceField(required=False, choices=statlist) Hi, if choices=(("a", "Letter A",) ... you set initial to "a". Simple, isn't it? Thomas --~--~-~--~~~---~--~~ You received

Re: Newforms w/ *dynamic* ChoiceField choices?

2007-08-02 Thread Thomas Guettler
ssions and/or the state of the page > that the form is being displayed on, etc. By looking at the source I found the QueySetIterator: choices=forms.models.QuerySetIterator(User.objects.all(), "", False) HTH, Thomas --~--~-~--~~~---~--~~ You re

Re: Question about upload / FileField

2007-08-03 Thread Thomas Guettler
Am Freitag, 3. August 2007 15:34 schrieb ZhangshenPeng: > Question 1: > > When I removed "blank=True" from FileField ,then use below method > to upload file , but no matter whether your choosed file , the from > valid will report error "This field is required." All newforms Fields habe a keyw

Re: full-text indexing

2007-08-07 Thread Thomas Guettler
Am Dienstag, 7. August 2007 12:02 schrieb Kai Kuehne: > http://www.rkblog.rk.edu.pl/w/p/django-lupy/ Hi, Does lupy support transactions? Do both (SQL und text database) syncronize their transactions (commit or rollback both)? Thomas --~--~-~--~~~---~--~~

Re: Unicode error

2007-08-23 Thread Thomas Guettler
line should be at the top. Example -*- coding: iso-8859-1 -*-) If the string is from the database, you need to change the encoding of it. What DB do you use? Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Flexible Models?

2007-08-23 Thread Thomas Guettler
database level: One Category can have an other Category as parent. A subcategory has all the attributes of its parent and grandparents. The user can: - change the hierarchie of categories - add categories - add existing attributes to categories Up to now he can't: - add n

Re: Thumbnails for ImageField in admin pages

2007-08-28 Thread Thomas Badran
> One way is using the FileBrowser: > http://trac.dedhost-sil-076.sil.at/trac/filebrowser/wiki > > But I guess there are other possibilities (just search this forum ...) > > Patrick > > On 28 Aug., 15:35, Thomas Badran <[EMAIL PROTECTED]> wrote: > > Is it possi

Thumbnails for ImageField in admin pages

2007-08-28 Thread Thomas Badran
Is it possible to have thumbnails for images in the admin pages in 0.96 (ive read something that suggests this might be possible in svn)? I keep finding wonderful new tricks like the side by side javascript stuff for many to many fields etc. but cant seem to find a sensible way of doing this.

Re: Thumbnails for ImageField in admin pages

2007-08-28 Thread Thomas Badran
Brilliant, thankyou. Tom On Tue, 2007-08-28 at 13:51 +, daev wrote: > Try this: > > image = models.ImageField() > > def image_thumbnail(self): > return "" % > self.get_image_url() > image_thumbnail.allow_tags = True > > class Admin: > list_display = ( "image_thumbnail", ) > > >

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Thomas Badran
I haven't yet, but I'm currently working on a clients site that's likely to be translated at some point. Not the admin site though, just the main content. Tom On Wed, 2007-08-29 at 07:28 +, vanderkerkoff wrote: > Hello everyone > > I was wondering if anyone in this group had built a django

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Thomas Badran
Afraid not, i havent started toying with this yes. I was going on the assumption that unicode would work fine without problems (i thought everythign was unicode internally), looks like i might need to push forward some testing. Tom On Wed, 2007-08-29 at 11:04 +0100, Matt Davies wrote: > Tho

Django freelance work finder

2007-09-04 Thread Thomas Badran
I assume there are some other people on this list that do the occasional bit of freelance work. Is there anywhere you would recommend to look for this sort of work, or software development freelance work in general? Sorry for being a bit off topic. Tom --~--~-~--~~~

Re: Django freelance work finder

2007-09-04 Thread Thomas Badran
Doh, cant believe i missed that! Thanks Tom On Tue, 2007-09-04 at 17:31 -0500, Jeremy Dunck wrote: > On 9/4/07, Thomas Badran <[EMAIL PROTECTED]> wrote: > > > > I assume there are some other people on this list that do the occasional > > bit of freelance work.

Re: Django Flatpages With Memcache as storage location

2007-09-09 Thread Thomas Badran
My best guess would be that you are missing the / at the start and end of the url Tom On Sat, 2007-09-08 at 21:00 -0700, Sasha Weberov wrote: > All of my flatpage pages throw a 404. If I turn debug on which > disabled cacheing they re-appear. I've tried restarting memcached and > my SCGI server

Modifing User.__unicode__

2008-01-08 Thread Thomas Guettler
Hi, our customer wants to display the username as 'username: firstname lastname' The easiest way would be to overwrite User.__unicode__. But where should you put code like this? Up to now I put it in our middleware. Any comments, or better solutions? # middleware.py import new from django.cont

Re: Modifing User.__unicode__

2008-01-08 Thread Thomas Guettler
s: %s %s' % (self.username, self.first_name, > self.last_name) > User.__unicode__ = user_unicode Hi, Yes, that's simpler than my solution. And the models file is a good place for this. Thank you, Thomas --~--~-~--~~~---~--~~ You received this

Re: static file problems (newbie)

2008-01-09 Thread Thomas Guettler
Hi, Can you access http://127.0.0.1:8000/css/idap.css ? Maybe you have a tag in you html? Am Mittwoch, 9. Januar 2008 13:49 schrieb [EMAIL PROTECTED]: > Hello Django Users, > > I looked at the documentation about the static file serving but don't > seem to get it to work. > > the url pattern i

Breadcrumbs

2008-01-21 Thread Thomas Guettler
Hi, I developed this method to create breadcrumbs. What do you think about it? Thomas # Python from urlparse import urljoin # Django from django import http from django.core import urlresolvers from django.core.urlresolvers import reverse from django.conf import settings from

Re: considering django for The Freesound Project, some (de)constructive critisism

2008-01-22 Thread Thomas Guettler
need to create a new table/model. I use this: Every object has a corresponding directory in the filesystem: .../files/OBJECT-ID/ I store the files there. The filename get's quoted with django.utils.http.urlquote() this way the filenames contain only a

Re: Django media project

2008-01-22 Thread Thomas Guettler
eed back too. Hope I am not violating any rules by > posting this here. It is a django based project. Thanks. No, AFAIK you don't violate any posting rules. But an announce email should contain all needed information. Following the links should b

Re: How to remove email heading "Content-Type"?

2008-01-23 Thread Thomas Guettler
e to get rid of it? Why do you want to get rid of it? That's what it is: HTML. I don't understand your question. Maybe attach a small example mail to show your problem. Thomas --~--~-~--~~~---~--~~ You received this message because you are subscrib

Re: How to get a model's fk's host class?

2008-01-24 Thread Thomas Guettler
Am Donnerstag, 24. Januar 2008 05:02 schrieb xunSir: > class Person(models.Model): > PIN = models.CharField(maxlength=20, primary_key=True) > Name = models.CharField(maxlength=20) > > class Burse(models.Model): > PIN = models.ForeignKey(Person) > Cash = models.IntegerField() >

Re: Optimistic Locking

2008-01-24 Thread Thomas Guettler
;, mtime)]) return self.mtime!=mtime Comments welcome HTH, Thomas --~--~-~--~~~---~--~~ 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@googlegrou

Re: category counter

2008-01-25 Thread Thomas Guettler
all categories by using filter(), just put .count() at the end and you get the result. HTH, Thomas Güttler Am Freitag, 25. Januar 2008 08:47 schrieb Chris: > hello again. thanks for all the help that everyone has offered me > here. > > I have a generic django application called categ

Re: How can I parse and process the contents of an URL?

2008-01-28 Thread Thomas Guettler
u need to set the http_proxy environment variable. You can try the view by uncommenting urlopen() and c.read() and setting content to a string. HTH, Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django us

Re: Have get_profile() delegate to one of several profile models depending on type of user

2008-01-29 Thread Thomas Guettler
create myprofile, if it does not exist up to now. Since you want three different profiles, I would create three properties. I think this is better than one property which returns different model instances. Thomas Am Montag, 28. Januar 2008 21:11 schrieb Chris Pratt: > This question has b

Re: database performance problem

2008-01-30 Thread Thomas Guettler
res.append(day.date) > break > return res Just a guess. Try this: projects = list(project_category.projects.all()) or this: projects = project_category.projects.all()[:] Please report if this fetches all at once. Thomas Güttler --~--~-~--~~

Re: Optimistic Locking

2008-01-31 Thread Thomas Guettler
Am Montag, 28. Januar 2008 10:16 schrieb Alistair Lattimore: > Thomas, > > Do you use a custom manager to select out the row before issuing the > save to make sure that the in memory timestamp matches that of the > database? > No, since I don't use caching the mtime sho

Re: Simultaneous edits

2008-01-31 Thread Thomas Guettler
Am Mittwoch, 30. Januar 2008 16:18 schrieb Michael Hipp: > Does Django have any built-in way to handle or prevent simultaneous, > incompatible edits to a database record? Some days ago there was a thread about optimistic locking: I wrote an second answer some minutes ago. http://groups.google.c

<    1   2   3   4   5   6   7   8   9   10   >