Image/Photo app

2012-10-12 Thread Thomas Guettler
and notes between the GUI and the web app. I need these features: - tags - notes - star rating - access control: A user must only see these pictures which match to his groups/permissions. - search by tag and date. Regards, Thomas Güttler -- Thomas Guettler, http://www.thomas

Re: Beginer: Need Help in setting up goflow, could you please elaborate initial Gflow setup

2012-09-20 Thread Thomas Guettler
isit this group at http://groups.google.com/group/django-users?hl=en. -- 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, s

Re: What is the easy way to install DJango?

2012-08-15 Thread Thomas Guettler
would use Linux for development, too. You can use a virtual machine. HTH, 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

Re: Choosing a Django-based CMS

2012-08-08 Thread Thomas Guettler
del. I use this pattern often if I want to extend an app. It is developer friendly and you won't notice the fact that there is one more SQL query. Regards, Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message becau

Links between App and Docs

2012-05-21 Thread Thomas Guettler
you do this? Reated: http://stackoverflow.com/questions/10512971/links-between-documentation-sphinx-and-django-app http://sphinx.pocoo.org/latest/ext/intersphinx.html -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because

Re: DB queries at import time

2012-04-13 Thread Thomas Guettler
. 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-users@googlegroups.com. To unsubs

Re: DB queries at import time

2012-04-12 Thread Thomas Guettler
Am 12.04.2012 15:25, schrieb Jani Tiainen: 12.4.2012 15:09, Thomas Guettler kirjoitti: Hi, sometimes it happens, that db queries get executed at import time (during importing the file by the interpreter). That's waste of time a resources. Is there a way to test how many queries get

DB queries at import time

2012-04-12 Thread Thomas Guettler
mychoices(): for obj in MyModel.objects.all(): # this hits the db during import. That's not good. class MyForm(forms.Form): foo=forms.ChoiceField(choices=mychoices()) -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received

PostgreSQL Introspection Bug

2012-04-11 Thread Thomas Guettler
Hi, I fixed a postgreSQL introspection bug, but unfortunately it is still in stage "new". Can someone please review it? https://code.djangoproject.com/ticket/17785 Thank you, Thomas Güttler -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-gue

Comparing QuerySets

2012-04-05 Thread Thomas Guettler
think they should be: [1] [1] I could not find a documentation of this in the django docs[1]. Before creating a doc-ticket I want to ask here. [1] https://docs.djangoproject.com/en/dev/ref/models/querysets/ -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de

Re: Django deployment practices -- do people use setup.py?

2012-03-14 Thread Thomas Guettler
at the moment: - Fabric command sets up apache and directories - Another one uses setup.py to create an archive, delivers the archive and runs setup.py install etc. Is this silly? What are your thoughts? -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler

Batch processing in parallel (celery)

2012-03-12 Thread Thomas Guettler
, but it is overkill for my current project. How can I use the ORM with the multiprocessing python module? The docs don't contain information about this. On the net you can find some notes How do you solve this? Do you use celery? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail

Update primary key and update child tables

2012-02-22 Thread Thomas Guettler
). Thomas Güttler -- 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-users@googlegroups.com. To unsubs

Staging (dev,test,prod) in django

2012-01-12 Thread Thomas Guettler
solutions. Looks too big for me. Fabric: could be used to implement "diff files" and "diff database-table". How do you handle staging? - Deploy the source code and static files - diff files between stages - diff database tables. Thomas -- Thomas Guettler, http://www.t

Re: Get database server version

2012-01-03 Thread Thomas Guettler
On 03.01.2012 11:22, Thomas Guettler wrote: Hi, while testing my application with 1.4 alpha, I see that connection._version no longer exists. How can I get the database server's version? Up to now I only use postgres, but a portable way would be better. Thomas May postgres only

Get database server version

2012-01-03 Thread Thomas Guettler
Hi, while testing my application with 1.4 alpha, I see that connection._version no longer exists. How can I get the database server's version? Up to now I only use postgres, but a portable way would be better. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli

Re: Cascading Select Input Boxes (peek into request data)

2011-12-20 Thread Thomas Guettler
On 20.12.2011 11:59, Thomas Guettler wrote: Hi, I have three cascading select input fields. I data is different, but for example: state, city and street. They are all ModelChoiceFields. With jquery and view returning json, it is very easy to fill "city" if you sele

Cascading Select Input Boxes (peek into request data)

2011-12-20 Thread Thomas Guettler
I think _raw_value() should be in the public API. 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

Re: Website Documentation Search broken?

2011-12-14 Thread Thomas Guettler
Ignore it, this morning even a single word search had no results. Now it works. All is fine Thomas On 14.12.2011 10:55, kenneth gonsalves wrote: On Wed, 2011-12-14 at 10:02 +0100, Thomas Guettler wrote: is the search on https://docs.djangoproject.com/en/1.3/ broken, or is it just me

Website Documentation Search broken?

2011-12-14 Thread Thomas Guettler
Hi, is the search on https://docs.djangoproject.com/en/1.3/ broken, or is it just me, getting no results? 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 "D

Re: Slow page load

2011-11-18 Thread Thomas Guettler
this helps you to narrow down the part which is slow. 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

Re: Which Linux distro to use on EC2?

2011-11-14 Thread Thomas Guettler
own kernel and libc. I would use ubuntu. 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-use

Re: Caching at model class level

2011-11-04 Thread Thomas Guettler
Am 03.11.2011 18:42, schrieb Tom Evans: > On Thu, Nov 3, 2011 at 2:22 PM, Thomas Guettler <h...@tbz-pariv.de> wrote: >> Hi, >> >> I try to reduce the number of db-queries in my app. >> >> There is a model which changes almost never. It is like a "t

Re: Caching at model class level

2011-11-03 Thread Thomas Guettler
r 3, 2011 at 10:22 AM, Thomas Guettler wrote: > >> Hi, >> >> I try to reduce the number of db-queries in my app. >> >> There is a model which changes almost never. It is like a "type of ticket" >> in a trouble ticket system. >> >> On one page

Caching at model class level

2011-11-03 Thread Thomas Guettler
db) class TicketType(models.Model): objects=ThreadLocalManager() If there would be many TicketTypes, the interpreter would use more and more memory, but there are few. Feedback welcome, Thomas Güttler -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + d

Re: QuerySet: "if obj in queryset" can be very slow

2011-11-03 Thread Thomas Guettler
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-users@googlegroups.com. To unsubscribe from this group,

Re: QuerySet: "if obj in queryset" can be very slow

2011-11-02 Thread Thomas Guettler
lazy. I have no big problem with this, since I found a solution. Is there a reason why "if obj in queryset" is executed in python code, and not in the DB? Thomas Am 02.11.2011 12:42, schrieb Thomas Guettler: > Hi, > > I just discovered, that "if obj in queryset" ca

QuerySet: "if obj in queryset" can be very slow

2011-11-02 Thread Thomas Guettler
(id=obj.id): # Fast: Check is done inside DB. print 'in' What is the best way to do "if obj in queryset"? 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 G

Closing all connections to DB.

2011-11-01 Thread Thomas Guettler
sycopg2 2.3.2 -- 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-users@googlegroups.com. To unsu

cache_page: force reload

2011-10-06 Thread Thomas Guettler
d not be ignored. BTW, if you are a developer and want to force a reload, you can add a query-string: http:///foo/?x If you are afraid of denial of service attacks, an attacker could send you a different query-string in every request! }}} Thomas -- Thomas Guettler, http://www.thomas-guettler.

Re: Community Wiki/CMS app

2011-09-28 Thread Thomas Guettler
little too much, try out Django-cms: > https://www.django-cms.org/ Have you every used Pinax? I looked at the mailing list Maybe I am wrong, but I can't see a healthy community there. Same here: nearly no code changes in the last weeks: https://github.com/pinax/pinax/commits/master/

Community Wiki/CMS app

2011-09-28 Thread Thomas Guettler
most of this. I have seen the comparison grids on http://djangopackages.com/ but I am unsure, and don't have much time for the decision. Any feedback welcome, Thomas Güttler -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received

queryset.delete() ON DELETE ...

2011-09-27 Thread Thomas Guettler
ForeignKey the on_delete argument. But what can you do, if you want this only for one delete call, not always? 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 "Djan

Re: Django Development environment

2011-08-25 Thread Thomas Guettler
ersion: http://code.djangoproject.com/svn/django/branches/releases/1.3.X Source: svn Stages: DEV, QUAL, PROD synced with unison. Webserver: Apache, mod_wsgi Nightly unittests. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You re

Re: Django API

2011-07-12 Thread Thomas Guettler
veloper started to create api documentation with epydoc for django. AFAIK they never used it much, I guess it took more time to configure epydoc, than time was spent to read the created stuff. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -

Re: django/python performance vs play/java

2011-07-08 Thread Thomas Guettler
have more improvements Hi, I am interessted in the result. Please post them to the list. 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&quo

Re: django/python performance vs play/java

2011-07-06 Thread Thomas Guettler
; outer join while django do an inner join, since the field on which I > join cannot be null. -- 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" gro

Media (JS/CSS) handling outsite Forms

2011-06-29 Thread Thomas Guettler
media files to a global (thread safe) variable and a middleware includes them into the result. Not a nice solution, but I see no better solution. How do you handle this? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received

Custom Admin Login Page

2011-06-27 Thread Thomas Guettler
has this problem, or a solution? 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-users@goo

Django Admin: Add text at runtime next to a field

2011-06-14 Thread Thomas Guettler
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-users@googlegroups.com. To unsubscribe from this group, send email

Re: Updating static files: Still in browser cache

2011-06-10 Thread Thomas Guettler
On 09.06.2011 19:18, Malcolm Box wrote: > > > Sent from my iPhone, please excuse any typos > > On 9 Jun 2011, at 14:21, DrBloodmoney <drbloodmo...@gmail.com> wrote: > >> On Thu, Jun 9, 2011 at 9:16 AM, Malcolm Box <malcolm@gmail.com> wrote: >>

Re: Excel dumps to Office 10

2011-06-09 Thread Thomas Guettler
box and the file opens > but it is still annoying. Do you have to do anything specifically for > Excel 2010 to get that message to go away? > > -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you

Updating static files: Still in browser cache

2011-06-09 Thread Thomas Guettler
Hi, My static files (JS/CSS) are cached in the browser. But if there is a bug in a file, an update won't help people which have already cached the old file. You would need a new URL for every change in the JS/CSS files. How do you handle this? Thomas -- Thomas Guettler, http://www.thomas

Re: How to register JS event handler

2011-05-18 Thread Thomas Guettler
On 17.05.2011 13:18, Michal Petrucha wrote: > On Tue, May 17, 2011 at 12:34:05PM +0200, Thomas Guettler wrote: >> Hi, >> >> I want to register some jquery event handler for some widgets of a form >> (FooForm). The >> form gets used in several views. >> >

How to register JS event handler

2011-05-17 Thread Thomas Guettler
the js/jquery lines in every page which uses FooForm? 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

Failed to build documentation (solved)

2011-03-10 Thread Thomas Guettler
easy_install copied the old version from /usr/lib into my home directory. HTH, Thomas Güttler -- 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"

Re: ANN: Django 1.3 release candidate available

2011-03-04 Thread Thomas Guettler
about a week. > > Details for the release candidate are available on the official Django weblog: > > http://www.djangoproject.com/weblog/2011/mar/03/13-rc/ > > -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received

Re: Changing a constraint with live data

2011-01-04 Thread Thomas Guettler
t; Is there a straightforward way to do this? -- 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-

Re: Too many items in my drowndown list

2011-01-03 Thread Thomas Guettler
he dropdownlist? > > > Thanks > -- 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...@

Re: Project management software

2010-12-01 Thread Thomas Guettler
ally happen. > > If you're interested in contributing, or even in using the code, let > me know either on-list, or by private e-mail. If there is some > interest, I'll release the code under the GPL in January, and begin > more active development. > -- Thomas Guettler, http://www.t

Re: Spaces in request.GET

2010-10-21 Thread Thomas Guettler
quest.GET['product'] > Log('%s' %value) > if not (value == 'all'): > cores = cores.filter(product__build_num=value) > -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you

Re: django graphs

2010-10-06 Thread Thomas Guettler
t; 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 > -- Thomas Guettler, http://www.thomas-guettler.de/

Re: A better way of checking if a record exists

2010-10-01 Thread Thomas Guettler
> Is the first really the 'accepted' way of doing this? > > ALJ > -- 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 gr

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/m

No caching if request.GET not empty

2010-09-27 Thread Thomas Guettler
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? Thomas -- Thomas Guettler

Re: GoFlow - anybody out there used it?

2010-09-07 Thread Thomas Guettler
e is a *lot* > of tidy up required on the code & docs. > > Has anybody else actually used this project, and if so what are your > thoughts? > > It might save me investing a load of time in something that could have > been better spent writing something from scratch. > &

Re: Best practice for maintaining the "Django stack"

2010-08-13 Thread Thomas Guettler
s that are installed now. > > My question isn't really about how to resolve this particular issue but > rather about best practices for maintaining a consistent "Django stack", > so that similar errors will not happen in the future. > > > Oivvio > -- Thomas

Re: Getting Duplicate records with Q query

2010-06-03 Thread Thomas Guettler
le search criteria that looks in both the > subject and body of the note for the same value. That query doesn't > return duplicates even if a note has the same value in both fields. > > notes = Note.objects.filter( Q(subject__icontains=q) | Q(body__icontains=q)) > > So, obvious

Re: DJango Deployment

2010-06-01 Thread Thomas Guettler
n and remedy for the problem ?. On keeping a href link that > points to a Django project successfully reloads the page and shows the > response as a new page. > > Should I be using Jython to deploy Django in Tomcat ? > -- Thomas Guettler, http://www.thomas-guettler.de/ E

Re: Ordering a QuerySet by a Python property ?

2010-05-19 Thread Thomas Guettler
wiki.python.org/moin/HowTo/Sorting/ Your QuerySet gets a list during sorting. This means all items need to fit into the memory. -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google

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

2010-04-15 Thread Thomas Guettler
Bill Freeman wrote: > How does this apply when there is no request? I'm not following you. I forgot to say, that I would create a temporary script file which uses the decorator commit_on_success instead of using "manage.py shell". Thomas -- Thomas Guettler, http://www.thoma

Re: readonly unittests for production site

2010-04-15 Thread Thomas Guettler
methods which modify the DB, that an exception gets raised. And there are some other features: Call all views, except views which have the attribute 'no_readoly_test' with a pseudo GET request. I run this script nightly and after updates. Thomas -- Thomas Guettler, http://www.thomas-guettler.de

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

2010-04-15 Thread Thomas Guettler
ke this, where you have no request. I explained it in my first post. 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 po

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

2010-04-15 Thread Thomas Guettler
gt; Can someone tell me the appropriate incantations? > > Bill > -- 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

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

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

Extend model choice in project

2010-01-22 Thread Thomas Guettler
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...@googlegroups.com. To u

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 subscribed

Re: Model instances used for class attributes

2009-12-07 Thread Thomas Guettler
bruno desthuilliers wrote: > On 7 déc, 11:45, Thomas Guettler <h...@tbz-pariv.de> wrote: >> Hi, >> >> I have this code: >> >> from django.contrib.auth.models import Group >> >> class MyModel(models.Model): >> default_group=Group.obj

Model instances used for class attributes

2009-12-07 Thread Thomas Guettler
not work, since AFAIK properties only work for instances. Has someone a solution? 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" grou

Re: Darpa challenge

2009-10-30 Thread Thomas Guettler
person to get the location of all 10 balloons and > submit them will be given $40k. What happens if fools start red balloons, just for fun? It will be hard to distinguish between the original and joke balloons. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: gu

request.get_full_path() vs REQUEST_URI

2009-10-30 Thread Thomas Guettler
://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.META http://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpRequest.get_full_path -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de

Re: Sharing data between two Django sites

2009-10-27 Thread Thomas Guettler
accessible (e.g. a CMS). > My problem is that certain data from the Intranet sites have to be > displayed on a publicly accessible site (e.g. a list of staff members > that is maintained on the Intranet). What's the cleanest approach to > solve this? The potential solutions I have so fa

Re: Archiving Model Instances?

2009-10-16 Thread Thomas Guettler
I forgot to mention, that you can write a custom manager. This way FooModel.objects.all() only returns not archived instances. Thomas Guettler wrote: > Hi, > > If you use indices to access the models, you will see no noticable difference > in speed between 1,000 and 100,000 ro

Re: Archiving Model Instances?

2009-10-16 Thread Thomas Guettler
utions than > moving archived entries into another model (table)? … or a more common > solution? -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: database design

2009-09-30 Thread Thomas Guettler
mart wrote: > > On Sep 30, 2009, at 4:17 PM, Thomas Guettler wrote: > >> In OrderDetail you have a ForeignKey to Product. But you need to >> *copy* >> the price. Example: if someone orders something at day1 for 1 dollar, >> and you set the price on day2 t

Re: database design

2009-09-30 Thread Thomas Guettler
reignKey(User, verbose_name=_("Customer"), > related_name=_("orders")) > status = models.ForeignKey("OrderStatus",related_name=_("orders")) > > and then i got Product, OrderDetail, ShippingAddress, Shipment etc... > ...

readonly forms

2009-09-14 Thread Thomas Guettler
to get this in to django (or contrib). [1] http://www.djangosnippets.org/snippets/1682/ -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Django Project Management App

2009-09-11 Thread Thomas Guettler
o project management projects to use and/or contribute to, > but there doesn't seem to be any out there. > There is one. I searched for an alternative to trac some time ago. Basie can handle several SVN-Repositories (Trac does not) and uses django. But I had to time to try it: http://basiep

Re: Restricting database permissions

2009-09-07 Thread Thomas Guettler
nfiguration file level so that upon running > syncb, the permissions are in place? > > Any pointers greatly appreciated. -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~~---~--~~ You received this message be

Re: model validation errors

2009-09-01 Thread Thomas Guettler
ngoproject.com/ticket/6845 with a patch to do > model validation (1 year ago) that looks > like what I need, but is it stable? -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~~---~--~~ You received

Re: Many-to-many column admin interface

2009-08-31 Thread Thomas Guettler
not syncdb. > Its really simple, just 6 lines at all. -- 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&quo

Re: Many-to-many column admin interface

2009-08-27 Thread Thomas Guettler
> > Now when i edit A in the admin interface everything is ok, i can select all > B instances A belongs to. > > What i need now is to be able to do the same thing from B's admin interface. > When i edit B i want to select all instances of A B belongs to. > > Is there a way to achieve

Re: How to check which form was submitted?

2009-08-27 Thread Thomas Guettler
pass > > And second one is handled by middleware, in similar way You handle forms in a middleware? Why? Middleware code gets executed for every http request ... Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~

Re: Error in setting up psycopg2

2009-08-26 Thread Thomas Guettler
ms to be broken. Try to use psycopg2 without django. 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 us

Re: Error in setting up psycopg2

2009-08-25 Thread Thomas Guettler
.framework/Versions/2.6/lib/ > python2.6/site-packages/psycopg2/tz.py > > I can read the file with more. Seems that there is no problem on > permission. Please advise. > -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~---

Re: Error in setting up psycopg2

2009-08-24 Thread Thomas Guettler
/bin/false means he has no login-shell. Change this to /usr/bin/bash (or you preferred shell). If you get "permission denied" while accessing the python files as www you need to run "chmod -R a+rX /..." Thomas -- Thomas Gu

Re: Error in setting up psycopg2

2009-08-21 Thread Thomas Guettler
.py is in the directory: "'/Library/Frameworks/Python.framework/ > Versions/2.6/lib/python2.6/site-packages/psycopg2" which is in the > sys.path list. Why does the import still fail? Please advise. -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) t

Re: Check server type at runtime?

2009-08-20 Thread Thomas Guettler
running off the Django development server > (manage.py runserver) as opposed to Apache et al. -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~~---~--~~ You received this message because you are subscribe

Re: Error in setting up psycopg2

2009-08-20 Thread Thomas Guettler
ame', '/Library/Frameworks/Python.framework/Versions/2.6/lib/ > python2.6/site-packages/django', '/Library/Frameworks/Python.framework/ > Versions/2.6/lib/python2.6/site-packages/psycopg2'] > > > > Any idea? Please advise. Thanks. > > Simon > > On Aug 1

Re: Django "freezing" after a few minutes?

2009-08-20 Thread Thomas Guettler
sof which tcp/ip connections the process waits for in the system call select. You can write a simple script with python and psycopg2 (without django, just execute a simple SELECT statement) and check if you can still connect after the pages don't get through django anymore. Thomas -- Thomas Guettler,

Re: Django "freezing" after a few minutes?

2009-08-19 Thread Thomas Guettler
s, > it just stops. Apache is still able to serve static files. Just > nothing through Django. > > I've checked the apache error logs, and I don't see any entries that > could be related. I'm not sure if this is a WSGI, Django, Apache, or > Postgres issue? -- Thomas Guettler, http://w

Re: Problem with Django/Jython and Postgres backend

2009-08-19 Thread Thomas Guettler
host> find django/ -name '*.py'|xargs grep 'class DatabaseClient' django/db/backends/postgresql/client.py:class DatabaseClient(BaseDatabaseClient): ... Mine just inherits from BaseDatabaseClient. -- Thomas Guettler, http://www.thomas-guettler

Re: Check server type at runtime?

2009-08-19 Thread Thomas Guettler
Hi, AFAIK there is no such variable in settings.py. It would be nice to have it. In your company we use the variable STAGE. ringemup schrieb: > Is there any way to check at runtime whether Django is running on the > development server? > > Thanks! -- Thomas Guettler, http:

Re: Problem with "Cancel" button

2009-08-19 Thread Thomas Guettler
return render_to_response('cancel.html') I guess the error is in cancel.html. You need to post it here. HTH, Thomas Güttler -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~~---~--~~ You received this me

Re: Error in setting up psycopg2

2009-08-19 Thread Thomas Guettler
n > process_request > [Wed Aug 19 11:00:26 2009] [error] [client 127.0.0.1] ImportError: No > module named db Here you will find your ImportError and sys.path. -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~~---~-

Re: OT: Drawing lines in the browser

2009-08-19 Thread Thomas Guettler
Chris McCormick schrieb: > On Tue, Aug 18, 2009 at 07:40:00AM -0700, Ian McDowall wrote: >> On Aug 18, 8:53 am, Thomas Guettler <h...@tbz-pariv.de> wrote: >>> Hi, >>> >>> this is offtopic: How can you draw lines in a (django) web application? >>&

OT: Drawing lines in the browser

2009-08-18 Thread Thomas Guettler
Hi, this is offtopic: How can you draw lines in a (django) web application? I think you need to use flash or java to do it. I googled for it, but found only beta quality projects. Has anyone experience with this? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli

Re: Inheritance at runtime (per model instance)

2009-08-13 Thread Thomas Guettler
Hi Malcolm, Malcolm Tredinnick schrieb: > On Wed, 2009-08-12 at 14:24 +0200, Thomas Guettler wrote: >> Hi Malcolm and others, >> >> Malcolm Tredinnick schrieb: > [...] > > >>> You already have the content type table for referring to other model >&g

Re: Inheritance at runtime (per model instance)

2009-08-12 Thread Thomas Guettler
Hi Malcolm and others, Malcolm Tredinnick schrieb: > On Wed, 2009-08-12 at 11:39 +0200, Thomas Guettler wrote: >> Hi, >> >> I am writing a workflow engine. The base workflow is stored in the DB. >> But some code needs to written for most workflows. >> >

  1   2   3   4   >