Re: Overriding admin Media class

2010-03-25 Thread Sam Lai
On 25 March 2010 09:25, Scot Hacker wrote: > > > It sounds like you're saying that the model method is not > attaching to an instance like it usually does (which is why "self" > doesn't work). But I'm no closer to figuring out how why it's > different from model methods accessed from within views

Re: problems with get_or_create

2010-03-25 Thread Tom Evans
On Thu, Mar 25, 2010 at 5:52 AM, Kenneth Gonsalves wrote: > hi, > > I have a model like this: > > name - unique > slno - not null > mode - not null > > If the instance does not exist and I give all three values to get_or_create, > it works > > if the instance exists, and I give values for slno and

Re: Simple export of CSV

2010-03-25 Thread Tom Evans
On Wed, Mar 24, 2010 at 8:16 PM, Shawn Milochik wrote: > Have your 'export' button make an AJAX call to a view, which creates the CSV > file and prompts the user to 'Save As.' > > Details: > >        1. Use the same view you currently have, with an 'if' statement which > returns a standard (html

Re: problems with get_or_create

2010-03-25 Thread Daniel Roseman
On Mar 25, 9:32 am, Tom Evans wrote: > On Thu, Mar 25, 2010 at 5:52 AM, Kenneth Gonsalves wrote: > > hi, > > > I have a model like this: > > > name - unique > > slno - not null > > mode - not null > > > If the instance does not exist and I give all three values to get_or_create, > > it works > >

Re: problems with get_or_create

2010-03-25 Thread Tom Evans
On Thu, Mar 25, 2010 at 10:29 AM, Daniel Roseman wrote: > > Actually the kwarg is 'defaults', not 'initial'. > > See > http://docs.djangoproject.com/en/1.1/ref/models/querysets/#get-or-create-kwargs > -- > DR. > Indeed :/ coffee++ Cheers Tom -- You received this message because you are subs

Django with a tiny linux distribution

2010-03-25 Thread Pythoni
Has anybody tried using Django with a tiny linux distribution? Thanks for replies Mm. -- 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

Re: Django with a tiny linux distribution

2010-03-25 Thread Baurzhan Ismagulov
On Thu, Mar 25, 2010 at 05:11:28AM -0700, Pythoni wrote: > Has anybody tried using Django with a tiny linux distribution? It depends on how you define "tiny". I've just bootstrapped Debian, installed Django and apache2, and removed docs. The result is: Base system154 MB Django 52 MB

Django + Raw SQL: not returning a M2M key set of related values properly.

2010-03-25 Thread Sam Walters
http://pastebin.com/dFW6MdBm Hi I have a raw MySQL query which im using for performance reasons. It works great except under one condition. When i want to apply a filter based on a directories related table 'tags'. In SQL i use this: `directory_directorytag`.`name` = '%s' now typically i would w

Problem logging into admin site

2010-03-25 Thread Tim
Hi, I've just set up the admin site and when I try to log in, I get the following message: "Looks like your browser isn't configured to accept cookies. Please enable cookies, reload this page, and try again." Following extensive searching through this group, google, and just about every other re

Re: Django with a tiny linux distribution

2010-03-25 Thread Richard Shebora
look at turnkeylinux.com They have an ubuntu django base system ready to go. Thanks, Richard On Thu, Mar 25, 2010 at 8:11 AM, Pythoni wrote: > Has anybody tried using Django with a tiny linux distribution? > Thanks for replies > Mm. > > -- > You received this message because you are subscribed

block google indexer

2010-03-25 Thread vishnu.kumar
Hi, I need to block google indexer from indexing my site. If it was a static site, i would put a htaccess or robots.txt, but django is different right. I cant put robot meta tag also, cause there are many pages in my site. How do i do it then? Vishnu Kumar -- You received this message because

Re: block google indexer

2010-03-25 Thread Masklinn
On 25 Mar 2010, at 14:18 , vishnu.kumar wrote: > > Hi, > > I need to block google indexer from indexing my site. > > If it was a static site, i would put a htaccess or robots.txt, but > django is different right. > I cant put robot meta tag also, cause there are many pages in my site. > > How d

Re: Customized filter for Django Admin

2010-03-25 Thread derek
On Mar 24, 5:30 pm, adam wrote: > derek > > i want to do the same thing. > > first, the site below mentioned about > filtering.http://patrickbeeson.com/blog/2008/aug/11/how-create-user-specific-ad... > > in this time, you have to give country_id as a request parameter by > changing link url. > li

Re: Altering the auth_user model?

2010-03-25 Thread derek
On Mar 24, 11:21 pm, Thierry Chich wrote: > Le mercredi 24 mars 2010 16:53:12, Sandman a écrit : > > > Hi Derek, > > > One way to do this would be to create a proxy model that can be used > > throughout your project. > > > Check out > >http://docs.djangoproject.com/en/dev/topics/db/models/#proxy-m

Re: Simple export of CSV

2010-03-25 Thread Alex Robbins
Not sure if this will help, but the docs have a pretty in-depth explanation of doing csv export. http://docs.djangoproject.com/en/dev/howto/outputting-csv/ HTH, Alex On Mar 24, 3:03 pm, jlwlynn wrote: > I'm trying to simply export CSV, but have failed miserably.  First I > perform a search and

Re: Altering the auth_user model?

2010-03-25 Thread Bjunix
I would not recommend to mess with contrib.auth.models. If you want to make some fields of the User model required I would do this on form level. Just create a custom model form for User and override the fields in questions. On Mar 25, 2:43 pm, derek wrote: > On Mar 24, 11:21 pm, Thierry Chich w

Re: basic django auth fails on valid user

2010-03-25 Thread Jim N
Thanks Tim, Yes, I just saw this. I was subclassing auth.User because I didn't know the right way to do it. Now I am on the right track. Just one thing I can't figure out. "When a user profile model has been defined and specified in this manner, each User object will have a method -- get_profi

Re: basic django auth fails on valid user

2010-03-25 Thread Tom Evans
On Thu, Mar 25, 2010 at 2:48 PM, Jim N wrote: > Thanks Tim, > > Yes, I just saw this.  I was subclassing auth.User because I didn't > know the right way to do it. > > Now I am on the right track. > > Just one thing I can't figure out. > > "When a user profile model has been defined and specified i

How to locate the OS user name? [newbie]

2010-03-25 Thread BobAalsma
I work as a single person on a single machine. I use an unstable programme that requires me to employ more than one OS user. The programme will store some files locally (in each specific user environment). I am trying to build a Django application to centralise the information gathered by this uns

Re: How to locate the OS user name? [newbie]

2010-03-25 Thread Baurzhan Ismagulov
On Thu, Mar 25, 2010 at 08:27:37AM -0700, BobAalsma wrote: > I am trying to build a Django application to centralise the > information gathered by this unstable programme, but in some cases I > need to refer to the stored files. So I want to store the > "originating" OS user name in the database, a

Re: problems with get_or_create

2010-03-25 Thread Malcolm Tredinnick
On Thu, 2010-03-25 at 11:22 +0530, Kenneth Gonsalves wrote: > hi, > > I have a model like this: > > name - unique > slno - not null > mode - not null > > If the instance does not exist and I give all three values to get_or_create, > it works > > if the instance exists, and I give values for sl

Re: problems with get_or_create

2010-03-25 Thread Tom Evans
On Thu, Mar 25, 2010 at 3:47 PM, Malcolm Tredinnick wrote: > On Thu, 2010-03-25 at 11:22 +0530, Kenneth Gonsalves wrote: >> hi, >> >> I have a model like this: >> >> name - unique >> slno - not null >> mode - not null >> >> If the instance does not exist and I give all three values to get_or_creat

what's wrong with this if statement structure

2010-03-25 Thread Bobby Roberts
92 {%ifequal au.ReservePrice 0%} 93 None 94 {%else%} 95 {%if au.ReservePrice > au.currentbid %}Met{%else%}Not Met{%endif%} 96 {%endifequal%} -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: what's wrong with this if statement structure

2010-03-25 Thread Tom Evans
On Thu, Mar 25, 2010 at 4:09 PM, Bobby Roberts wrote: > 92     {%ifequal au.ReservePrice 0%} > 93           None > 94      {%else%} > 95           {%if au.ReservePrice > au.currentbid %}Met{%else%}Not > Met{%endif%} > 96      {%endifequal%} > Since you haven't said what goes wrong with it, I will

Re: Is it possible to change the width of the boxes displayed by the filter_horizontal in Django admin interface?

2010-03-25 Thread rc
Walt, Thanks for the response. This is making me crazy. Seems like this should be an easy thing to do. I have tried your suggestion, but I am not totally clear on where in the admin.py It is just not loading up the new media class. Am I supposed to add the resize class as a separate class like t

Re: problems with get_or_create

2010-03-25 Thread Malcolm Tredinnick
On Thu, 2010-03-25 at 15:58 +, Tom Evans wrote: [...] > > He is describing this situation: > > >>> User.objects.get(username='tevans...@googlemail.com') > > >>> User.objects.get_or_create(username='tevans...@googlemail.com') > (, False) > >>> User.objects.get(username='tevans...@googlemail.c

Multiple querysets for dictionary

2010-03-25 Thread grimmus
Hi, For my xml sitemap i would like to show blog posts and pages from the CMS. How can i pass 2 querysets to the dictionary ? What i have so far is below, it's obviously wrong :-( info_dict = { 'queryset': Page.objects.filter(active=1), 'queryset': Entry.objects.filter(status=1), 'da

Re: what's wrong with this if statement structure

2010-03-25 Thread Bobby Roberts
sorry - it is in the template an the traceback thrown is: 'if' statement improperly formatted On Mar 25, 12:11 pm, Tom Evans wrote: > On Thu, Mar 25, 2010 at 4:09 PM, Bobby Roberts wrote: > > 92     {%ifequal au.ReservePrice 0%} > > 93           None > > 94    {%else%} > > 95           {%if

Re: problems with get_or_create

2010-03-25 Thread Tom Evans
On Thu, Mar 25, 2010 at 4:23 PM, Malcolm Tredinnick wrote: > No, he's not, because Kenneth said that the instance exists. In your Actually, he described both situations where the instance exists, but with different values for the non-key attributes of the model, and where the instance doesn't exi

Re: what's wrong with this if statement structure

2010-03-25 Thread James Bennett
On Thu, Mar 25, 2010 at 11:28 AM, Bobby Roberts wrote: > it is in the template an the traceback thrown is: > > 'if' statement improperly formatted The documentation states: > New in Django Development version. > if tags may also use the operators ==, !=, <, >, <=, >= and in which work as > foll

Re: what's wrong with this if statement structure

2010-03-25 Thread Karen Tracey
On Thu, Mar 25, 2010 at 12:28 PM, Bobby Roberts wrote: > sorry - > > it is in the template an the traceback thrown is: > > 'if' statement improperly formatted > You are trying to use a feature added for 1.2 (smart if) with 1.1.X level code. Karen -- You received this message because you are s

Re: what's wrong with this if statement structure

2010-03-25 Thread Bobby Roberts
thanks for your quick reply... is there a quick way to do something like this in 1.1? On Mar 25, 12:40 pm, Karen Tracey wrote: > On Thu, Mar 25, 2010 at 12:28 PM, Bobby Roberts wrote: > > sorry - > > > it is in the template an the traceback thrown is: > > > 'if' statement improperly formatted

Re: what's wrong with this if statement structure

2010-03-25 Thread Tom Evans
On Thu, Mar 25, 2010 at 4:42 PM, Bobby Roberts wrote: > thanks for your quick reply... is there a quick way to do something > like this in 1.1? > Import the smart_if as a standalone, separate tag: http://www.djangosnippets.org/snippets/1350/ Cheers Tom -- You received this message because yo

Re: Problem logging into admin site

2010-03-25 Thread Genghisu
Have you set SESSION_COOKIE_DOMAIN in settings.py? Without that being set correctly, you'll run into the problem you've described above. In your case, SESSION_COOKIE_DOMAIN = 'dev.mydomain.com'. http://docs.djangoproject.com/en/dev/ref/settings/#session-cookie-domain On Mar 25, 7:47 am, Tim w

Re: How to locate the OS user name? [newbie]

2010-03-25 Thread Benjamin Reitzammer
Hi Bob, this not a Django specific question/problem but more a general Python question. The information you are looking for is most likely located in the os.environ object. So take a look at this in your python commandline/shell >>> import os >>> [i for i in os.environ.items()] and look for the

Re: Multiple querysets for dictionary

2010-03-25 Thread Daniel Roseman
On Mar 25, 4:27 pm, grimmus wrote: > Hi, > > For my xml sitemap i would like to show blog posts and pages from the > CMS. How can i pass 2 querysets to the dictionary ? > > What i have so far is below, it's obviously wrong :-( > > info_dict = { >     'queryset': Page.objects.filter(active=1), >  

Re: Problem logging into admin site

2010-03-25 Thread Tim
On Mar 25, 4:44 pm, Genghisu wrote: > Have you set SESSION_COOKIE_DOMAIN in settings.py?  Without that being > set correctly, you'll run into the problem you've described above.  In > your case, > > SESSION_COOKIE_DOMAIN = 'dev.mydomain.com'. > > http://docs.djangoproject.com/en/dev/ref/settings

Re: How to locate the OS user name? [newbie]

2010-03-25 Thread BobAalsma
I'd prefer not to as I keep switching between 15-20 users and find the log in of the OS quite enough, thank you. My beautiful but unstable programme makes it a good idea to periodically fully log out and log in, say twice a day... On Mar 25, 4:47 pm, Baurzhan Ismagulov wrote: > On Thu, Mar 25, 20

Re: what's wrong with this if statement structure

2010-03-25 Thread creecode
Hello Bobby, On Mar 25, 9:42 am, Bobby Roberts wrote: > is there a quick way to do something like this in 1.1? You could do the comparison at the view level and then set an attribute on your object with the result. Toodle-lo.. creecode -- You received this message because

Re: How to locate the OS user name? [newbie]

2010-03-25 Thread BobAalsma
Hi Benjamin, Thanks, I'll have look. Bob On Mar 25, 4:43 pm, Benjamin Reitzammer wrote: > Hi Bob, > this not a Django specific question/problem but more a general Python > question. > The information you are looking for is most likely located in the > os.environ object. > So take a look at  th

Re: How to locate the OS user name? [newbie]

2010-03-25 Thread BobAalsma
YES! Works beautifully, thanks. On the newbie part: how could I have found this? I did find the os.environ and you've helped me discover how to look inside, but what if I need something completely different? Regards, Bob On Mar 25, 4:43 pm, Benjamin Reitzammer wrote: > Hi Bob, > this not a Dja

Re: block google indexer

2010-03-25 Thread creecode
Hello Vishnu, You might find Django Robots < http://bitbucket.org/jezdez/django-robots/overview/ > of use. On Mar 25, 6:18 am, "vishnu.kumar" wrote: > I need to block google indexer from indexing my site. > > If it was a static site, i would put a htaccess or robots.txt, but > django is differ

Re: How to locate the OS user name? [newbie]

2010-03-25 Thread piz...@gmail.com
Check the module index in the python website: http://docs.python.org/ modindex.html There you will find everything about python modules like sys, os, and others. Regards, Oscar C. El 25/03/2010, a las 18:28, BobAalsma escribió: YES! Works beautifully, thanks. On the newbie part: how cou

Re: How to locate the OS user name? [newbie]

2010-03-25 Thread BobAalsma
OK, found it - thanks! Regards, Bob On Mar 25, 6:40 pm, "piz...@gmail.com" wrote: > Check the module index in the python website:http://docs.python.org/ > modindex.html > > There you will find everything about python modules like sys, os, and   > others. > > Regards, > Oscar C. > > El 25/03/2010

auto authenticate

2010-03-25 Thread CrabbyPete
I am connecting facebook to an app I have running. In order not to change a load of code I created a dummy account when someone logs in through facebook. My only problem is I want to authenticate with this account when they log Is there a way to login in a user using the encrypted password. I am u

Re: About extending User model

2010-03-25 Thread Jim N
On Mar 11, 1:03 pm, Tom Evans wrote: > On Thu, Mar 11, 2010 at 4:54 PM, russianbandit > wrote: > > I'm using UserProfile to add one field to my users. However, I know > > that I must explicitly create UserProfile for each new user that > > registers. So, I make a UserProfile upon registration. I

Re: Initial data in a many to many field

2010-03-25 Thread Nuno Maltez
>On Thu, Mar 25, 2010 at 2:00 AM, mjlissner wrote: > I'll make things more concrete. I have the following in my model > (which is made into a ModelForm): > class UserProfile(models.Model): >    barmembership = models.ManyToManyField(BarMembership, >        verbose_name="the bar memberships held by

Grouped statements in debug_toolbar

2010-03-25 Thread Peter Bengtsson
The old django debug-toolbar used to make it possible to group statements that were the same so you can see if a particular statement was called repeatedly. This does not appear to be possible in the latest version; or am I wrong? -- You received this message because you are subscribed to the Goo

Re: Initial data in a many to many field

2010-03-25 Thread mjlissner
I wasn't using ProfileForm(instance = userProfile) because I didn't realize I could. Wow, that makes things easier and neater. Thanks so much. On Mar 25, 11:57 am, Nuno Maltez wrote: > >On Thu, Mar 25, 2010 at 2:00 AM, mjlissner wrote: > > I'll make things more concrete. I have the following in

Nested for loop: {% cycle ... %}

2010-03-25 Thread mhulse
Hi! Example code: == {% for pretty_date, days_events in date_days_events_tuple %} ... ... {% for details in days_events %} ... ... {% endfor %} ... ... {% endfor %} == The output: == .. .. ... == What I really want: == .. .. ...

Re: auto authenticate

2010-03-25 Thread Peter Bengtsson
If what you want to achieve is to log in a user programmatically you don't do that by authenticating by username and password. Example: def login_by_id(request): user = FacebookUser.objects.get(...).user from django.contrib.auth import load_backend, login for ba

Re: Nested for loop: {% cycle ... %}

2010-03-25 Thread Peter Bengtsson
Is it possible to do {% cycle "odd" "even" as parent_cycle_thing %} ? If so there's your answer. On 25 Mar, 19:57, mhulse wrote: > Hi! > > Example code: > > == > > {% for pretty_date, days_events in date_days_events_tuple %} > ... > > ... > {% for details in days_events %} > ... > ... >

Re: About extending User model

2010-03-25 Thread Peter Bengtsson
Generally, try to build your application so that it doesn't blindly depend on the profile existing. The signal example Tom showed you is good as it means you won't have to check if the UserProfile instance exists for the user on every turn. However, don't depend on the data within. Keep it light an

Re: Nested for loop: {% cycle ... %}

2010-03-25 Thread Bill Freeman
On Thu, Mar 25, 2010 at 3:57 PM, mhulse wrote: > Hi! > > Example code: > > == > > {% for pretty_date, days_events in date_days_events_tuple %} > ... > > ... > {% for details in days_events %} > ... > ... > {% endfor %} > ... > > ... > {% endfor %} > > == > > The output: > > =

Re: Nested for loop: {% cycle ... %}

2010-03-25 Thread mhulse
Hi Peter and Bill! Thanks for the quick replies, I really appreciate it. :) @Peter: I tried this: == {% for foo, baz in tuple %} ... ... {% cycle "odd" "even" as foo %} {% for bar in baz %} ... ... {% endfor %} ... ... {% endfor %} == But the cycle "renders" the output and t

Re: Nested for loop: {% cycle ... %}

2010-03-25 Thread mhulse
> As I understand it, {{ foo }} renders the current value of the > variable and doesn't change it. > {% cycle foo %} or the creating {% cycle "odd" "even" as foo %} > advance the variable and > then render it.  So you still need one of the latter in your loop, or > the variable won't advance. Ahhh

Re: Nested for loop: {% cycle ... %}

2010-03-25 Thread Bill Freeman
As I understand it, {{ foo }} renders the current value of the variable and doesn't change it. {% cycle foo %} or the creating {% cycle "odd" "even" as foo %} advance the variable and then render it. So you still need one of the latter in your loop, or the variable won't advance. On Thu, Mar 25,

Re: About extending User model

2010-03-25 Thread Jim N
Hi Peter, I'm building an app where all logged-in users will be a Django user, rather than creating some new separate class of users just for my own app. But to make it work, these users have to have more than the minimal information contained in the django.contrib.auth.models User. I figure tha

Re: Multiple querysets for dictionary

2010-03-25 Thread pakalk
On 25 Mar, 17:27, grimmus wrote: > Hi, > > For my xml sitemap i would like to show blog posts and pages from the > CMS. How can i pass 2 querysets to the dictionary ? > > What i have so far is below, it's obviously wrong :-( > > info_dict = { >     'queryset': Page.objects.filter(active=1), >  

Passing context variables from template to view

2010-03-25 Thread Kasto
Hi, I am looking to implement an "Export to Excel sheet" feature. The result-set is already available and rendered in the template. I need to provide a link or button to export result to Excel sheet. Result-set is a set of list variables and cannot be passed over GET request due to length limitat

syncdb error for models pointing to each other

2010-03-25 Thread Dries Desmet
My models are: class Album(models.Model): slug = models.SlugField( unique=True, help_text=_("Suggested value automatically generated from title. Must be unique.") ) # using name of the model, rather than the model object itself, # because Photo is not yet d

Re: syncdb error for models pointing to each other

2010-03-25 Thread Ramiro Morales
On Thu, Mar 25, 2010 at 9:03 PM, Dries Desmet wrote: > My models are: > > > class Album(models.Model): >     slug = models.SlugField( >     unique=True, >     help_text=_("Suggested value automatically generated from title. > Must be unique.") >     ) >     # using name of the mod

Re: syncdb error for models pointing to each other

2010-03-25 Thread Dries Desmet
On 26 March 2010 01:11, Ramiro Morales wrote: > On Thu, Mar 25, 2010 at 9:03 PM, Dries Desmet wrote: > > My models are: > > > > > > class Album(models.Model): > > slug = models.SlugField( > > unique=True, > > help_text=_("Suggested value automatically generated from titl

Any way to have a ModelForm tied to 2 Models?

2010-03-25 Thread Continuation
I have 2 models: A, B I need a form that inserts/updates both fields of A and fields of B. Is there any way to create a ModelForm tied to A & B? Or do I need to use the plain old Form? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Project optimisation stage: Advice to boost speed of database queries across tables?

2010-03-25 Thread Sam Walters
I also read a good article. As it turns out im using a lot of inner joins: http://www.caktusgroup.com/blog/2009/09/ This was quite handy. My processis usually build it to be as fast as possible in raw SQL then go back in and try and makre it with the ORM. "I've read your description and it does

ForeignKeyField

2010-03-25 Thread Asim Yuksel
I have a question about model.ForeignKey field.Foreign key fields are shown as object in admin page. How can I show them in other types like integer type for example I have a Model like this: class Advisor(models.Model): advisorid = models.IntegerField(primary_key=True, db_column='advisorId')

Re: ForeignKeyField

2010-03-25 Thread Shawn Milochik
This should help: http://docs.djangoproject.com/en/1.1/ref/contrib/admin/#raw-id-fields Shawn -- 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, s

Using ModelForm to edit ManyToMany in both directions?

2010-03-25 Thread Wilberoni
I have a simple model that allows a volunteer to have many jobs and a job to have many volunteers: class Volunteer(models.Model): jobs = models.ManyToManyField( 'Job', blank=True ) The following ModelForm displays a Multi-select widget so I can choose all the jobs for a volunteer: class

Re: ForeignKeyField

2010-03-25 Thread Asim Yuksel
I cant show the foreignkey values in a list_display. I tried raw_id_fields but didnt work On 25 Mart, 23:18, Shawn Milochik wrote: > This should help: > > http://docs.djangoproject.com/en/1.1/ref/contrib/admin/#raw-id-fields > > Shawn -- You received this message because you are subscribed to t

Re: problems with get_or_create

2010-03-25 Thread Kenneth Gonsalves
On Thursday 25 Mar 2010 9:17:12 pm Malcolm Tredinnick wrote: > I don't understand what you are saying here. If the instance exists (as > in, the filter parameters passed to get would return a single item), > that instance is returned and the default parameters are never > considered. So the values

Re: How to locate the OS user name? [newbie]

2010-03-25 Thread BobAalsma
Hmm, on second thoughts... I tested from the shell in a few user environements and it worked. However, when applying this to Django, all users show the user name of the user running the server. Hindsight makes this logical, as the other users only use their browser, not their own local python.

Re: How to locate the OS user name? [newbie]

2010-03-25 Thread BobAalsma
Hmm, on second thoughts... I tested from the shell in a few user environements and it worked. However, when applying this to Django, all users show the user name of the user running the server. Hindsight makes this logical, as the other users only use their browser, not their own local python.

Re: How to locate the OS user name? [newbie]

2010-03-25 Thread BobAalsma
In addition: So maybe Baurzhan was right: using a database login (explicit or implicit) could be the easier solution to build. Regards, Bob On Mar 26, 7:32 am, BobAalsma wrote: > Hmm, on second thoughts... > > I tested from the shell in a few user environements and it worked. > > However, when a