Re: "online/offline status" on user profile

2007-09-17 Thread Jarek Zgoda
johnny napisał(a): > What I want to do is display "online/offline status" on user profile? > > anybody have an idea how to get information about user is logged > in(active session) or not? If you have auth combo enabled (middleware + context processor for templates), you can examine output of r

compensation for dictfetchone

2007-09-17 Thread Michal Konvalinka
Hi, I have upgraded my django from 0.96 to trunk and found out that Adrian had removed dictfetchone() with reason that "it wasn't being used anywhere". That's not true, I was using it :-) http://code.djangoproject.com/changeset/5968 Is there any similar function to this one? I found this functio

Re: sending email with cc

2007-09-17 Thread Malcolm Tredinnick
On Sun, 2007-09-16 at 23:32 -0700, medhat wrote: > Hi, > > I am trying to send an email from one of my views. I found > http://www.djangoproject.com/documentation/email/ but I need to > include people in the cc list of the message, and that page does not > mention anything about cc! > I tried the

Django + Twitter?

2007-09-17 Thread bjornkri
Hey all, One thing I can't really get my head around is how to sync a django model with another service like, say Flickr. I thought I'd try something simple first though, namely twitter. My initial guess would be to create a model for twitter entries, and then run a cron job that checks twitter

Re: compensation for dictfetchone

2007-09-17 Thread Malcolm Tredinnick
On Mon, 2007-09-17 at 10:14 +0200, Michal Konvalinka wrote: > Hi, > I have upgraded my django from 0.96 to trunk and found out that Adrian > had removed dictfetchone() with reason that "it wasn't being used > anywhere". That's not true, I was using it :-) > > http://code.djangoproject.com/changes

Re: Django + Twitter?

2007-09-17 Thread Malcolm Tredinnick
On Mon, 2007-09-17 at 09:41 +, bjornkri wrote: [...] > My initial guess would be to create a model for twitter entries, and > then run a cron job that checks twitter every now and then, adding > entries into the django database when they are found. Seems reasonable. > In theory, I understand

Macports Django install - which way?

2007-09-17 Thread Dave E
After reading about other OS X user's Django install problems, I'm attempting to write up the simplest, clearest possible, completely unambiguous, instructions for other OS X users here: http:ecoconsulting.co.uk/python/django-install.txt but obviously I need to get it right first, and... ...I've

Re: Macports Django install - which way?

2007-09-17 Thread Kenneth Gonsalves
On 17-Sep-07, at 4:12 PM, Dave E wrote: > After reading about other OS X user's Django install problems, I'm > attempting to write up the simplest, clearest possible, completely > unambiguous, instructions for other OS X users here: > http:ecoconsulting.co.uk/python/django-install.txt > but obvi

Re: Django + Twitter?

2007-09-17 Thread bjornkri
Thanks for your reply. Indeed, there is a nice Twitter API and I've already managed to connect to twitter and get some meaningful output. Twitter does indeed have an ID for each entry, so that part should be trivial. So I suppose I'll do something like this: get latest entry id from database for

Re: Macports Django install - which way?

2007-09-17 Thread Russell Keith-Magee
On 9/17/07, Dave E <[EMAIL PROTECTED]> wrote: > > After reading about other OS X user's Django install problems, I'm > attempting to write up the simplest, clearest possible, completely > unambiguous, instructions for other OS X users here: > http:ecoconsulting.co.uk/python/django-install.txt > bu

manage.py dumpdata && loaddata -- problem with datetime fields

2007-09-17 Thread Tomasz Melcer
Hello, I am trying to prepare a fixture with testing data. I can export data from database using: ./manage.py dumpdata >initial_data.json but when importing the data using: ./manage.py syncdb I get: Loading 'initial_data' fixtures... Installing json fixture 'initial_data' from absolute path.

Re: manage.py dumpdata && loaddata -- problem with datetime fields

2007-09-17 Thread Russell Keith-Magee
On 9/17/07, Tomasz Melcer <[EMAIL PROTECTED]> wrote: > > Hello, > > I am trying to prepare a fixture with testing data. I can export data > from database using: > > ./manage.py dumpdata >initial_data.json > > but when importing the data using: > > ./manage.py syncdb > > I get: > > Loading 'initial

Stale session timings

2007-09-17 Thread [EMAIL PROTECTED]
I have a Django FastCGI setup with 5 processes, backed by Postgres, and I am seeing a problem with stale session data between the processes. This is using the latest SVN checkout (r6369 at the moment), though I've been seeing this for a while now. What happens is that I will set a session value i

how to put a cookie which is visible from all domains

2007-09-17 Thread shabda
If I have my site setup at example.tld and I have used the built in django authentication system, any page at foo.example.tld (or any subdomain of example.tld) is not able to access the user. So if the view is accesed from a subdomain the login_required or other decorators fail. It looks to me th

Re: Today's newform-admin branch, svn version 6364

2007-09-17 Thread AndyB
Yep. Spotted your second point. All my admin change pages are broken. Going to revert unless anyone knows a quick fix. On Sep 16, 8:56 pm, Rob J Goedman <[EMAIL PROTECTED]> wrote: > Hi, > > Today's version shows 2 problems, the first problem is related to > date/time formats in fixtures, the 2nd

ModelChoiceField default value

2007-09-17 Thread Rufman
how can i make one of the options in a select the default. (i previously changed the select widget so that it only shows a selection of options). my code: ModifyComment.base_fields['fk_bullet'] = forms.ModelChoiceField(queryset=Bullet.objects.filter(fk_day=day_id)) i what one of the options in t

Re: How to automatically apply a method to all fields in newforms subclass?

2007-09-17 Thread Nimrod A. Abing
Just revisiting this thread... On 9/14/07, Doug B <[EMAIL PROTECTED]> wrote: > > I think you can make a custom form field to do your validation check > for you. > > def StrippedField(forms.CharField): > def clean(self,value): > #do your validation here While the solution above would

Re: manage.py dumpdata && loaddata -- problem with datetime fields

2007-09-17 Thread Tomasz Melcer
On 17 Wrz, 15:16, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > We have a fairly extensive unit test suite around serialization > formats; as a result, I'm not aware of any problems of this sort. > > Can you provide a minimal example that reproduces this problem? i.e., > can you provide an ex

Re: manage.py dumpdata && loaddata -- problem with datetime fields

2007-09-17 Thread Rob J Goedman
This is the same problem as I found earlier and below steps will reproduce it and with an empty project (no log_entries etc, just 1 superuser) it is fixed by removing the subseconds. Regards, Rob On Sep 16, 8:56 pm, Rob J Goedman <[EMAIL PROTECTED]> wrote: > Hi, > > Today's version shows 2 pro

Re: Today's newform-admin branch, svn version 6364

2007-09-17 Thread Rob J Goedman
Reverting to 6329 will fix it. Must have gotten introduced during the merge to 6332. Regards, Rob On Sep 17, 2007, at 6:18 AM, AndyB wrote: > On Sep 16, 8:56 pm, Rob J Goedman <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Today's version shows 2 problems, the first problem is related to >> date/time

parent child question

2007-09-17 Thread Rob Slotboom
class Category(models.Model): name = models.CharField(maxlength=70) parent = models.ForeignKey('self', blank=True, null=True, limit_choices_to = {'parent__isnull': True}) I dont want to be able to select a parent which is actualy the category currently edited. I tried a custom validator bu

Re: manage.py dumpdata && loaddata -- problem with datetime fields

2007-09-17 Thread Tomasz Melcer
On 17 Wrz, 16:45, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 9/17/07, Tomasz Melcer <[EMAIL PROTECTED]> wrote: > Perhaps I wasn't clear - I need the actual _data_ - that is, your > model, and a fixture file that can't load. I know how to load a > fixture - what I don't know is what fixt

Re: manage.py dumpdata && loaddata -- problem with datetime fields

2007-09-17 Thread Russell Keith-Magee
On 9/17/07, Tomasz Melcer <[EMAIL PROTECTED]> wrote: > > On 17 Wrz, 15:16, "Russell Keith-Magee" <[EMAIL PROTECTED]> > wrote: > > We have a fairly extensive unit test suite around serialization > > formats; as a result, I'm not aware of any problems of this sort. > > > > Can you provide a minimal

Re: manage.py dumpdata && loaddata -- problem with datetime fields

2007-09-17 Thread Tomasz Melcer
On 17 Wrz, 16:45, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > Perhaps I wasn't clear - I need the actual _data_ - that is, your > model, and a fixture file that can't load. I know how to load a > fixture - what I don't know is what fixture contents will make a > fixture fail in the way you

Re: manage.py dumpdata && loaddata -- problem with datetime fields

2007-09-17 Thread Russell Keith-Magee
On 9/17/07, Rob J Goedman <[EMAIL PROTECTED]> wrote: > > This is the same problem as I found earlier and below steps will > reproduce it and with an empty project (no log_entries etc, just 1 > superuser) it is fixed by removing the subseconds. Ok - thanks for that. I can reproduce this problem wi

How to run server after install Django

2007-09-17 Thread Hannus
Hi,every django wizards, Plz allow me to ask a so stupid question. After I install the Django according to the documents,and built the directory by using "django- admin.py startproject MYWEB" . There is something wrong with the command" manage.py runserver". After input this command,the screen sho

Re: Using a filter with many to many relationship

2007-09-17 Thread merric
I only want records that have both the terms, "ThemePark" AND "London" The attribute of Terms that contains 'ThemePark' and 'London is simply 'term' The full model is: class Terms(models.Model): term=models.CharField(maxlength=100,core=True,help_text="search term") def __unicode__(self)

Re: manage.py dumpdata && loaddata -- problem with datetime fields

2007-09-17 Thread Rob J Goedman
Hi Russ, Yes, I use Postgres 8.2.3 on Mac OS. I think reverting back to revision 6329 fixes this problem as well. Date/time stamps are then neatly written with just :SS (not as HH:MM:SS.123456). Hope this helps, thank you (and all other developers) for such a great framework! Rob On Sep 17, 2

Re: manage.py dumpdata && loaddata -- problem with datetime fields

2007-09-17 Thread Russell Keith-Magee
On 9/17/07, Rob J Goedman <[EMAIL PROTECTED]> wrote: > > Hi Russ, > > Yes, I use Postgres 8.2.3 on Mac OS. Sorry - just to clarify - does this mean you _are_ seeing the problem on Postgres? > I think reverting back to revision 6329 fixes this problem as well. > Date/time stamps are then neatly w

Re: Using a filter with many to many relationship

2007-09-17 Thread Richard Dahl
Ok, the query should then be: Offer.objects.filter(Q(terms__term__exact = 'ThemePark') & Q(terms__term__exact = 'London')) -richard On 9/17/07, merric <[EMAIL PROTECTED]> wrote: > > > I only want records that have both the terms, "ThemePark" AND "London" > > The attribute of Terms that contain

Re: ModelChoiceField default value

2007-09-17 Thread Richard Dahl
initial works for me, however, you must set the initial by the id of the record not the instance, i.e. forms.ModelChoiceField(queryset=Bullet.objects.filter(fk_day=day_id), initial = Bullet.objects.get(pk = day_id).id) -richard On 9/17/07, Rufman <[EMAIL PROTECTED]> wrote: > > > how can i make

Re: how to put a cookie which is visible from all domains

2007-09-17 Thread shabda
Found the answer, The session middleware sets a cookie, using this code(http:// code.djangoproject.com/browser/django/trunk/django/contrib/sessions/ middleware.py ) 42 response.set_cookie(settings.SESSION_COOKIE_NAME, request.session.session_key, 43 m

Re: Using a filter with many to many relationship

2007-09-17 Thread merric
Still returns an empty query set. Checking some of the other posts I think this is a failing which is particular to ManyToMany relationships On Sep 17, 4:33 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: > Ok, the query should then be: > > Offer.objects.filter(Q(terms__term__exact = 'ThemePar

Re: Using a filter with many to many relationship

2007-09-17 Thread peschler
Wouldn't the following code solve the problem without Q objects? Offer.objects.filter(searchterms__term='ThemePark', searchterms__term='London') According to the docs the filter parameters are AND'ed. Admittedly I never used this in combination with ManyToMany fields, so I might be wrong here.

Re: Creating link to root

2007-09-17 Thread Florian Lindner
Am Sonntag, 16. September 2007 schrieb Christian Joergensen: > Florian Lindner wrote: > > Hello, > > a common problem I have is that I have references in my main template > > like CSS or an background image: > > > > > > > > This template is used within different paths. Therefore I need to have >

Re: Using a filter with many to many relationship

2007-09-17 Thread Richard Dahl
What version of django are you using? I am using the latest from svn and this does work for me, however I just looked at your model definitions again and realized that the query I sent you would not work. I didn't notice that in your Offer model the related name is 'searchterms', not 'terms', so

How to iterate through an int within template ?

2007-09-17 Thread vincent garonne
Hello, Does someone knows how to do a loop on a int inside template, e.g. : Result Page: : {% for p in pages %} {% ifequal p page %} {{p}} {% else %} {{p}} {% endifequal %} {% endfor %} Where pages is an int. Do i have to use a special filter function ? Che

Re: GeoDjango : Error in admin site with geom fields

2007-09-17 Thread guillaume
seems there's a bad trick like this indeed. I'm gonna check this all. Thanks for the clue On 16 sep, 19:38, "Ariel Mauricio Nunez Gomez" <[EMAIL PROTECTED]> wrote: > Did you have a previous geos installation?? > Maybe you have some old .so's that are being linked instead of the new ones. > > Ari

PyCon-Tech meeting tomorrow!

2007-09-17 Thread Douglas Napoleone
There will be a PyCon-Tech meeting tomorrow 2pm EST, and we (and by we I mean I) desperately need help getting the proposal system done. I am including the django-users group in hopes that some people from there will be curious and want to help out. Meeting information is here: http://pycon.blogs

Re: Directed graph implementations for Django

2007-09-17 Thread paul.dorman
Thanks for your response Julio, something similar yes. What I'm after is an Django implementation of an directed acyclic graph. I understand there's some complexity involved to ensure no cycles can be created (which I understand is the graph equivalent of an endless loop). There's plenty of good

template inheritance and default text

2007-09-17 Thread bramble
I'd like to show a little greeting text on a page that either says either "not logged in", or "hi " (showing the User's name), but am having problems getting the default "not logged in" text show up. My base.html has this: {% block greeting %}not logged in{% endblock %} And the child templa

uploading to a separate directory

2007-09-17 Thread Ian Lawrence
Hi, I would like each uploaded test to go into a separate directory in my media_root. In models.py I have: class TestDetail(models.Model): test_grouping = models.ForeignKey(TestGrouping) test_name = models.CharField(maxlength=200) python_file = models.FileField("Python File", upload_t

[FYI] windows vista, server lag (very slow), with zonealarm (even if off...)

2007-09-17 Thread francois
Hello, This is not a problem coming from Django but it took me some time => I post here for other users who would search here for a solution The problem: - few seconds lags on vista for each http request to be considered by the server (with the internal server or apache and whatever browser).

Re: Directed graph implementations for Django

2007-09-17 Thread [EMAIL PROTECTED]
We use a Tree for the navigation bar (not a true DAG, but there are circular checks): https://pycon.coderanger.net/browser/django/trunk/pycon/navbar/models.py There is a validator IsNotCircular, which does the obvious. There is code to do serialization (currently just a pickle), but there are pl

Re: template inheritance and default text

2007-09-17 Thread James Bennett
On 9/17/07, bramble <[EMAIL PROTECTED]> wrote: > My base.html has this: > > {% block greeting %}not logged in{% endblock %} Personally, I wouldn't use the view for this; I'd do {% if user.is_authenticated %}Hello, {{ user.username }}{% else %}Not logged in{% endif %} If you must assign the

Re: Using a filter with many to many relationship

2007-09-17 Thread Tim Chase
>> Ok, the query should then be: >> >> Offer.objects.filter(Q(terms__term__exact = 'ThemePark') & >> Q(terms__term__exact = 'London')) > > Still returns an empty query set. Checking some of the other posts I > think this is a failing which is particular to ManyToMany > relationships the probl

Re: template inheritance and default text

2007-09-17 Thread bramble
Those sound like great options. Thanks a lot, James. --~--~-~--~~~---~--~~ 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

Re: windows vista, localhost server lag (very slow), with zonealarm (even if off...)

2007-09-17 Thread francois
Oops, forgot to mention this is obviously for the local web sever on the vista machine ( ie using localhost or 127.0.0.1 urls ) On Sep 18, 12:13 am, francois <[EMAIL PROTECTED]> wrote: > Hello, > > This is not a problem coming from Django but it took me some time => > I post here for other user

Problem using newforms cleaned_data with Oracle and DateField

2007-09-17 Thread Catriona
Hello I'm a newbie to Django and Python so sorry if this is a dumb mistake on my behalf. I have a model (using an Oracle XE backend): class Survey(models.Model): company = models.ForeignKey(Company, null = False, blank = False) survey_name = models.CharField(max_length = 50, nu

Re: How to iterate through an int within template ?

2007-09-17 Thread Russell Keith-Magee
On 9/18/07, vincent garonne <[EMAIL PROTECTED]> wrote: > > Hello, > > Does someone knows how to do a loop on a int inside template, e.g. : Well - looping in Django templates is quite similar to looping in Python, so you can't 'loop on an int'. You can loop on a range, though - so if you make page

Re: windows vista, localhost server lag (very slow), with zonealarm (even if off...)

2007-09-17 Thread jeffhg58
Thanks so much for the info. I have been trying to figure it out why it has been taking so long on my local machine. -- Original message -- From: francois <[EMAIL PROTECTED]> > > Oops, forgot to mention this is obviously for the local web sever on > the vista machin

Re: uploading to a separate directory

2007-09-17 Thread [EMAIL PROTECTED]
You can not do what you are trying to do, the way you are doing it ;-) The problem is the 'test_name' does not refer to the data on the instance. It just evaluates to the local variable. That means you are constructing that upload_to string at import time. It is the equivalent of doing: foo = mo

Can't install MySQLdb... any links?

2007-09-17 Thread Austin Govella
My Google fails me. I've been using these sites for help: * http://blog.vixiom.com/2006/07/23/how-to-install-django-on-os-x-tiger-104/ * http://toolmantim.com/article/2006/5/31/installing_django_on_osx * http://www.rhonabwy.com/wp/2006/07/20/installing-django-on-macos-x-development-version/ I

using multiple databases

2007-09-17 Thread msoulier
I was hoping to use Django in a web management UI for a server that I support, where new UIs are added as new applications are installed. Due to this plugin requirement, I had planned to model that with one large Django project, where each new plugin was a Django application. Unfortunately it wou

Re: template inheritance and default text

2007-09-17 Thread bramble
On Sep 17, 6:12 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 9/17/07, bramble <[EMAIL PROTECTED]> wrote: > > > My base.html has this: > > > {% block greeting %}not logged in{% endblock %} > > Personally, I wouldn't use the view for this; I'd do > > {% if user.is_authenticated %}Hello, {

Re: Can't install MySQLdb... any links?

2007-09-17 Thread Austin Govella
On Sep 17, 9:29 pm, "Austin Govella" <[EMAIL PROTECTED]> wrote: > I tried it again and I get this error: > error: could not create 'build/bdist.macosx-10.3-fat/egg': Permission denied sudo python setup.py install did something, but when I test it (import MySQLdb), I still get an error. Python's

notmm-devel-0.2.9p2 now available via Subversion!

2007-09-17 Thread Etienne Robillard
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Greetings, I've done some new changes to the notmm toolkit and was thinking to release some new documentation here. [1,2] In a nutshell, the new features are: - The package ``apps.newadmin'' can now be used as a drop-in replacement for ``dj

Re: Django Flatpages With Memcache as storage location

2007-09-17 Thread scum
I'm having the same problem over here - after checking out the latest svn version (6373), my own middleware flat out broke (response object does not have header instance). When I removed that middleware, all my flat pages are throwing 404's. Super weak. --~--~-~--~~~

Re: using multiple databases

2007-09-17 Thread Ben Ford
Hi Mike, There is a branch that supports multiple databases in the repository. It's quite out of date in the SVN repo but Koen put in some stirling work over the period of the sprint and produced a patch against trunk at around r6100. Multiple-db support is a feature that is asked for very regularl

Re: Django Flatpages With Memcache as storage location

2007-09-17 Thread scum
OK - fixed it for me, kinda... I was pushing the flatpage content though the textile markup plugin and removing this seemed to fix the 404s. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

reassessing our Operating System

2007-09-17 Thread antonio von carmoducci
Hi Everyone. I'm looking at reassessing our Operating System of choice for our Django site, and I really need some background information (popularity & suitability mainly) If you have a minute spare I'd really appreciate some answers to the following questions: (live publicly viewable sites onl

Full Time Developer Role (Python/Django) - Brisbane - Australia

2007-09-17 Thread carmoda
Anyone Who may be interested in a developer role in Brisbane Australia could they please contact me ASAP on the below addresses. Do not send your resume. I will reply to your initial email with the job description. Note: I am the Technical Lead, not an agent. I apologize for not being able to po