Django ORM - Table Changes

2009-09-10 Thread Thomas
lowing when doing something like changing a column name. Sorry for the basic question. Google hasn't been much help when getting into these details. I can sort of 'figure it out' by running the SQL, matching the model class and going from there

Re: Django ORM - Table Changes

2009-09-10 Thread Thomas
code > 4) Ensure the application seems to be working > 5) Drop the old-named column > > Note: These instructions may not apply directly, depending on what > your property is - in the case of a many-to-many relationship, for > example, a join table is used. I'm sure you can figure

Custom ManyToMany intermediate table.

2009-05-21 Thread Thomas
hing product_id) and add all of them. Not so nice... Any better solution ? -- 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@g

Re: Django ORM - Table Changes

2009-09-16 Thread Thomas
e to an existing model, ./manage.py syncdb will > not make any changes to the database. This is where *Django Evolution* fits > in." > > 2009/9/10 Thomas > > > > > Thanks for the advice.  I just wanted to ensure I wasn't missing > > something overtly obviou

Embedding A List in urlpatterns

2009-09-17 Thread Thomas
;unhashable type: 'list'" ... I'm guessing that you can't put a list in place of the raw string that the patterns method expects. So, my question is... how do I get patterns to match all results for the list. I hope this makes some sense. I tried to be verbose as I

Re: Embedding A List in urlpatterns

2009-09-17 Thread Thomas
r the link... I have been going through the tutorial but well... I'm impatient!... didn't quite get there yet. Am going to read it in full now. On Sep 17, 11:29 am, Tiago Serafim wrote: > Hi Thomas, > > When you define the urls patterns, you don't have to specify each >

Re: Embedding A List in urlpatterns

2009-09-17 Thread Thomas
orks, in general are making my head spin. It is definitely starting to click though. I just need to keep reading the tutorial as I work. On Sep 17, 11:39 am, Daniel Roseman wrote: > On Sep 17, 4:10 pm, Thomas wrote: > > > > > Hello, > > > I'm learning Django and h

Django 1.1, cx_oracle 5.0.2, Oracle 9i, NCLOB Textfield

2009-09-30 Thread Thomas
18.html - I am aware of : http://docs.djangoproject.com/en/dev/ref/databases/ Textfield limitation. Any ideas ? -- Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

django + serving static CSS

2010-07-23 Thread Thomas
Hi I am trying to include a css file and I've tried this in settings.py: MEDIA_URL = "http://localhost:80"; MEDIA_ROOT = '/media/' I have an apache running there and navigating to http://localhost/media works fine. In my base template I have this: But it's not working as I hoped. So how can I

Re: django + serving static CSS

2010-07-23 Thread Thomas
server... and also an apache running on the same machine. If I put this in the base template it also works: http://localhost:80/media/css/base.css"; rel="stylesheet" / > But I would have to change that each time... On 23 Jul., 13:35, "Michael P. Soulier" wrot

Re: django + serving static CSS

2010-07-26 Thread Thomas
Thanks Alex that got it working! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For mo

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

2010-09-17 Thread Thomas
My first post on this list. I wish to try out a blogging app developed in Django, called Mango, and according to its instructions I just need to get Django installed. I'm looking for a little guidance with this. Also, I'd like to determine just what kind of mess I've created with my attempts at ins

Django Distinct on queryset in forms.py

2010-03-30 Thread Thomas
Hi all, I try to get a list with distinct into the forms.py like this: forms.ModelMultipleChoiceField(queryset=Events.objects.values('hostname'), required=False).distinct() In the python shell this command works perfect, but when trying it in forms.py leaves me a blank form, so nothing appears.

Re: Django Distinct on queryset in forms.py

2010-03-30 Thread Thomas
('hostname', 'hostname').distinct() On Mar 30, 10:32 am, Thomas wrote: > Hi all, > > I try to get a list with distinct into the forms.py like this: > > forms.ModelMultipleChoiceField(queryset=Events.objects.values('hostname'), > required=False).distinct

Re: Django Distinct on queryset in forms.py

2010-03-30 Thread Thomas
ost or the following should work aswell: choices=Test.objects.values_list('hostname', 'hostname').distinct() , required=False Regards On Mar 30, 5:47 pm, "pjrhar...@gmail.com" wrote: > On Mar 30, 2:10 pm, Thomas wrote: > > > I already found a solution

testing and request.META['REMOTE_ADDR']

2008-01-04 Thread Thomas
change all request.META['REMOTE_ADDR'] to request.META.get() Question: what is the best way to fix this? Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Re: testing and request.META['REMOTE_ADDR']

2008-01-05 Thread Thomas
P RFCs applies here. (I might be completely wrong ...) Otherwise, REMOTE_ADDR in request is set either directly from remote_ip/client_address or from HTTP_X_FORWARDED_FOR using specific middleware. Regards, Thomas Malcolm Tredinnick wrote: > On Fri, 2008-01-04 at 14:30 -0

Re: email in settings.py

2008-01-11 Thread Thomas
Hello Michael, you might need to know if your mail server requires a secure connection. This is what works for gmail: EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = '[EMAIL PROTECTED]' EMAIL_HOST_PASSWORD = '' EMAIL_PORT = 587 Go

user.get_absolute_url()

2008-01-28 Thread Thomas
What is the best way to override user.get_absolute_url with custom code (the django.contrib.auth.models.User method) ? Where should it be put? Thanks, Thomas --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: user.get_absolute_url()

2008-01-28 Thread Thomas
Artiom, James - many thanks, I thought I was familiar with docs, but yet again ... Many thanks! Thomas On Jan 28, 2:11 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Jan 28, 2008 6:49 AM, Artiom Diomin <[EMAIL PROTECTED]> wrote: > > > For example in M

Re: "unknown locale: UTF-8"

2008-01-30 Thread Thomas
Hi Omat, May be export LC_ALL=en_US.UTF-8 in terminal prior to syncdb would help. Regards, Thomas On Jan 30, 4:34 pm, omat <[EMAIL PROTECTED]> wrote: > Hi all, > > When I try to syncdb I am getting a "unknown locale: UTF-8" error. > > I am using a recent checko

Re: Django on MacOS X Leopard

2008-01-31 Thread Thomas
ing python and/or django versions. Not sure if this is the best way to do it. Regards, Thomas On Jan 31, 4:05 pm, omat <[EMAIL PROTECTED]> wrote: > When I install Django on Leopard, py files went into: > /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/

escaping of (double) quotes in html-attributes in widgets

2008-05-31 Thread thomas
s not work. what can i do against that? cheers and thanx, 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@googlegroups.com To unsubsc

Test client and GET parameters problem

2008-07-02 Thread Thomas
arameters, or the domain name. > Any clues? 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@googlegroups.com To unsubsc

Re: Test client and GET parameters problem

2008-07-03 Thread Thomas
Thanks, Alex - very cool - all works now! Thomas On Jul 3, 8:55 am, Alex Koshelev <[EMAIL PROTECTED]> wrote: > There is[1] special parameter named `data` that represents GET query > as dictionary. Or you can pass QUERY_STRING parameter with raw GET > string > > [1]http://

A.MrsLove.com, Multi-Million Dollar Homepage. Who are the Rich people /companies and at the Top?

2007-06-03 Thread Thomas
A.MrsLove.com, Multi-Million Dollar Homepage. Who are the Rich people / companies and at the Top? The bigger amount of promotion /payment will be arranged in topper position of Multi-Million Dollar Homepage. To reveal, kindly visit Multi-Million Dollar Homepage: http://A.MrsLove.com/ To How It Wor

Windows XP, Python 2.5, Django ,mod_python, Apache2.0,FastCGI, SCGI, flup, eunuchs

2007-09-24 Thread Thomas
ow who i install eunuchs. I download http://www.inoi.fi/open/trac/eunuchs/browser/trunk and copy it into the python direction Sorry for my bad English Wenn mir jemand auf Deutsch antworten kann wäre es besser kind regards Thomas --~--~-~--~~~---~--~~ You received t

Re: Automatically create a UserProfile object when a User is created

2007-12-08 Thread Thomas
Julien, have a look here: http://www.b-list.org/weblog/2007/nov/24/profiles/ Thomas On Dec 8, 12:20 pm, Julien <[EMAIL PROTECTED]> wrote: > Hi all, > > I feel like my question must have been asked before, but I couldn't > find any help on this group or through regula

Re: Recursive comments

2007-12-07 Thread Thomas
r the comment-on-the-comment form syntax would be: {% comment_form for comments.comment .id %} comments.comment key is looked up in the django_content_type table: [app_label][name] Thomas On Dec 8, 8:14 am, Thomas <[EMAIL PROTECTED]> wrote: > Hi list, > > any pointers on how to imp

Recursive comments

2007-12-07 Thread Thomas
Hi list, any pointers on how to implement the recursive comments functionality slashdot/reddit-style (comments on the comments)? I think I can't use django.contrib.comments straight but need a wrapper application in my project directory ... Thanks, T

Re: Automatically create a UserProfile object when a User is created

2007-12-08 Thread Thomas
AssertionError ): > profile = Profile( user = instance ) > profile.save() > > dispatcher.connect(create_profile_for_user, signal=signals.post_save, > sender=User) > > On 8 дек, 15:41, Julien <[EMAIL PROTECTED]> wrote: > > > Thanks for the link T

Re: ImageField and save method

2007-12-10 Thread Thomas
I saw something similar with overridden save(). How/where do you call it? Thomas On Dec 10, 1:46 pm, Julien <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm struggling to understand why, when I upload an image field (either > from the admin interface or from a cust

Re: ImageField and save method

2007-12-10 Thread Thomas
I think this provides more (partially) detail: http://gulopine.gamemusic.org/2007/11/customizing-filenames-without-patching.html Thomas On Dec 10, 2:01 pm, Julien <[EMAIL PROTECTED]> wrote: > I don't explicitly call it myself. > In fact, the _save_FIELD_file method (not sav

Re: Django CSS

2008-01-02 Thread Thomas
Ronaldo, have a look here: http://www.djangoproject.com/documentation/static_files/ Thomas On Jan 2, 3:23 pm, "Ronaldo Z. Afonso" <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm having some problems with Django and CSS. It seems that my templates > just don&#x

Global Variables

2006-08-21 Thread Thomas
Hi all, I have been scouring the docs but with no joy, or perhaps just my own stupidity. I am fairly new to Django / Python as a whole. I am developing a site where I need to set or pass a global variable between pages. Currently I am simply requesting it each time in my views.py file...but I am

Re: Global Variables

2006-08-22 Thread Thomas
Thanks to all of you...I have sorted the problem out...I took a look at what all of you had to say and worked through the docs again, so a big hell yeah to you all! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Running tests fails in the test runner call_command

2021-12-22 Thread Thomas
fwiw there is a call to the wrapping method django.test.DiscoverRunner.run_checks() in the celery python package. And I've got django_celery_beat in my list of apps which might be bringing it in??? On Tuesday, December 21, 2021 at 4:01:10 PM UTC-8 Thomas wrote: > I’ve got

Re: How to handle callback urls

2011-12-23 Thread Thomas
Hi, Am 23.12.2011 um 19:40 schrieb lankesh87: > Thanks.. > But now I have a new error: > --

Re: Django with PostgreSQL on Debian.

2011-01-06 Thread Thomas
for me it is working too settings.py: "ENGINE": "django.db.backends.postgresql_psycopg2", # aptitude search python-psycopg2 i python-psycopg2 - Python module for PostgreSQL good luck, TR Am 06.01.2011 um 17:36 schrieb Tonton: > on my ubuntu > in the set

excellent slides

2011-01-06 Thread Thomas
Just to share it with other newbies ... Today I have found these excellent slides (accompanied with explanations :) ), which could be helpful to bring some light to the darkness. quick example: http://toys.jacobian.org/presentations/2007/oscon/tutorial/images/django-master-class.032.png http:/

Re: Configure LAMPP with Django

2011-01-10 Thread Thomas
Am 10.01.2011 um 16:56 schrieb evstevemd: > I have LAMPP on Ubuntu and I use it fine with PHP. Now I have to add > Django so that I can do PHP and Django projects together. I will have > more than one Django project. I have read of mod_wsgi but I cannot > understand. what exactly is the problem?

Re: 404 view -> redirect to index

2011-01-18 Thread Thomas
why just not copy the 'templates/index.html' template to 'templates/404.html' - ready *not*sure*about*the*correctness*of*this* Am 18.01.2011 um 13:42 schrieb Ivo Brodien: > I guess that django catches the 404 Error Code somehow somewhere else than in > the handler? Maybe you have to set the

Re: 404 view -> redirect to index

2011-01-18 Thread Thomas
The book "The definitive Guide to Django" says on page 476: ---8<--- ... if you want to override the 404 view, you can specify 'handler404' in your URLconf, like so: from django.conf.urls.defaults import * urlpatterns = patterns ('', ... ) handler404 = 'mysite.views.my_custom_404_view' B

Re: template tag arithmetic

2011-01-18 Thread Thomas
Am 18.01.2011 um 14:53 schrieb GD: > > Hi everyone, > Is there a way to do simple loop counter manipulation within the > template? I.e something along the lines of: > > {% for x in a %} > loop number = {{forloop.counter +1}} > {% endfor %} > > with the intention of > > 2 > 3 > 4 > ..

Re: Readonly on subset of forms in Admin inlines

2011-01-20 Thread Thomas
Am 20.01.2011 um 03:27 schrieb Peter Phillips: > Hello, > > Is there a straightforward way to set fields to read only for a subset > of the forms in an inline formset in the Admin? I'd like to set some > fields to read only on my inline form for rows that were not created > by the user. However,

Re: user full name in template

2011-02-04 Thread Thomas
which django version do you use? the current 'head' version shows in django/contrib/auth/models.py: ---8<--- 200 class User(models.Model): 201 """ 202 Users within the Django authentication system are represented by this model. 203 204 Username and password are required. Other fie

Re: GET and POST in forms. Please help me understand the logic!

2013-11-27 Thread Thomas
I understand the confusion. Part of it is probably that GET and POST, is not part of Django per se, but part of the HTTP standard. Also confusing is that Django, especially in that code you pasted below, a lot is abstracted away. Sorry for the lack of detail, typing from iMe, just wanted to k

Re: Displaying HTML forms through AJAX

2013-12-26 Thread Thomas
My initial recommendation would be to read up on the Forms section of the Django manual. A lot of the logic you've written here is abstracted away in Django's built-in methods. Also, I'd replace that messy HTML in views.py with a call to a separate partial. In fact, that partial would prob

Postgres-XC

2014-02-10 Thread Thomas
Does anyone know if there has been any consideration for getting a tutorial together to integrate Django with Postgres-XC? Just curious :). -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Django urls.py reload (not from database)

2016-06-23 Thread Thomas
import sys from django.conf import settings def reload_urlconf(urlconf=None): if urlconf is None: urlconf = settings.ROOT_URLCONF if urlconf in sys.modules: reload(sys.modules[urlconf]) I also tried the method 'django.core.urlresolvers.set_urlconf' but doesn't works.

Re: Python on Windows re-using old .pyc files?

2008-10-21 Thread Thomas Guettler
. But the other are still alive and have the old code loaded. Maybe you could try mod_wsgi. It is much more flexible. See "Time to deprecate mod_python": http://groups.google.com/group/modwsgi/browse_thread/thread/95c5de2b996e2f49/fe4f823a391ad954 HTH, Thomas Güttler -- Thoma

Re: www.djangosnippets.org is down now?

2008-10-22 Thread Thomas Guettler
Gmail schrieb: > i found lots of snippets to download,but the server always says it is > down. > Hi, two days ago some snippets produced errors. But at least my snippets are working again. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas

Implementing a search function for a django-powered site

2008-10-23 Thread Giles Thomas
other search app out there? Or should I just roll my own (which I guess won't be too difficult)? Thanks in advance for any help. Regards, Giles -- Giles Thomas MD & CTO, Resolver Systems Ltd. [EMAIL PROTECTED] +44 (0) 20 7253 6372 Try out Resolver One! <http://www.resolversystem

Django along with PHP - avoiding Apache crashes

2008-10-27 Thread Giles Thomas
Giles [1] http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#if-you-get-a-segmentation-fault http://modpython.org/FAQ/faqw.py?req=show&file=faq02.013.htp -- Giles Thomas MD & CTO, Resolver Systems Ltd. [EMAIL PROTECTED] +44 (0) 20 7253 6372 Try out Resolver One! <http://www.resolve

Re: Django along with PHP - avoiding Apache crashes

2008-10-27 Thread Giles Thomas
ging at it and if I discover anything interesting I'll post it to the list. Regards, Giles -- Giles Thomas MD & CTO, Resolver Systems Ltd. [EMAIL PROTECTED] +44 (0) 20 7253 6372 Try out Resolver One! <http://www.resolversystems.com/get-it/> 17a Clerkenwell Road, London EC1

Re: Django along with PHP - avoiding Apache crashes

2008-10-27 Thread Giles Thomas
;bit ugly", it is quite > elegant option. In daemon mode, it will probably provide a better > memory utilization as compared to mod_php + mod_python apache > processes. I have not faced such problem so cant give an exact > solution but you should definitely try mod_wsgi. > > >

Re: Django along with PHP - avoiding Apache crashes

2008-10-28 Thread Giles Thomas
0613/pdo_mysql.so: libmysqlclient.so.15 => /usr/lib/libmysqlclient.so.15 (0x2ba328e47000) # --- Cheers, Giles [1] http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#if-you-get-a-segmentation-fault [2] http://modpython.org/FAQ/faqw.py?re

Re: 500 displayed instead of 404

2008-10-28 Thread Thomas Guettler
Hi, I guess that you get 500 because there is an unhandled exception. Can you see a traceback in your error log? What happens if you write "return django.http.HttpResponse('OK')" instead of raise Http404? Thomas janedenone schrieb: > Hi, > > I use the follow

Re: Django full text search best solution

2008-10-28 Thread Thomas Guettler
transaction, I choose the full text index of postgres. I wrote an own to_tsvector method in python, instead of customizing the to_tsvector method of postgres. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~--

Re: looping to create an array of category breadcrumbs

2008-10-29 Thread Thomas Guettler
umb_list.append, but returns read-only error on 'list' > > any help would be apprec-ated. > > thank you > -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~~---~--~~ You received this

Re: Django full text search best solution

2008-10-29 Thread Thomas Guettler
cursor.execute(u'''UPDATE myapp_mymodel SET content=%s::tsvector where id=%s''', [tsvector, self.id]) The column "content" of type tsvector is created by a SQL snippet named mymodel.sql. HTH, Thomas -- Thomas Guettler, http:

Re: 500 displayed instead of 404

2008-10-29 Thread Thomas Guettler
> Thanks to all who answered, now I'll go looking for the person who > messed with the development machine. > Everybody can make mistakes. The root of the problem is (or was) that you don't see tracebacks if settings.DEBUG=False. I see them in the apache error log. I use

generic query builder

2008-10-29 Thread Thomas Guettler
, too. Not an easy task. Has some tried this already? 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: Django along with PHP - avoiding Apache crashes

2008-10-29 Thread Giles Thomas
Graham, Thanks once again. > There is still the risk of conflicts as Python module is using a > reentrant version of library and PHP isn't. > OK, that makes sense. I guess we need to recompile PHP5, then. Regards, Giles -- Giles Thomas MD & CTO, Resolver Systems Ltd

Re: Trying to avoid duplicate form posts/database inserts

2008-10-30 Thread Thomas Guettler
alue. If I don't find > it, I insert the row along with the checksum. If I find it, I just > reject the insert and send the appropriate message to the response. This might be possible, but I would handle this outside the save method. Thomas -- Thomas Guettler, http://www.thomas-g

Re: Migrating strings from MySQL latin1 to Postgres UTF-8

2008-10-30 Thread Thomas Guettler
return string for enc in encoding_guess_list: try: return string.decode(enc, errors) except UnicodeError, exc: continue raise UnicodeError('Failed to convert %r' % string) HTH, Thomas -- Thomas G

Re: How to pass a special character in url

2008-10-30 Thread Thomas Guettler
Hi, you can use django.http.urlencode() to create the part behind the question mark. If you want to pass a list in a value you need urlencode(..., True). HTH, Thomas Zeal schrieb: > Hi, All, > > I just want to pass a special character by using url to the proper > view.

Re: Help to Upload image

2008-10-30 Thread Giles Thomas
o.views.generic.simple.direct_to_template', { 'template' : 'upload_thanks.html' }, name="upload_thanks" ), ) --- Hope this helps. Cheers, Giles -- Giles Thomas MD & CTO, Resolver Systems Ltd. [EMAIL PROTECTED] +44 (0

Re: 302 status code in django test client

2008-10-30 Thread Thomas Guettler
ea on how I can test the > content of this page? > > 302 is redirect. There is no content. You hit this line: > return HttpResponseRedirect('/resultsdb/newresults') > -- Thomas Guettler, http://www.thomas-guettler.de/

Re: align a ModelForm

2008-11-03 Thread Thomas Guettler
m/en/dev/ref/contrib/admin/ http://groups.google.com/group/django-users/browse_thread/thread/536e86280059a1f9 HTH, Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~~---~--~~ You received this message

Re: strptime() working in python, but not within django?

2008-11-04 Thread Thomas Guettler
Hi, Maybe some LANG entries in os.environ are different. Or the datetime module is loaded from a different location. is datetime.__file__ equal? HTH, Thomas mpobrien schrieb: > I'm working on something that involves parsing out a date from a > string, so i'm using the d

Re: Newb help request about fields and and subfields

2008-11-05 Thread Thomas Guettler
ot easy. What kind of data do you have? Why do you want it to split? Maybe you just need to write a own Widget which sublcasses from MultiWidget and override the render method? HTH Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail:

cleaned_data of invalid forms

2008-11-05 Thread Thomas Guettler
forms/form.py ... def full_clean(). I could copy this method an write a utility function which only works for one field. But that is not a good solution. Do other people need this too? If yes, I could write a proposal with patch. HTH, Thomas -- Thomas Guettler, http://www.thomas-guettler.de

Re: Newb help request about fields and and subfields

2008-11-05 Thread Thomas Guettler
input fields. Maybe it helps you: http://www.djangosnippets.org/snippets/1060/ Thomas mondonauta schrieb: > thanks for the answer... anyway, my problem is that i already > have a database so i don't really want to change it. > in this case in particular i have a table called &#

Re: apache authentication using Django on windows

2008-11-05 Thread Thomas Guettler
Hi, Have you tried to create an empty file and use the filename as AuthUserFile? Thomas Matt schrieb: > Hi, > > I have Django running on Apache 2.2 on windows. I am attempting to > use django authentification to secure an apache folder using this > configuration: > > &

Re: model inheritance - getting data from child objects

2008-11-06 Thread Thomas Guettler
I have never used model inheritance, but I read the documentation If all worker classes (cook, waiter, ...) are subclassed from Worker, something like this should work: Worker.objects.filter(workplace=...) (Given that workers only work for one workplace) HTH, Thomas Alistair Marshall

Re: App initialized twice? plus, debugging tips.

2008-11-06 Thread Thomas Guettler
d this peace of code you can use the traceback module and print the stacktrace. Be sure that you access the module only in one way: e.g. always "myapp.modules". Not sometimes "myproj.myapp.modules". HTH Thomas -- Thomas Guettler, http:

sorting a list of model instances

2008-11-07 Thread Thomas Guettler
t set(view_groups)!=set(change_groups), (view_groups, change_groups) Is there a reason why this is this way? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~~---~--~~ You received this message becaus

Re: sorting a list of model instances

2008-11-07 Thread Thomas Guettler
Hi, > Although I would have to wonder why you're doing it this way, rather > than using the database to sort them? Since in my case it is easier. I need to filter out some item before. This calculation needs to be in python code. Thomas -- Thomas Guettler, http://www.thomas-gue

Re: Change date format in admin

2008-11-11 Thread Thomas Guettler
if you use date objects (datetime.date.today()) in a template. You need to use the "date" or "time" filter. I think this is redundant. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~~---~--~

Re: How to deal with NTLM authentication

2008-11-16 Thread Thomas Kerpe
so the user is allowed access transparently. How do I > go about doing this? I haven't been able to find anything definitive > online, help would be greatly Have you looked at: http://ntlmaps.sourceforge.net/ HTH, Thomas --~--~-~--~~~---~--~~ You rece

Re: I18N not working

2008-11-25 Thread Thomas Guettler
have the LocaleMiddleware installed. Maybe this setting is different on your server? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~~---~--~~ You received this message because you are subscr

Re: I18N not working

2008-11-25 Thread Thomas Guettler
oject message files will be processed. }}} I don't know if it is really need. But the documentation says so. Or I read it to quickly and overlooked something. Thomas Jarek Zgoda schrieb: > I know the per-app translations work without this. Mine works equally > with LANGUAGE_CODE and

debug view and list of GET or POST parameters

2008-11-25 Thread Thomas Guettler
Hi, If GET or POST contain a list, I only see the last value in the debug view. What do you see on an uncaught excepion with e.g. "?foo=1&foo=2" as query string? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas

Re: debug view and list of GET or POST parameters

2008-11-25 Thread Thomas Guettler
Russell Keith-Magee schrieb: > On Tue, Nov 25, 2008 at 7:21 PM, Thomas Guettler <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> If GET or POST contain a list, I only see the last value in the debug view. >> >> What do you see on an uncaught excepion w

Re: Injecting stuff to an existing list?

2008-11-25 Thread Thomas Kerpe
I think David meant a method in the model not a field so nothing is stored. //Thomas 2008/11/25 Steve Holden <[EMAIL PROTECTED]> > > David Zhou wrote: > > On Tue, Nov 25, 2008 at 3:55 AM, sajal <[EMAIL PROTECTED]> wrote: > [...] > > > > Personally, if t

order by ... nulls [first|last]

2008-11-26 Thread Thomas Guettler
Hi, I am missing order by nulls [first|last] Either I am blind, or it is not possible. Do other miss this, too? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~~---~--~~ You received this

Re: Pagination of non-Django database

2008-11-26 Thread Thomas Kerpe
I would recommend to use the first approach if possible. This is only my opinion and is of course not in any way official. //Thomas [1] http://www.djangosnippets.org/snippets/1208/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Re: order by ... nulls [first|last]

2008-11-26 Thread Thomas Guettler
Jarek Zgoda schrieb: > Wiadomość napisana w dniu 2008-11-26, o godz. 10:20, przez Thomas > Guettler: > > >> I am missing order by nulls [first|last] >> >> Either I am blind, or it is not possible. >> > > > I think this is database-dependent

Re: can't pass a parameter to my named url using {% url %} tag in template

2008-11-27 Thread Thomas Kerpe
Why don't write {% url delete-quote-page object.id %} ? HTH //Thomas On Nov 27, 2:19 pm, dash86no <[EMAIL PROTECTED]> wrote: > I'm trying to use a URL tag as following: > > delete > > my named url is here: > > url(r'^quote/delete/(?P\d+)/$', >

Re: admin interface

2008-11-29 Thread Thomas Kerpe
Don't forget to add a __unicode__ method to your models. //Thomas 2008/11/29 mobil <[EMAIL PROTECTED]> > > How to make the admin interface display a list of table columns > instead of just a Users object > > Select users to change > >* Add users > &g

Re: Using % with psycopg2

2008-12-02 Thread Thomas Guettler
t; > from django.db import connection > cursor=connection.cursor() > cursor.execute("select '%';") > print cursor.fetchall() > > Hi, I have seen this. See http://markmail.org/message/463cildcn777eltr See http://code.djangoproject.com/ticket/9055 I just s

Re: Many-to-Many to exists table

2008-12-02 Thread Thomas Guettler
If I understood you problem: {{{ from django.contrib.auth.models import Group class Area(models.Model): groups=models.ManyToManyField(Group) }}} This creates a Many-To-May relation to Group. Copied from brain to keyboard (untested) HTH, Thomas nucles schrieb: > Hello Django-Peo

Query API: get all users without a group

2008-12-02 Thread Thomas Guettler
"auth_user"."is_active", "auth_user"."is_superuser", "auth_user"."last_login", "auth_user"."date_joined" FROM "auth_user" WHERE NOT ("auth_user"."id" IN (SELECT U1."user_id&quo

Re: How can I use more than 24 hours in TimeField?

2008-12-02 Thread Thomas Guettler
jango ORM, it will > report 'ValueError hour must be in 0..23'. > > I'm porting a old program that record rum times of the machines to > Django, so 24 hours is not enough for my new program. > > How can I resolve it ? > > -- Thomas Guettler, http://ww

Re: Query API: get all users without a group

2008-12-03 Thread Thomas Guettler
Filip Wasilewski schrieb: > On 2 Gru, 16:45, Thomas Guettler <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> I want to get all objects where the corresponding many-to-many field is >> empty. >> >> Example: get all users without a group >> &

Re: How to create and send a pdf attachment

2008-12-03 Thread Thomas Guettler
omitted (useful for multipart/alternative messages) and the mimetype is guessed, if not provided. If the first parameter is a MIMEBase subclass it is inserted directly into the resulting message attachments. """ -- Thomas Guettler, http:/

Session based messages without touching DB

2008-12-05 Thread Thomas Guettler
ts.org/snippets/1064/ The (flash) message is stored in a cookie. But I think the snippet is not thread safe. Has anyone a working example? Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --~--~-~--~~~---~--~---

Re: how to do redirects with django?

2008-12-09 Thread Thomas Guettler
Hi, def foo(request): return django.http.HttpResponseRedirect(newlocation) newlocation can be an URL. I create them with django.core.urlresolvers.reverse(). Thomas nbv4 schrieb: > If the user goes to /foobar, I want it to redirect him to /foobar-page- > XX, XX being th

cursor already closed

2008-12-10 Thread Thomas Guettler
_belegartrequiredgroup"."id", "foo_belegartrequiredgroup"."belegart_id", "foo_belegartrequiredgroup"."permission_id", "foo_belegartrequiredgroup"."group_id" FROM "foo_belegartrequiredgroup" WHERE ("foo_belegar

  1   2   3   4   5   6   7   8   9   10   >