Re: Django as a Standalone Desktop Application

2011-10-21 Thread kenneth gonsalves
On Sat, 2011-10-22 at 00:02 +0200, Ivo Brodien wrote: > I think with django this is an easy tast. > > This might loos like a typical Excel/VBA and maybe Word thing, but I > don’t want to use non open source software for this and since I like > Django and there it might be the feature of a online

Re: django-admin py extension on fedora

2011-10-21 Thread kenneth gonsalves
On Fri, 2011-10-21 at 21:28 +, Brett Epps wrote: > Perhaps Django is packaged differently on Fedora. Did you install it > using yum? I'd recommend installing with pip to avoid such issues, > and to > ensure you're getting the latest version. several people have had bad experiences using

Re: Django as a Standalone Desktop Application

2011-10-21 Thread Fernando Rocha
What I did: - Directory with: Project and Django. - Python 2.7 download link. - bootstrap.py with manage.py commandas This way I didn't need to 'build a executable', which I tried, but failed. The trick was the bootstrap.py file with mange.py commands, like: import manage

Re: Django as a Standalone Desktop Application

2011-10-21 Thread Kurtis
It would be cool to have some sort of an automatic deployment thing where it includes a Custom Firefox, Django (w/ runserver) and an sqlite database all wrapped up into a single executable package. Especially if you could do cross-platform builds so that it automatically creates Windows, OSX, and

DB for 2010 Census Zip Code Data

2011-10-21 Thread Kurtis
I'm thinking of creating a Django app that will include all US Zip Codes from the 2010 Census Data. It will probably include a couple of helper functions for calculating "other zip codes within X proximity". I know I could probably use GeoDjango for this but it's a bit heavy for just this small

Re: Django 1.3.1 - Form on multiple pages

2011-10-21 Thread youpsla
Thanks a lots. I haven't take care of that before and I thought it has been a source of confusion Thanks again Alain On 22 oct, 01:47, Kurtis Mullins wrote: > Yep, you've got it. That stuff will be available in future releases. But if > you want the 1.3

Re: Django 1.3.1 - Form on multiple pages

2011-10-21 Thread Kurtis Mullins
Yep, you've got it. That stuff will be available in future releases. But if you want the 1.3 documents, just make sure you change that "dev" in the URL to "1.3". Don't worry, it happens a lot more often that you might think! On Fri, Oct 21, 2011 at 7:44 PM, youpsla wrote: >

Re: Django 1.3.1 - Form on multiple pages

2011-10-21 Thread youpsla
Hi again, in this link: https://docs.djangoproject.com/en/dev/ref/contrib/formtools/form-wizard/ the "/dev/" means that I'm reading the development docs ? Regards Alain On 22 oct, 01:22, Kurtis Mullins wrote: > No problem :) Also, make sure you're not reading the

Re: Django 1.3.1 - Form on multiple pages

2011-10-21 Thread Kurtis Mullins
No problem :) Also, make sure you're not reading the Development docs. It's a different class all together in there. On Fri, Oct 21, 2011 at 7:02 PM, youpsla wrote: > Sorry, I think I was wrong. I try to use SessionWizardView wich > require ton install the "django-formwizard"

Re: Django 1.3.1 - Form on multiple pages

2011-10-21 Thread youpsla
Sorry, I think I was wrong. I try to use SessionWizardView wich require ton install the "django-formwizard" package from djangopackages. I think it will work now Thanks Alain On 22 oct, 00:27, Kurtis Mullins wrote: >

Re: Django 1.3.1 - Form on multiple pages

2011-10-21 Thread Kurtis Mullins
https://docs.djangoproject.com/en/1.3/ref/contrib/formtools/form-wizard/ I don't believe it's deprecated in 1.3.1 but I could be wrong... On Fri, Oct 21, 2011 at 6:04 PM, youpsla wrote: > Hello, > I like to know wich is the best splution to manage one form on > multiple

Re: Django as a Standalone Desktop Application

2011-10-21 Thread Alex Mandel
On 10/21/2011 03:02 PM, Ivo Brodien wrote: > Hi, > >> Could you tell us more about the utility you want to create? It sounds like >> Django might not be the appropriate tool in this case. > > well it is quite simple. > > The user will have to provide some metadata for every week of the year.

Django 1.3.1 - Form on multiple pages

2011-10-21 Thread youpsla
Hello, I like to know wich is the best splution to manage one form on multiple pages with Gjango 1.3.1. I've seen in the doc that there is a FormWizard Session or Cookies) wich seems to be deprecated. Then, is there a new mechanics for the 1.3.1 version ? Thanks for your answers. Regards

Re: Django as a Standalone Desktop Application

2011-10-21 Thread Ivo Brodien
Hi, > Could you tell us more about the utility you want to create? It sounds like > Django might not be the appropriate tool in this case. well it is quite simple. The user will have to provide some metadata for every week of the year. This then gets printed to a monthly view with the 4

Re: Strange traceback: DoesNotExist not callable

2011-10-21 Thread João Pedro Francese
I found the same thing in my code. Changed it, and seems to be working fine so far. Thanks a lot! On Oct 21, 6:36 am, Torsten Bronger wrote: > Hall chen! > > > > > > > > > > Alasdair Nicol writes: > > Hi Jo o and Torsten, > > > [...] > > >> On Oct 7, 12:31 pm,

Re: Django as a Standalone Desktop Application

2011-10-21 Thread Brett Epps
Hi, Could you tell us more about the utility you want to create? It sounds like Django might not be the appropriate tool in this case. Brett From: Ivo Brodien > Reply-To: > Date: Fri,

Re: django-admin py extension on fedora

2011-10-21 Thread Brett Epps
Perhaps Django is packaged differently on Fedora. Did you install it using yum? I'd recommend installing with pip to avoid such issues, and to ensure you're getting the latest version. Brett On 10/21/11 6:01 AM, "flebber" wrote: >Just want to double check something

Re: Using .filter() on a constant expression

2011-10-21 Thread Tim Chase
On 10/21/11 13:58, Ian Clelland wrote: If you don't want to do that, then just use python to selectively include or exclude the other Q objects (that you wanted to depend on your comparison): Using your code as a base, I would do something like this: (I don't know if this is correct; I get a

Re: django.db.models import Q help!

2011-10-21 Thread Kayode Odeyemi
On Fri, Oct 21, 2011 at 7:43 PM, Ian Clelland wrote: > On Fri, Oct 21, 2011 at 11:06 AM, Kayode Odeyemi wrote: > >> Hello, >> >> Please I need help with django.db.models.Q. I have the query below which >> is returning empty >> >> qs = >>

Re: How do you pinpoint a performance issue?

2011-10-21 Thread Javier Guerra Giraldez
On Fri, Oct 21, 2011 at 2:08 PM, Shawn Milochik wrote: >    What's the best way to start looking for a problem like this? I Django-debug-toolbar is the first line of defense (well, second. the first is to use good algorithms). in the vast majority of cases, any performance

How do you pinpoint a performance issue?

2011-10-21 Thread Shawn Milochik
Real-life situation: I deployed a week's worth of code changes to production. Upon restart, site wouldn't load anymore. Nothing but a 404 error. Long story short: By using Django's logging, I discovered that a query was being run tens thousands of times -- obviously in a loop. I

Re: Using .filter() on a constant expression

2011-10-21 Thread Ian Clelland
On Sat, Oct 15, 2011 at 9:52 PM, Tim Chase wrote: > I have some gnarly AND/OR logic combining Q() objects but deep > within the logic, I need to do a comparison of two constants. In an ideal > world, the logic would look something like > > def age(self, age): >

Re: django.db.models import Q help!

2011-10-21 Thread Ian Clelland
On Fri, Oct 21, 2011 at 11:06 AM, Kayode Odeyemi wrote: > Hello, > > Please I need help with django.db.models.Q. I have the query below which is > returning empty > > qs = > Q(financial_institution=request.user.get_profile().financial_institution) > txn =

django.db.models import Q help!

2011-10-21 Thread Kayode Odeyemi
Hello, Please I need help with django.db.models.Q. I have the query below which is returning empty qs = Q(financial_institution=request.user.get_profile().financial_institution) txn = Transaction.objects.extra( where=['(tpin=%s or teller_no=%s or identifier=%s) AND

Django as a Standalone Desktop Application

2011-10-21 Thread Ivo Brodien
Hi, I want to write a little utility for somebody and I would like to use Django to develop it. At the moment the utility does not need/or never will have to be running on a web server. I would like to build a little standalone desktop app, so that I can send the Django App and everything

Re: Facebook Authentication: Client side vs. Server side

2011-10-21 Thread Simon Bächler
Hi The Javascript SDK only lets you authenticate on facebook. You still need to authenticate the user in Django. The difficulty is keeping the two logins in sync. The django-facebook-graph has a Django backend for facebook login: https://github.com/feinheit/django-facebook-graph I use a

Re: Login problems under heavy load

2011-10-21 Thread Alpesh Gajbe
On Fri, Oct 21, 2011 at 10:32 PM, Kurtis Mullins wrote: > Are you having any errors in your log? And when you say unable to login -- > does it display a message to them? What authentication backend are you > using? The more information you can provide, the easier it will

Re: Field.Choices in Template

2011-10-21 Thread Kurtis Mullins
Bump On Thu, Oct 20, 2011 at 3:37 PM, Kurtis wrote: > Hey, > > I'm trying to build a custom template for my ModelForm. My ModelForm > contains several M2M fields. If I run the ModelForm.as_view and then > in my template print {{ form.as_p }} it'll automagically display

Re: Login problems under heavy load

2011-10-21 Thread Kurtis Mullins
Are you having any errors in your log? And when you say unable to login -- does it display a message to them? What authentication backend are you using? The more information you can provide, the easier it will be for people to try to help you out. On Fri, Oct 21, 2011 at 12:30 PM, Alpesh Gajbe

Login problems under heavy load

2011-10-21 Thread Alpesh Gajbe
Hi all we are running a django site hosted behind apache2 using mod wsgi on debian squeeze. Under heavy load some of our users are unable to login. The software versions we used are as follows apache2 (https) 2.2.16-6+squeeze3 libapache2-mod-wsgi

Re: Django ORM - Am I trying to do the impossible?

2011-10-21 Thread creecode
I recently ran across a similar sounding technique < http://www.databasejournal.com/features/mssql/article.php/3712571/SqlCredit-150-Part-11-Change-Tracking-Using-History-Records.htm > which I'm attempting to use in a current project. It's not Django specific but it the techniques discussed

Re: Admin Home Apps and Models ordering

2011-10-21 Thread creecode
Hello Pedro, I seem to recall coming across your question being covered in the Django docs somewhere. Unfortunatly I don't know where I saw it. Perhaps the Admin site < https://docs.djangoproject.com/en/1.3//ref/contrib/admin/ > section of the docs? Under customization? Of course if

model validation after related objects are updated

2011-10-21 Thread sspross
hi all i have a admin model with tabluarinlines. i want to do some additinal validations in the clean() function of the model, but the validations (sum aggregation) depends on the relatated objects (inlines). where can i "hook" me in, to perform the validations after the related objects were

Django and Shibboleth

2011-10-21 Thread Alfred Buterol
I'm investigating the options for using Shibboleth in a Django deployment. From what I've found, things look somewhat sparse. Can anyone comment on the following? * Is anyone using the django_shibboleth module (see http://code.arcs.org.au/gitorious/django/django-shibboleth/trees/1.1)? If so,

Re: Integrating facebook canvas with django

2011-10-21 Thread Mike Seidle
On Friday, October 21, 2011 12:10:12 PM Amit Sethi wrote this and sent it to To: django-users :: > One of the things that I need is to do is to replace django's user > backend such that it uses the facebook authentication mechanism .But > at same time be able to

Re: Django ORM - Am I trying to do the impossible?

2011-10-21 Thread Jirka Vejrazka
I thought I missed something :) First of all, nothing stops you from writing raw SQL query if you had one in mind. It might be more sensible than trying to massage the ORM too much. If you insist on ORM, but something along these lines *might* work (I really don't have the opportunity to test it

Make help_text visible in TabularInline

2011-10-21 Thread sspross
hi all is it possible to make the field help_text visible in a tabluar inline? thanks! best regards, silvan -- 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

Re: load-on-startup equivalent in django?

2011-10-21 Thread Martyn Harris
You could use SimpleXMLRPCServer to create a client in your view.py with a function to call the server side, and pass the information over when done. See: http://docs.python.org/library/simplexmlrpcserver.html You'd need to have the server side running the whole time in the background, if you

django-admin py extension on fedora

2011-10-21 Thread flebber
Just want to double check something really minor. The django-admin.py command on my system(fedora 15) will only invoke without the py extension. Is this okay? the django book shows the command with the extension. my command line: [sayth@sayth django]$ django-admin.py startproject mysite bash:

VirtualHost/Cache

2011-10-21 Thread Didex
Hello everyone, I am trying setup a webserver(Centos) with two django sites, but i am have cache problems. http.config: NameVirtualHost *:80 WSGIPythonEggs /usr/local/django/eggs WSGIPythonPath /usr/local/django:/usr/local/django/site1:/usr/local/ django/site2 site1.config:

Re: custom widgets: passing data between widget/field/form/model

2011-10-21 Thread Aljoša Mohorović
any other comments/suggestions on this? Aljosa -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to

Re: Is it possible to use django for storing models like directory trees?

2011-10-21 Thread Daniel Roseman
On Friday, 21 October 2011 11:39:47 UTC+1, Gagiel wrote: > > Hi everyone, > > I am designing a system that allows users to mess up a basic directory > tree and save the modified tree after reordering, removing and adding > nodes at any level. I don't get a clue how to express this object >

Re: Django ORM - Am I trying to do the impossible?

2011-10-21 Thread Paolo
Hi Jirka, Thanks for the response, but if I understand your post then the issue is still the need to iterate over every Team (as opposed to every assignment) in order to construct a collection of Teams in a certain Status... if that makes sense. I think the crux of the issue is a limitation

Re: Django ORM - Am I trying to do the impossible?

2011-10-21 Thread Jirka Vejrazka
Hi there, I may be missing something obvious here, but have you tried thinking about it the other way round? The below is just an untested hint: class Team(models.Model): def get_status(self): team_status = AssignmentUpdate.objects.filter(assignment__team=self).latest().status return

Is it possible to use django for storing models like directory trees?

2011-10-21 Thread Gagiel
Hi everyone, I am designing a system that allows users to mess up a basic directory tree and save the modified tree after reordering, removing and adding nodes at any level. I don't get a clue how to express this object structure in django. Maybe the only way is to get myself into handwritten

Re: Getting into professional django development

2011-10-21 Thread Benedict Verheyen
On 20/10/2011 4:02, kenneth gonsalves wrote: > On Wed, 2011-10-19 at 14:59 +0200, Benedict Verheyen wrote: >> - Debian ( 1st install was potato :)) >> - VirtualBox >> - nginx >> - gunicorn >> - supervisord (watch gunicorn process) >> - git >> - virtualenv >> - pip (coupled with virtualenv, it's a

Re: Getting into professional django development

2011-10-21 Thread Benedict Verheyen
On 21/10/2011 8:44, Kevin wrote: > > Question, why do you use VirtualBox? Because inhouse we still pretty much use Windows (i know). I introduced Python, Django and Linux here. My next laptop will be a Debian with a windows running in a Virtual Box VM. Now, I use Virtual Box and use a Debian VM

Re: Strange traceback: DoesNotExist not callable

2011-10-21 Thread Torsten Bronger
Hallöchen! Alasdair Nicol writes: > Hi João and Torsten, > > [...] > >> On Oct 7, 12:31 pm, Torsten Bronger >> wrote: >> >>> Hall chen! >>> >>> I examine a traceback that ends with >>> >>> ... >>> >>> File

Re: Django ORM - Am I trying to do the impossible?

2011-10-21 Thread Paolo
Thanks guys, I think you're essentially saying the same thing in different ways - 'denormalise' the data so I can make use of the Assignment model for querying without looking at the Update models. This clears things up for me, cheers! -- You received this message because you are subscribed

Re: Django ORM - Am I trying to do the impossible?

2011-10-21 Thread Venkatraman S
Actually, thinking about this thread(and other one which needs something similar), i think the best way is not to confuse the 'history/update' with the actual 'data'; i mean, that history/updates are just for tracking the revisions, the individual attributes of the entity should be present in the

Re: Django ORM - Am I trying to do the impossible?

2011-10-21 Thread Matthias Kestenholz
On Fri, Oct 21, 2011 at 9:20 AM, Paolo wrote: > An additional requirement for assignments is to keep status history, so we > can see "assignment 1 was active mon-wed, standby thu-fri then active again" > etc. > As for the query, yes that was my initial idea but I thought it was

Re: Admin Home Apps and Models ordering

2011-10-21 Thread Venkatraman S
On Wed, Oct 19, 2011 at 7:53 PM, Pedro Vasconcelos wrote: > > I'm wondering how can I do personal Apps and Models ordering on Django > Admin Home page. > Am sorry, but you need to spec out the details. What do you mean here? -V -- You received this message because you are

Re: default form template

2011-10-21 Thread Venkatraman S
On Fri, Oct 21, 2011 at 9:19 AM, bino oetomo wrote: > > For inserting javascript, why you have to 'extend'; use jquery and do the >> needful with the form! >> >> > Kindly please give me more about how to do it > You need to learn javascript and then jquery; and then

Re: Django ORM - Am I trying to do the impossible?

2011-10-21 Thread Paolo
An additional requirement for assignments is to keep status history, so we can see "assignment 1 was active mon-wed, standby thu-fri then active again" etc. As for the query, yes that was my initial idea but I thought it was going to be inefficient for times when I wanted to query for all

Re: Profiling Django

2011-10-21 Thread Venkatraman S
On Wed, Oct 12, 2011 at 6:49 PM, < michael.pimmer@boehringer-ingelheim.com> wrote: > ** > > - django-debug-toolbar with profiling from > http://backslashn.com/post/505601626/ - too fine-grained: >I do not want to know that 138752 calls to > python2.6/posixpath.py:129(islink) take 0.858

Re: Getting into professional django development

2011-10-21 Thread Kevin
I have a similar development machine set-up, for hosting, I am currently using Rackspace Cloud, as I have full control over deployment options, and it can grow with my apps, scalability is a must. I am currently using Debian Squeeze and editing with the wonderful Kate, and using KIO to edit the

Integrating facebook canvas with django

2011-10-21 Thread Amit Sethi
Hi all , I have to integrate a few django apps with facebook without having to do a major code change on the django apps side. One of the things that I need is to do is to replace django's user backend such that it uses the facebook authentication mechanism .But at same time be able to use other

Re: Blank output from treemenus under nginx

2011-10-21 Thread Kevin
Something you may want to try to see if it is fastcgi related, is running the site on the server in dev mode, plain old manage.py runserver. Then replace your fastCGI command in nginx with proxy_pass http://127.0.0.1:8000/; Be sure to change nginx and reload it's config before running manage.py