Re: General question: Django-Profiles, auth.User and "merging" both data

2008-11-13 Thread urukay
I always use my own forms (no ModelForms), because there is better control of the form (validation, save function). But definetely more of code will help (models, whole view function). We will work it out ;-) R. erdmaennchen wrote: > > > After the next night of coding, reading through docume

Does the development enterprise application have the available third party report library

2008-11-13 Thread vance ma
Does the development enterprise application have the available report library? --~--~-~--~~~---~--~~ 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 T

Re: Problem with named URL and parameters

2008-11-13 Thread Chris Emerson
On Thu, Nov 13, 2008 at 02:56:26PM +1100, Malcolm Tredinnick wrote: > On Wed, 2008-11-12 at 22:39 -0500, Karen Tracey wrote: > > On Wed, Nov 12, 2008 at 10:27 PM, Brandon Taylor > > <[EMAIL PROTECTED]> wrote: > > > > Hi everyone, > > > > So I have a question/problem with a named URL patt

Re: Dynamic Paths for File Uploads

2008-11-13 Thread bruno desthuilliers
On 13 nov, 01:52, Tim <[EMAIL PROTECTED]> wrote: > Just to add some more information - I have been messing around with > making the upload_to a callable, but I still have the same problem in > that I need to build the path based on information that only exists > during runtime (that is, a call t

Re: Does the development enterprise application have the available third party report library

2008-11-13 Thread Christian Joergensen
vance ma wrote: > Does the development enterprise application have the available report > library? What application? What library? Regards, -- Christian Joergensen http://www.technobabble.dk --~--~-~--~~~---~--~~ You received this message because you are subsc

Re: Dynamic Paths for File Uploads

2008-11-13 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-11-13, o godz. 01:52, przez Tim: > Just to add some more information - I have been messing around with > making the upload_to a callable, but I still have the same problem in > that I need to build the path based on information that only exists > during runtime (tha

Re: General question: Django-Profiles, auth.User and "merging" both data

2008-11-13 Thread MikeKJ
I think I may be banging my head on the same problem. I have a UserProfile and Member model in the same app. In views I am using ModelForm on Member for generate a form for def member(request) and a limited set for def associate_member(request) What I really want to do is use the 1st 5 (common an

Re: Apache Segmentation Fault on succesful authentication

2008-11-13 Thread huw_at1
ls -ltr /usr/local/lib -r-xr-xr-x 1 root root 4806649 Nov 11 11:22 libpython2.5.a -r-xr-xr-x 1 root root 4806649 Nov 12 12:49 libpython2.5.so.1.0 lrwxrwxrwx 1 root root19 Nov 12 12:49 libpython2.5.so -> libpython2.5.so.1.0 echo $LD_LIBRARY_PATH /usr/local/lib ldd /usr/lo

Re: Basic concept for templatetag using node and parser

2008-11-13 Thread bruno desthuilliers
On 13 nov, 11:13, sugi <[EMAIL PROTECTED]> wrote: > Hi > > Can any one explain template tag with sample example. No problem : http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#writing-custom-template-tags To make a long story short: the parser function is called at "compilation" t

Using FilteredSelectMultiple with Ajax

2008-11-13 Thread [EMAIL PROTECTED]
Hi guys, I'm relatively new to django (coming from Zope) and I love it! This is my first question. Im using the FilteredSelectMultiple (from the admin application) in one of my forms and it works like charm if I use with a "normal" request. If I load the form with a AJAX request and inject the r

Re: Basic concept for templatetag using node and parser

2008-11-13 Thread suganthi saravanan
Thanks bruno...but i have already read the documentation for the Custom template tag. http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#writing-custom-template-tags I need simple example for more clarification can you help me. --~--~-~--~~~---~--~

Re: Apache Segmentation Fault on succesful authentication

2008-11-13 Thread huw_at1
My apologies. I forgot to mention that I already tried what was suggested in the article you pointed me at. I created a symlink in / usr/local/lib/python2.5/config as directed however recompiling mod_python still links to the library statically. Unless I missed a step in the article I am starting

Re: Basic concept for templatetag using node and parser

2008-11-13 Thread Karen Tracey
On Thu, Nov 13, 2008 at 6:33 AM, suganthi saravanan < [EMAIL PROTECTED]> wrote: > > Thanks bruno...but i have already read the documentation for the Custom > template tag. > > > http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#writing-custom-template-tags > > I need simple example

Query for all objects in table1 that DO NOT have corresponding objects in table2

2008-11-13 Thread Ropley
Noob question, but I've been running around in circles. I'm building an in-house jobs board, and have 2 models: class jobs(models.Model): ... class viewed_jobs(models.Model): job=models.ForeignKey(job) ... I would like to create a query that returns all jobs that have not been viewed - that is,

Re: Query for all objects in table1 that DO NOT have corresponding objects in table2

2008-11-13 Thread Karen Tracey
On Thu, Nov 13, 2008 at 6:47 AM, Ropley <[EMAIL PROTECTED]> wrote: > > Noob question, but I've been running around in circles. I'm building > an in-house jobs board, and have 2 models: > > class jobs(models.Model): > ... > > class viewed_jobs(models.Model): > job=models.ForeignKey(job) > ... > > I

Re: Password Field Form

2008-11-13 Thread Aatif
yes, it works. I was expecting a forms.Passwordfield() :-) > password => > forms.CharField(label=_(u'Password'),widget=forms.PasswordInput(render_value=False)) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djang

how to get the hash part(string after the'#' mark) of the requesting url in diango

2008-11-13 Thread maoxl
how to get the string of "x=1;y=2 " in django from requesting url "http://a.cn/b#x=1;y=2";. --~--~-~--~~~---~--~~ 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: how to get the hash part(string after the'#' mark) of the requesting url in diango

2008-11-13 Thread Brett Parker
On 13 Nov 07:15, maoxl wrote: > > how to get the string of "x=1;y=2 " in django from requesting url > "http://a.cn/b#x=1;y=2";. I wouldn't expect to be able to get the part after the # (actually, I wouldn't expect the browser to bother sending it) - it's a pointer for the browser to a named anc

Improvement: documentation example for extra Manager methods

2008-11-13 Thread [EMAIL PROTECTED]
Hi, I am building a custom Manager for adding extra methods that return filtered querysets. I believe this is a common case for custom Managers. Digging into the documentation [1], the only example emphasises on the ability to return anything from a Manager method. However, I miss a standard exa

Foreignkey field in admin list_filter, Django 1.0

2008-11-13 Thread caio ariede
Hello. I'm trying to put a field came from a foreignkey in admin list_filter. My model is something like this: class UserProfile(models.Model): user = models.ForeignKey(User, unique=True) state= models.CharField(max_length = 2, choices = STATE_CHOICES) city= models.CharField(ma

ChicagoLug Code review

2008-11-13 Thread Adam Jenkins
We would like to announce that this Saturday November 15th from 3 to 6pm is the Chicago Lug code review meeting. If you're stuck on a piece of code, looking to learn a few tricks, or just wanna hang out with some nerds, then come by. We will have people with knowledge in C, Python, Django, Ruby,

Re: Apache Segmentation Fault on succesful authentication

2008-11-13 Thread Graham Dumpleton
Because you have created the symlink for the .so file so it appears next to the static library. It is arguably a a failing of standard Python installer that it doesn't do this. What to do is explained in document I previously pointed you at: http://code.google.com/p/modwsgi/wiki/InstallationIss

Re: how to get the hash part(string after the'#' mark) of the requesting url in diango

2008-11-13 Thread Tim Chase
>> how to get the string of "x=1;y=2 " in django from requesting url >> "http://a.cn/b#x=1;y=2";. > > I wouldn't expect to be able to get the part after the # (actually, I > wouldn't expect the browser to bother sending it) - it's a pointer for > the browser to a named anchor tag If you watch

Re: creating django middleware

2008-11-13 Thread Steve Holden
ershadul wrote: > Dear , > I dont know whether my process_request() is being called or not? > Can you inform me please, how can i verify that my middleware's > process_request() is called ? > > On Nov 12, 4:42 am, Steve Holden <[EMAIL PROTECTED]> wrote: >> ershadul wrote: >>> Dear all, >>> please

Re: apache mod_wsgi/nginx config: different behaviors if www pre-pended

2008-11-13 Thread Serdar T.
Thanks for the reply Graham. Since the time I wrote the initial message, I figured out the problem: I was using nginx as the frontend, as you point out, and sending requests to apache at 127.0.0.1:8080. But I hadn't updated my virtualhost file to process requests to that address. I made the follo

Basic concept for templatetag using node and parser

2008-11-13 Thread sugi
Hi Can any one explain template tag with sample example. Help --~--~-~--~~~---~--~~ 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 unsubscri

Re: Setting Up Django on Vista and Creating a Database

2008-11-13 Thread Marcelo Barbero
You should search where your django-admin.py file is and include that folder to your path environment variable. But if you installed Django using the "python setup.py install" command, the file must be in your Scripts directory under the Python directory. Have you installed Django with "python se

Re: Query for all objects in table1 that DO NOT have corresponding objects in table2

2008-11-13 Thread Alex Koshelev
Hi, Ropley! Try this: jobs.objects.exclude(viewed_jobs=True) On Thu, Nov 13, 2008 at 14:47, Ropley <[EMAIL PROTECTED]> wrote: > > Noob question, but I've been running around in circles. I'm building > an in-house jobs board, and have 2 models: > > class jobs(models.Model): > ... > > class view

Re: Improvement: documentation example for extra Manager methods

2008-11-13 Thread [EMAIL PROTECTED]
I found the origin on my error ('NoneType' object has no attribute '_meta'). I used a wrong (old?) syntax for adding custom Manager to my Model: ModelClass.objects = MyCustomManager() # After Model and Manager definitions My custom Manager should have been attached in the model definition (as fo

Re: Basic concept for templatetag using node and parser

2008-11-13 Thread bruno desthuilliers
On 13 nov, 12:33, "suganthi saravanan" <[EMAIL PROTECTED]> wrote: > Thanks bruno...but i have already read the documentation for the Custom > template tag. > > I need simple example for more clarification There's already one, and you can find quite a few others in third-part dhango apps, or even

Re: Improvement: documentation example for extra Manager methods

2008-11-13 Thread bruno desthuilliers
On 13 nov, 14:53, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, > > I am building a custom Manager for adding extra methods that return > filtered querysets. > I believe this is a common case for custom Managers. Yes, indeed. > Digging into the documentation [1], the only example emphasis

Re: Django new comments framework error

2008-11-13 Thread DavidA
I just got bit by this too and it turned out that I had done an install of Django-1.0 on top of an older Django install. In the site- packages directory there was both a django/contrib/comments/urls.py (from 1.0) and a django/contrib/comments/urls/ directory which contained __init__.py and comment

Re: Django newbie observation

2008-11-13 Thread bobhaugen
You will find lots of excellent examples of Django projects that are open source and up-to-date with version 1.0. See http://djangoplugables.com/ http://pinaxproject.com/ is huge, but the basic_project is fairly simple. http://code.google.com/p/django-basic-apps/ is another suite of apps. --~-

Re: Django newbie observation

2008-11-13 Thread thi.l...@gmail.com
> You will find lots of excellent examples of Django projects [...] It is sometimes difficult to know what Django version each project was based on (especially those from djangosites.org, some of them are still using Manipulator stuff). There were many changes in trunk since 0.95. However, since

Re: Upload Form does not validate

2008-11-13 Thread Israel Fernández Cabrera
Tks you all... I forgot it, it is now fixed. regards Israel Fdez. Cabrera [EMAIL PROTECTED] UNYK : 936 LDX Linux registered user No.: 270292 [http://counter.li.org] . 0 . . . 0 0 0 0 On Wed, Nov 12, 2008 at 13:17, Daniel Roseman <[EMAIL PROTECTED] > wrote: > > On Nov 12, 5

Re: Setting Up Django on Vista and Creating a Database

2008-11-13 Thread Danny R
John, Setting the paths in Vista is quirky. I also cannot make it work. As a workaround whenever I open a new command prompt, i do the following command: set path=C:\Python25\Lib\site-packages\django\bin\;C: \Python25\ then, when i create an app or a project, i do this instead:

Re: General question: Django-Profiles, auth.User and "merging" both data

2008-11-13 Thread Alex S.
Very good hint, urukay! I was a bit scared to use forms.Form because I didn't know how to do it. But it was straight forward and works like a charm! I'm getting my data saved working with two differend models. Just awesome :-). One last thing there (and after that I will clean up my code and write

Re: Logout- Back Button

2008-11-13 Thread AmanKow
use javascript to clear the history On Nov 12, 1:05 pm, jai_python <[EMAIL PROTECTED]> wrote: > hi.. i tried with logout_then_login method. But i am still facing that > back button after logout issue.. any other suggestion? --~--~-~--~~~---~--~~ You received this m

Simple date issue ...

2008-11-13 Thread dbee
I'm having a simple issue here trying to pull dates out of a database. I can only pull out double digit months eg. October, November, December but not single ... Database: entry_date 2008-10-12 2008-09-12 DB API: month_1_count = all_sign_up.filter(entry_date__month=9).filter (entry_date_

Re: Syncing two django applications via cURL

2008-11-13 Thread Dj Gilcrease
Is there a profound reason you are not using the same DB for all the sites, and just using django.contrib.sites to keep the content separated between them? Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com --~--~-~--~~~---~--~~ You received this message beca

Syncing two django applications via cURL

2008-11-13 Thread Kurczak
Hello everyone, I've got this unusual problem - I've got few django sites, and I need to synchronize Users and profiles between them. (it's a closed site where only admins create accounts so OpenID or similar won't help) I thought that probably the easiest way is to hook somewhere in admin interfa

Re: Foreignkey field in admin list_filter, Django 1.0

2008-11-13 Thread caio ariede
Nothing about this? :( I can't put a field came from a foreignkey in a list_filter.. If someone can help.. On Thu, Nov 13, 2008 at 11:52 AM, caio ariede <[EMAIL PROTECTED]> wrote: > Hello. > > I'm trying to put a field came from a foreignkey in admin list_filter. > > My model is something like

Re: Syncing two django applications via cURL

2008-11-13 Thread Ryan Nowakowski
You could create a view that accepts a post that includes the following: * admin username (for auth) * admin password (for auth) * username * user password * other attrs... Then from your admin hooks, you can do an http post to the other sites using httplib[1] keeping stuff in sync. 1.

Re: FastCGI and Django as a continuously running server

2008-11-13 Thread Ryan Nowakowski
On Wed, Nov 05, 2008 at 11:21:14AM -0800, russellneufeld wrote: > The one thing left that I'd like to do is set up Django to run > continuously, even when there are no http requests. My application > runs a bunch of periodic background tasks in addition to serving up > web content, and it seems

Re: Foreignkey field in admin list_filter, Django 1.0

2008-11-13 Thread Ramiro Morales
On Thu, Nov 13, 2008 at 4:28 PM, caio ariede <[EMAIL PROTECTED]> wrote: > Nothing about this? :( > > I can't put a field came from a foreignkey in a list_filter.. > > If someone can help.. Have you tried reading the documentation?: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#list-f

Re: Simple date issue ...

2008-11-13 Thread Steve Holden
dbee wrote: > I'm having a simple issue here trying to pull dates out of a database. > I can only pull out double digit months eg. October, November, > December but not single ... > > Database: entry_date > > 2008-10-12 > 2008-09-12 > > DB API: > > month_1_count = all_sign_up.filter(entr

confused about django-tagging usage

2008-11-13 Thread Aaron Lee
Hi, I am a bit confused about the best practices for using the django-tagging. >From the docs/overview.txt. It seems you can either have the tags stored inside a model OR you can have them stored on the tagging_tag table. E.g. class Link(models.Model): ... def add_tag(self, tagn

Re: Problem with named URL and parameters

2008-11-13 Thread Brandon Taylor
Hi Chris, Unfortunately, that doesn't work either. I guess I can just pass in a dictionary of my local_variables and do them that way. A little kludgy, but I guess it's not that bad, if that's what I have to do. On Nov 13, 3:04 am, Chris Emerson <[EMAIL PROTECTED]> wrote: > On Thu, Nov 13, 2008

Re: TemplateDoesNotExist

2008-11-13 Thread sergioh
are you using fastcgi? it could be an error on your syspath? On Nov 13, 3:57 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2008-11-12 at 23:05 -0800, [EMAIL PROTECTED] wrote: > > Sorry about the inconsistency but just to be clear, here is what I > > have: > > > Dreamhost director

AttributeError: 'TemporaryFileUploadHandler' object has no attribute 'file'

2008-11-13 Thread Zagor
I am in the process of migrating Django from 0.96 to 1.0. Everything seems to be working except file uploads. What worked previously is now giving the following error: File "C:\Python25\lib\site-packages\django\http\__init__.py", line 124, in parse_file_upload return parser.parse() File

Sites Framework and Security

2008-11-13 Thread mcgwest
I recently read this article about the "sites" framework (http:// docs.djangoproject.com/en/dev/ref/contrib/sites/?from=olddocs) but I have a few un-answered questions. Is it possible to restrict users of the admin site to a particular "site"? I'd like to be able to create users who can create con

Views triggering twice

2008-11-13 Thread Jeff Gentry
In my apps, I'm finding that my views are triggering twice. I have a series of related apps, working off of the same settings.py file (there's a global urls.py, which triggers off of the first string and sends to a subdirectory w/ it's own urls.py/__init__.py/models.py/views.py/etc. With one exc

Re: Read/Create Excel xls files using django

2008-11-13 Thread dj
Hello All, I am trying to detemine if there is a way to read the data from an Excel xls file into django. I also need to create an xls file. Does anyone know how that would be done ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Syncing two django applications via cURL

2008-11-13 Thread Kurczak
On 13 Lis, 19:17, "Dj Gilcrease" <[EMAIL PROTECTED]> wrote: > Is there a profound reason you are not using the same DB for all the > sites, and just using django.contrib.sites to keep the content > separated between them? Yes, client's request. --~--~-~--~~~---~--~--

Re: Syncing two django applications via cURL

2008-11-13 Thread Kurczak
On 13 Lis, 19:23, Ryan Nowakowski <[EMAIL PROTECTED]> wrote: > You could create a view that accepts a post that includes the following: >   * admin username (for auth) >   * admin password (for auth) >   * username >   * user password >   * other attrs... > > Then from your admin hooks, you can do

Re: Views triggering twice

2008-11-13 Thread Jeff Gentry
Actually I lied a little bit - a completely blank file doesn't trigger this (I can also seem to put in a and tag), but adding anything else will cause the view to be loaded 2x. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: Read/Create Excel xls files using django

2008-11-13 Thread Kurczak
On 13 Lis, 20:45, dj <[EMAIL PROTECTED]> wrote: > Hello All, > > I am trying to detemine if there is a way to read the data from an > Excel xls file into django. I also need to create an xls file. Does > anyone know how that would be done ? If you have windows hosting you could use COM interface f

Re: Read/Create Excel xls files using django

2008-11-13 Thread Steve Holden
Kurczak wrote: > On 13 Lis, 20:45, dj <[EMAIL PROTECTED]> wrote: > >> Hello All, >> >> I am trying to detemine if there is a way to read the data from an >> Excel xls file into django. I also need to create an xls file. Does >> anyone know how that would be done ? >> > If you have windows

Templates - testing multiple things on IF line

2008-11-13 Thread John M
Does the IF tag allow for OR's or AND's? Thanks John --~--~-~--~~~---~--~~ 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: Problem with named URL and parameters

2008-11-13 Thread Gerard flanagan
Brandon Taylor wrote: > Hi everyone, > > So I have a question/problem with a named URL pattern... > > #urls.py > url(r'^resources/conversions/(?P[-\w]+)/$', > 'my_site.views.conversions', name='conversions'), > > This is a mostly static site, but I would like to be able to pass the > "conversio

Re: Views triggering twice

2008-11-13 Thread Alex Koshelev
How have you noticed that view was triggered twice? On Fri, Nov 14, 2008 at 00:17, Jeff Gentry <[EMAIL PROTECTED]>wrote: > > > Actually I lied a little bit - a completely blank file doesn't trigger > this (I can also seem to put in a and tag), but adding > anything else will cause the view to

Re: Read/Create Excel xls files using django

2008-11-13 Thread m h
On Thu, Nov 13, 2008 at 2:35 PM, Steve Holden <[EMAIL PROTECTED]> wrote: > > Kurczak wrote: >> On 13 Lis, 20:45, dj <[EMAIL PROTECTED]> wrote: >> snip snip > Do you *really* have to create an xls file? If your users just want to > get the data into Excel then creating a csv file is a much easier

Re: Views triggering twice

2008-11-13 Thread Jeff Gentry
> How have you noticed that view was triggered twice? I noticed that the URLs were displaying twice in the devel server console (and in HTTP logs for when running off of apache). For the former case, I put a print statement in the view function - when loading those pages, the print is triggered

Re: Read/Create Excel xls files using django

2008-11-13 Thread Gerard flanagan
Kurczak wrote: > On 13 Lis, 20:45, dj <[EMAIL PROTECTED]> wrote: >> Hello All, >> >> I am trying to detemine if there is a way to read the data from an >> Excel xls file into django. I also need to create an xls file. Does >> anyone know how that would be done ? > If you have windows hosting you c

Re: Views triggering twice

2008-11-13 Thread Jeff Gentry
Another piece of info, in case it's useful here - the page does *not* render on the first view call, it's only after the second call that the page will render. I don't think it's even pulling up the template until the second go-around, as a test I put some intentionally bad template code in a te

Re: Templates - testing multiple things on IF line

2008-11-13 Thread Steve Holden
John M wrote: > Does the IF tag allow for OR's or AND's? > > Yes. You can use one or the other, but not both, IIRC. [Checks documentation]. Yes: "If you need to combine and and or to do advanced logic, just use nested if tags." regards Steve --~--~-~--~~~---~--~-

Book or documentation first

2008-11-13 Thread waltbrad
Which is best to read the Django book, or to read the documentation/ tutorial? I know someone is likely to say both, but which is best to read first? Will one get you and going faster than the other? --~--~-~--~~~---~--~~ You received this message because you ar

Re: Problem with named URL and parameters

2008-11-13 Thread Alex Koshelev
Hmm... Why in template tag you wrote `conversions` as view name but in error traceback there is `my_site.conversions`? On Thu, Nov 13, 2008 at 06:27, Brandon Taylor <[EMAIL PROTECTED]>wrote: > > Hi everyone, > > So I have a question/problem with a named URL pattern... > > #urls.py > url(r'^resou

Re: Book or documentation first

2008-11-13 Thread Russell Keith-Magee
On Fri, Nov 14, 2008 at 7:18 AM, waltbrad <[EMAIL PROTECTED]> wrote: > > Which is best to read the Django book, or to read the documentation/ > tutorial? > > I know someone is likely to say both, but which is best to read > first? Will one get you and going faster than the other? At this point,

Re: Book or documentation first

2008-11-13 Thread [EMAIL PROTECTED]
I'm just starting and I recommend the tutorial first. You can get it done in an hour I think. Also, the book Practical Django Projects is pretty good, if not totally up-to-date. But there is a website that presents all changes you have to make to get it working with the current version. --~--~

Foreign Key with a default key

2008-11-13 Thread Luke Seelenbinder
I'm am trying to make a ForeignKey with a default value. But when I save i get a "invalid literal for int() with base 10: 'Stat object'" error Here is my code: from django.db import models class Stat(models.Model): total = models.IntegerField(default=0) right

Re: General question: Django-Profiles, auth.User and "merging" both data

2008-11-13 Thread Alex S.
I don't know if this is the best way to pre-populate a form, but I changed my view so it takes now a data dictionnary. It works :-) data = { 'first_name':user_obj.first_name, 'last_name':user_obj.last_name, 'gender':profile_obj.gender, 'birthdate':p

Re: Foreign Key with a default key

2008-11-13 Thread Luke Seelenbinder
made a mistake in the c&p the line: definition = models.CharField(max_length='100', default=Stat()) should be: definition = models.CharField(max_length='100',) On Nov 13, 6:35 pm, Luke Seelenbinder <[EMAIL PROTECTED]> wrote: > I'm am trying to make a ForeignKey with a defau

Re: Read/Create Excel xls files using django

2008-11-13 Thread Tim Chase
> I am trying to detemine if there is a way to read the data from an > Excel xls file into django. I also need to create an xls file. Does > anyone know how that would be done ? In addition to the other suggestions on the list, Excel (at least '03, if not other versions) has a "save as XML" form

Re: Read/Create Excel xls files using django

2008-11-13 Thread m h
On Thu, Nov 13, 2008 at 4:54 PM, Tim Chase <[EMAIL PROTECTED]> wrote: > >> I am trying to detemine if there is a way to read the data from an >> Excel xls file into django. I also need to create an xls file. Does >> anyone know how that would be done ? > > In addition to the other suggestions on t

Re: Testing system and alternate template languages

2008-11-13 Thread Erik
Thanks! I'll look into this. If anyone is interested in the outcome I'll submit a patch to the mako_django package I'm using. Drop a reply here if you're interested in the results. On Nov 12, 6:24 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Thu, Nov 13, 2008 at 9:58 AM, Erik <[EM

Re: Foreign Key with a default key

2008-11-13 Thread Steve Holden
Luke Seelenbinder wrote: > I'm am trying to make a ForeignKey with a default value. > But when I save i get a "invalid literal for int() with base 10: 'Stat > object'" error > Here is my code: > > from django.db import models > > class Stat(models.Model): > total = models.Integ

Re: Read/Create Excel xls files using django

2008-11-13 Thread Steve Holden
m h wrote: > On Thu, Nov 13, 2008 at 4:54 PM, Tim Chase > <[EMAIL PROTECTED]> wrote: > >>> I am trying to detemine if there is a way to read the data from an >>> Excel xls file into django. I also need to create an xls file. Does >>> anyone know how that would be done ? >>> >> In additio

Re: TemplateDoesNotExist

2008-11-13 Thread Malcolm Tredinnick
On Thu, 2008-11-13 at 11:12 -0800, sergioh wrote: > > are you using fastcgi? it could be an error on your syspath? The filesystem path in TEMPLATE_DIRS has absolutely nothing to do with Python's import path. These are files that are loaded via os.open() and read(). They aren't Python files at

Re: Read/Create Excel xls files using django

2008-11-13 Thread m h
On Thu, Nov 13, 2008 at 5:21 PM, Steve Holden <[EMAIL PROTECTED]> wrote: > > m h wrote: >> On Thu, Nov 13, 2008 at 4:54 PM, Tim Chase >> <[EMAIL PROTECTED]> wrote: >> I am trying to detemine if there is a way to read the data from an Excel xls file into django. I also need to create an x

Re: Views triggering twice

2008-11-13 Thread Malcolm Tredinnick
On Thu, 2008-11-13 at 17:03 -0500, Jeff Gentry wrote: > > Another piece of info, in case it's useful here - the page does *not* > render on the first view call, it's only after the second call that the > page will render. I don't think it's even pulling up the template until > the second go-aro

Re: Problem with named URL and parameters

2008-11-13 Thread Malcolm Tredinnick
On Fri, 2008-11-14 at 01:20 +0300, Alex Koshelev wrote: > Hmm... Why in template tag you wrote `conversions` as view name but in > error traceback there is `my_site.conversions`? Because the error reporting from URL resolution is retarded. :-( The last thing it tries is . and that's what it rep

Re: Problem with named URL and parameters

2008-11-13 Thread Brandon Taylor
Hi everyone, Gerard's suggestion worked. Moving the pattern into a separate definition fixed it. But, I couldn't explain why :) Many thanks! Brandon On Nov 13, 6:48 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2008-11-14 at 01:20 +0300, Alex Koshelev wrote: > > Hmm... Why in temp

Exclude fields in form by language

2008-11-13 Thread Brandon Taylor
Hi everyone, I'm doing an internationalization project and have a form with fields that need to be localized. I would like to have one form, pass in the language code and exclude the appropriate fields. How would I go about passing in the variable to the form? I know I have to pick it up in the

Re: Testing system and alternate template languages

2008-11-13 Thread Erik
In case there are others following this topic, I have the test system working. I ended up putting a couple of functions in the contrib folder of my django installation under the mako_django folder. The functions emulate the behavior of the instrumented_test_render and run_tests functions from dj

Re: Read/Create Excel xls files using django

2008-11-13 Thread Tim Chase
>> [my stuff about using XML templates with Excel] > Not trying to start a flame war, but pyexcelerator/xlwt support these > as well... No flame-war perceived...just sharing the hack I've used that doesn't involve much more complexity than a prefab template and Django's built-in templating. [S

Re: Problem with named URL and parameters

2008-11-13 Thread Malcolm Tredinnick
On Thu, 2008-11-13 at 17:06 -0800, Brandon Taylor wrote: > Hi everyone, > > Gerard's suggestion worked. Moving the pattern into a separate > definition fixed it. But, I couldn't explain why :) Then there's some kind of bug there. :-( Malcolm --~--~-~--~~~---~--~-

Re: Exclude fields in form by language

2008-11-13 Thread Malcolm Tredinnick
On Thu, 2008-11-13 at 18:06 -0800, Brandon Taylor wrote: > Hi everyone, > > I'm doing an internationalization project and have a form with fields > that need to be localized. I would like to have one form, pass in the > language code and exclude the appropriate fields. > > How would I go about

Re: Setting Up Django on Vista and Creating a Database

2008-11-13 Thread John Antony
Thank you Karen and Marcelo, I had actually not set the path for "django-admin.py". To set the Windows PATH in Vista click the following: Start>Control Panel>System>Advanced System Settings>Advanced>Environment Variable On Nov 13, 9:59 pm, Danny R <[EMAIL PROTECTED]> wrote: > John, > > Setting t

Re: Exclude fields in form by language

2008-11-13 Thread Brandon Taylor
Hi Malcom, This is what I have so far, but is not working... #forms.py class CreditApplicationForm(forms.Form): def __init__(language_code, *args, **kwargs): super(CreditApplicationForm, self).__init__(*args, **kwargs) class Meta(): #trying to call self.language_code her

Re: Exclude fields in form by language

2008-11-13 Thread Malcolm Tredinnick
On Thu, 2008-11-13 at 20:36 -0800, Brandon Taylor wrote: > Hi Malcom, > > This is what I have so far, but is not working... > > #forms.py > class CreditApplicationForm(forms.Form): > def __init__(language_code, *args, **kwargs): > super(CreditApplicationForm, self).__init__(*args, *

Re: Exclude fields in form by language

2008-11-13 Thread Brandon Taylor
Thanks Malcom, I'll give that a shot. Cheers, Brandon On Nov 13, 10:47 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-11-13 at 20:36 -0800, Brandon Taylor wrote: > > Hi Malcom, > > > This is what I have so far, but is not working... > > > #forms.py > > class CreditApplicationFo

Re: Apache Segmentation Fault on succesful authentication

2008-11-13 Thread Graham Dumpleton
Did you do a 'ls -L' on the symlink to validate it pointed at something? The relative location of where the .so will be is more a hint as for different systems it may not be in same relative location. Graham On Nov 13, 10:44 pm, huw_at1 <[EMAIL PROTECTED]> wrote: > My apologies. I forgot to men

Re: Testing system and alternate template languages

2008-11-13 Thread Russell Keith-Magee
On Fri, Nov 14, 2008 at 12:13 PM, Erik <[EMAIL PROTECTED]> wrote: > > In case there are others following this topic, I have the test system > working. I ended up putting a couple of functions in the contrib > folder of my django installation under the mako_django folder. The > functions emulate

Waiting List App

2008-11-13 Thread Keyton Weissinger
I need a waiting list application in which a site's functionality hasn't come online yet and I want to gather email addresses of folks interested in hearing when we go live. I know that building such as application would be almost trivial, but in the interest of reuse, I thought I'd ask if anyone