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

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

FileField: id of row (like strftime)

2007-05-25 Thread Thomas Güttler
ct) This way all attachments of one MyObjects are in the same directory. This would be very nice. 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

No tests for newforms

2007-10-04 Thread Thomas Güttler
Hi, I was told to include a test in my newforms patch: http://code.djangoproject.com/ticket/5335 I couldn't find any tests for newforms. Am I blind? Thomas -- Thomas Güttler, http://www.tbz-pariv.de/ Bernsdorfer Str. 210-212, 09126 Chemnitz, Tel.: 0371/5347-917 TBZ-PARIV

Get all related instances

2007-10-22 Thread Thomas Güttler
_object in meta.get_all_related_objects()+meta.get_all_related_many_to_many_objects(): attr = getattr(instance, related_object.get_accessor_name()) related.extend(attr.all()) return related -- Thomas Güttler, http://www.tbz-pariv.de/ Bernsdorfer Str. 210-212, 09126 Chemnitz, Tel.: 0371/5347

settings.py gets imported twice

2007-11-05 Thread Thomas Güttler
rt__(self.SETTINGS_MODULE, {}, {}, ['']) File "/localhome/user/myproject/settings.py", line 147, in ? This shnippet has a workaround: http://www.djangosnippets.org/snippets/16/ (I have not tested it yet) I think it would be better to avoid a second import. Any hints? Th

Re: validating fields with newforms - part 2

2007-11-26 Thread Thomas Güttler
rtEnd(Form): start = IntegerField() end = IntegerField() def clean(self): start, end = self.cleaned_data.get('start'), self.cleaned_data.get('end') if start!=None and end!=None and start>end: self.errors.append('start&#

Re: Out of range value

2007-11-26 Thread Thomas Güttler
usted for column 'poolMaskID' at row 1! There is a patch which works for me (postgres): http://code.djangoproject.com/ticket/399 -- 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 Wohl

SCGI (or other) graceful restart

2007-11-30 Thread Thomas Güttler
support graceful restart. 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

Deploying CSS/JS with pip

2013-05-21 Thread Thomas Güttler
fanstatic together with django? My goal is to easy the automated deployment. How do you handle the dependency on external resources like jquery libraries? Do you store a tgz file inside your source code repository? Regards, Thomas Güttler [1] http://www.fanstatic.org/en/latest/ -- You rec

Middleware + Transactions

2015-01-30 Thread Thomas Güttler
view transaction? Regards, Thomas Güttler -- Thomas Güttler http://thomas-guettler.de/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django

App for storing ChangeLogs in database

2015-02-06 Thread Thomas Güttler
eedback: What do you think? How do you handle your ChangeLogs. PS: Our customers are normal (non programmers) people. They don't want to see diffs or commit messages they don't understand. -- Thomas Güttler http://thomas-guettler.de/ -- You received this message because you are sub

Re: App for storing ChangeLogs in database

2015-02-09 Thread Thomas Güttler
ation needs to done by a human. It can't be automated, and I think it is worth the effort. Regards, Thomas Güttler -- Thomas Güttler http://thomas-guettler.de/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

cache.set(key, timeout=0)

2015-02-10 Thread Thomas Güttler
-usage I don't want to put a lot of "if default_cache_timeout==0: " into my code. It would be nice if django would support this. This would make my code simpler. Does cache.set(key, timeout=0) do no caching at all? If yes, shouldn't this be stated in the docs explicitl

Re: Global access to request.user

2015-03-27 Thread Thomas Güttler
p inside OOP python code. The method needs to know which user is logged in to return the correct result. Of course I could always return a hyperlink. And users which don't have the permission will see the permission denied page. But this is not user friendly. Can you understand this use case

Re: Global access to request.user

2015-04-01 Thread Thomas Güttler
the "passing state around being ugly", because the code is already architecturally flawed and inherently ugly to start with. Also, abusing globals starts to get real ugly when you introduce co-routines and overall makes for much less readable code (imho). Yes, I think co-routines make thi

Re: Global access to request.user

2015-04-01 Thread Thomas Güttler
Am 27.03.2015 um 19:05 schrieb Stephen J. Butler: On Fri, Mar 27, 2015 at 10:30 AM, Thomas Güttler wrote: You have an instance method to render one row of a search result (a custom paginator). One column of this row displays a link. Some users are allowed to follow the link, some are not

setup.py for project?

2015-04-01 Thread Thomas Güttler
e sense for the project? How do you manage your projects (not apps)? Regards, Thomas Güttler -- Thomas Güttler http://thomas-guettler.de/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receivin

Re: setup.py for project?

2015-04-02 Thread Thomas Güttler
vourite book seller. There are many books about this topic. Which one do you recommend? Regards, Thomas Güttler -- -- Thomas Güttler http://thomas-guettler.de/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Warnings instead of only errors in Django Forms

2014-08-13 Thread Thomas Güttler
page won't help me. I need a python solution (without templates), since the form rendering is done by a third party library. [1] http://stackoverflow.com/questions/2270550/warnings-or-even-info-messages-instead-of-only-errors-in-django Regards, Thomas -- Thomas Güttler http://t

Re: Install Django Apps via Admin Interface

2014-09-12 Thread Thomas Güttler
INSTALLED_APPS, but also adding configurations to settings.py, running syncdb/migrate and reloading the instance. I guess django experts have a good solution for this small technical problem. Thomas -- Thomas Güttler http://thomas-guettler.de/ -- You received this message because you a

Re: Install Django Apps via Admin Interface

2014-09-17 Thread Thomas Güttler
would work without getting added to INSTALLED_APPS. It would be nice if such a sub architecture would be outside of django-cms, to make it more reusable. Thomas -- Thomas Güttler http://thomas-guettler.de/ -- You received this message because you are subscribed to the Google Groups "Dja

Config: DB or git?

2014-09-29 Thread Thomas Güttler
, since version control is great for files, and not so good for databases, but I think it is the way to go. What do you think? Thomas -- Thomas Güttler http://thomas-guettler.de/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To u

Re: Config: DB or git?

2014-09-29 Thread Thomas Güttler
ink. Unfortunately the feature "data store" is not evaluated up to now. But I created a feature request: https://github.com/pydanny/djangopackages/issues/293 Thomas -- Thomas Güttler http://thomas-guettler.de/ -- You received this message because you are subscribed to the Google Groups &

Exceptions in signal handlers pass silently

2014-09-30 Thread Thomas Güttler
I just discovered, that exceptions in signal handlers pass silently. Is there a way to not silently ignore errors? >>> import this -- Thomas Güttler http://thomas-guettler.de/ -- You received this message because you are subscribed to the Google Groups "Django users" gr

Including JS/CSS in reusable widget library

2014-09-30 Thread Thomas Güttler
above pages are good. But it is even better if there is a common way how to handle this in the django world. Thomas -- Thomas Güttler http://thomas-guettler.de/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Exceptions in signal handlers pass silently

2014-10-02 Thread Thomas Güttler
found this solution: {{{ from django.dispatch import Signal Signal.send_robust = Signal.send }}} Source: http://giovanni.bajo.it/post/47207612849/djangos-signal-send-robust-is-broken-by-design -- Thomas Güttler http://thomas-guettler.de/ -- You received this message because you are subscribed

Re: Including JS/CSS in reusable widget library

2014-10-02 Thread Thomas Güttler
oday. But maybe some else does. Thomas -- Thomas Güttler http://thomas-guettler.de/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubsc

Re: Config: DB or git?

2014-10-02 Thread Thomas Güttler
ook at the data which gets configured here? I love git like most programmers love their version control system. But for most stuff config in DB is much better. example: INSTALLED_APPS Wouldn't it be really cool if you could add an app by pressing a button? Thomas -- Thomas G

Re: Config: DB or git?

2014-10-02 Thread Thomas Güttler
Am 02.10.2014 um 14:11 schrieb Tom Evans: On Thu, Oct 2, 2014 at 12:21 PM, Thomas Güttler wrote: Am 01.10.2014 um 14:56 schrieb Collin Anderson: If you're a programmer or sysadmin, configuration should be done in files. If you're not a programmer or sysadmin, it should be d

True Model Inheritance

2014-04-11 Thread Thomas Güttler
I know that there are several model inheritance extensions available: https://www.djangopackages.com/grids/g/model-inheritance/ But it is hard for me to decide which one to take. The most common solutions seem to be: django-model-utils django-polymorphic My use case is simple: This q

editable models (db schema) for admin (no developer)

2014-06-03 Thread Thomas Güttler
Hi, I am a software developer and like the way django ORM defines the database (via models.py) very much. Unfortunately for a new project, we have the constraint, that the admin must be able to add some columns. The admin is not a developer, and he only uses a web interface. I don't want to

Re: editable models (db schema) for admin (no developer)

2014-06-03 Thread Thomas Güttler
Am 03.06.2014 16:27, schrieb Erik Cederstrand: Den 03/06/2014 kl. 15.57 skrev Thomas Güttler : I am a software developer and like the way django ORM defines the database (via models.py) very much. Unfortunately for a new project, we have the constraint, that the admin must be able to add

Re: editable models (db schema) for admin (no developer)

2014-06-04 Thread Thomas Güttler
I found several solution here: http://stackoverflow.com/a/7934577/633961 Am 03.06.2014 15:57, schrieb Thomas Güttler: Hi, I am a software developer and like the way django ORM defines the database (via models.py) very much. Unfortunately for a new project, we have the constraint, that the

URLs: mymodel_id vs object_id vs pk ....

2014-06-04 Thread Thomas Güttler
What is the best practice for named URL parameter which refer to a primary key of a model? I have seen many ways: - object_id - mymodel_id - pk - id - . example: urlpatterns = [ url(r'^article/(?P\d+)/$', 'article.view'), ... ] Up to now we used "mymodel_id" but it gets

Re: URLs: mymodel_id vs object_id vs pk ....

2014-06-05 Thread Thomas Güttler
Thank you for answering my question. Unfortunately "slug" does not work in my context. My model does not have a "slug". It is like a ticket/issue system. There are several hundred of tickets each day. Thomas Güttler Am 04.06.2014 15:07, schrieb Thomas Güttler: What is t