Re: Using "setup.py bdist_rpm" to create Fedora Core 5 RPMs

2006-11-13 Thread stava
DeWitt wrote: > Hi, > > I am wondering if anyone has successfully used "setup.py bdist_rpm" to > create a Django RPM. > > I have tried using both the 0.95 release and the SVN head release, but > in both cases the RPM build process fails on RedHat Fedora Core 5, > seemingly on the bytecompiled .pyo

Re: Using "setup.py bdist_rpm" to create Fedora Core 5 RPMs

2006-11-13 Thread stava
not, file a ticket and let us know and we will fix the problem, whatever it might be. /Lars > I'll start digging in to bdist_rpm unless anyone has some experience > here and wants to point me in the right direction. > > -DeWitt > > > On Nov 13, 9:37 am, "stava"

Re: Using "setup.py bdist_rpm" to create Fedora Core 5 RPMs

2006-11-13 Thread stava
we do the same. You'll be grateful for that decision when it comes to upgrade time:) R/Lars > On Nov 13, 11:23 am, "stava" <[EMAIL PROTECTED]> wrote: > > DeWitt wrote: > > > Great, this looks like it would work. Thanks so much! > > > >

dynamic choices

2005-10-17 Thread stava
ime.auth_users' doesn't exist") However, if I comment out the 'choices' part of the 'manager' definition in the Department class, it works like a charm. Then I can uncomment the 'choices' and everything works as expected. Please advice anyone? Is there a better way to implement dynamic choices? /stava

Re: dynamic choices

2005-10-20 Thread stava
stava wrote: > I'm having a bit of a problem with dynamic choices. I'm working on a > simple timesheet system where I've extended the auth.users with a > couple of fields including something I call "primary group": > > def getUsers(group = None): > u

import error

2005-10-20 Thread stava
I'm trying to import a simple utils.py from the toplevel of my application, i.e. from ttime.utils import * All I get from djangoadmin.py runserver is: "ImportError: No module named utils". The utils.py is there, but the django server can't seem to find it, I suspect this is a true newbie questi

templates for newbies

2005-10-22 Thread stava
Hi all, I've started to play around with django just a few weeks ago. I'm a newbie at python and, of course, django, but I have some experience with database systems, especially RDBMSs. It seems to me that django (together with python) represents the solution to what they tried to do with the 4GL

Re: templates for newbies

2005-10-22 Thread stava
Adrian, thanks for your reply. Yes, I'm really interested, mostly because I'm a newbie and want to learn, but secondly, I feel that the admin interface is user friendly, with the type of colors and messages, and overall handling that gives an intuitive interface, and I really would like to get th

Re: templates for newbies

2005-10-23 Thread stava
Adrian Holovaty wrote: > On 10/22/05, stava <[EMAIL PROTECTED]> wrote: > > Do you have a similar trick for the object list view? > > Sure! To view the automatically-generated template for the object list > view, find the line "t = > loader.get_template_from_stri

Re: templates for newbies

2005-10-23 Thread stava
Adrian Holovaty wrote: > On 10/22/05, stava <[EMAIL PROTECTED]> wrote: > > Do you have a similar trick for the object list view? > > Sure! To view the automatically-generated template for the object list > view, find the line "t = > loader.get_template_from_stri

auth_messages

2005-10-24 Thread stava
Does anyone now how the auth_messages table is used? Presumably for sending messages to the user(s). But how? R /LarS

Re: templates for newbies

2005-10-25 Thread stava
I'm logging the solution here, in case someone else needs this: The correct statement is: return HttpResponse(''.join(raw_template), mimetype='text/plain') I.e., the raw_template variable is actually a list of strings, and has to be translated into one simple string in order for HttpResponse()

strange values in ManyToManyField

2005-10-27 Thread stava
urn "%s" % self.subproject The admin seems to work fine for both objects. However, when I play with the objects it looks really strange: Python 2.3.4 (#1, Feb 7 2005, 15:50:45) [GCC 3.3.4 (pre 3.3.5 20040809)] on linux2 >>> from django.models.ttime import * >>> auth.user

pre_save problem

2005-11-01 Thread stava
In a foreign key relationsship (like Polls and Choices in the tutorial), the _pre_save() definition tries to retrieve the subordinate ("choices") items from the database. I really would like to get hold of the subordinate items prior to being saved to database (well, it's called pre_save, right?)

post_save problem

2005-11-01 Thread stava
In a foreign key relationship, the main objects pre_save() and post_save() both get performed prior to the subordinate object's pre and post save, e.g.: poll._pre_save() poll._post_save() choice._pre_save() choice._post_save() choice._pre_save() choice._post_save() Is this intentional? I would

Re: pre_save problem

2005-11-01 Thread stava
OK, thanks.

Re: post_save problem

2005-11-01 Thread stava
OK, thanks, that cleared things up.

foreign key lookup problem

2005-11-01 Thread stava
I have difficulties using field lookups on foreign keys. I'm trying to retrieve a list of items with a specific state using the following model: class State(meta.Model): state = meta.CharField(maxlength = 12, primary_key = True) class Item(meta.Model): wdate = meta.DateField() state = meta

Re: foreign key lookup problem

2005-11-01 Thread stava
God you're quick, I just posted this. Just tested it and it works fine now. Another alternative I tried out in the meantime was to change the definition of State taking out the "primary_key = True". That worked fine as well. Thanks a bunch! /LarS

runserver problem

2005-11-03 Thread stava
the application seems to work OK and nothing bad seems to happen. However, it's a bit worrying. Any hints, anyone? /stava

Re: runserver problem

2005-11-03 Thread stava
OK, not scared anymore, thanks. /stava

model for database view

2005-11-03 Thread stava
I'm thinking of using a model for a database view (for convinience). Is there anyway one could set anything int the META of a model to tell it *not* to create a database table when doing a "django-admin sqlreset", or do I have to manually filter out the "create table..." statement? /stava

Re: model for database view

2005-11-04 Thread stava
Yeah, the meta.AbstractModel seems to come in handy. In the mean time, I'll do it manually. Thanks! stava

templates for CSV

2005-11-11 Thread stava
Hi all, in the template doco there's some mentioning of other formats than HTML, e.g. CSV and email. Has anyone tried to use the django template framework for producing CSV files or emails? Does anyone know how that could be done? R /stava

Re: templates for CSV

2005-11-11 Thread stava
Many thanks! /stava

admin/base_site.html

2005-11-16 Thread stava
Hi all, does anyone now how to use the {% block nav-global %} tag in admin/base_site.html? I'm looking to get a nice main menu bar kinda' thing like on the django site, but I'm not experienced (clever) enough to figure it out. /stava

Re: admin/base_site.html

2005-11-16 Thread stava
Thanks! /stava

Re: admin/base_site.html

2005-11-17 Thread stava
Thanks a million, this is what I was looking for. Cheers /stava

new password(s)

2005-11-24 Thread stava
Hi all, can't seem to get my application user's passwords working properly after the last changes to the password algorithm. User's with old md5 passwords can login once, but after that their passwords don't work anymore. What gives? Also, is there anyway of using mysql to create the new passwor

Re: genric views or formfields/manipulators?

2005-11-24 Thread stava
I had much the same problem and solved it using views and forms in the following way: create a template were, for example, the first part is a form with selection items like start date, end date (providing a date range), etc. Then, when the user POST's this form via a submit button, capture the s

Re: new password(s)

2005-11-25 Thread stava
Well, I'm using new-admin, and I've extended the auth.user class: class User(auth.User): primary_group = meta.ForeignKey(auth.Group, default = 1, verbose_name = 'primary group') new_password = meta.CharField(maxlength = 40, blank = True) fullname = meta.CharField(m

Re: new password(s)

2005-11-25 Thread stava
I've tried it with trunk, same result.

Re: new password(s)

2005-11-25 Thread stava
Trying, trying... 1) from django.models.ttime import * u = User('stava', 'Lars', 'Stavholm', '[EMAIL PROTECTED]', 'password', True, True, '2005-11-25', '2005-11-25') u.save() Traceback (most recent call last): File &

Re: new password(s)

2005-11-25 Thread stava
I've removed my subclassing alltogether, it all seems to work fine know, I can login and logout and log back in again as expected.

subclassing auth.users

2005-11-25 Thread stava
Has anyone successfully extended the auth.users class by subclassing it? If so, how?

Re: ANN: new-admin branch merged to trunk

2005-11-25 Thread stava
I just had to join in the praise: brilliant work guys! /LarS

Re: genric views or formfields/manipulators?

2005-11-25 Thread stava
Yes, of course, should have read the question properly. Anyhow, I haven't found a readymade generic view to do the job for me so here's the sample I use: -- view: @login_required def projects(request): """Get list of projects and project details for logg

mod_python log

2005-11-25 Thread stava
Has anyone been able to capture the output from "DEBUG = True" when using mod_python? I would have expected it to show up in the apache log, but it didn't. Cheers /LarS

Re: mod_python log

2005-11-27 Thread stava
Yup, that's great, thank you. But what I'm really looking for is DEBUG capabilities when using mod_python, i.e. I would like to be able to see my print statements embedded in "if DEBUG:" and especially the db queries timings (which are available somehow?). I do most of the debugging using the dja

Re: A question

2005-11-27 Thread stava
Well, being a newbie, I'm not sure of the best way to do this, but here's one solution I use myself: the view (.../views/reports.py): from django.views.decorators.auth import login_required @login_required def index(request): return render_to_response('ttime/reports', {'title' : 'Reports'}) fr

generic views + new admin templates

2005-11-27 Thread stava
I'm trying to use generic views together with the newly separated admin templates, but it's failing miserably. I specify the generic view I want to use in url.py: countries = { 'app_label': 'ttime', 'module_name': 'countries', } urlpatterns = patterns('', (r'^countries/$', 'django.views

Re: generic views + new admin templates

2005-11-27 Thread stava
I just don't get it (newbie:). Isn't there a way of using generic views together with the recently separated admin templates? In order to learn/understand: I'm taking a small part of my model, the Country() class with two fields (country_code and country_name); I copy the appropriate templates (ch

Re: mod_python log

2005-11-27 Thread stava
OK, I see, thanks Adrian! /L

Re: mod_python log

2005-11-27 Thread stava
Well, thanks for the input, couldn't get it to work though. I put a few "print >> sys.stderr..." in there, shows up as per usual when running the django server, but they don't show up anywhere in the apache logs. Maybe there's some httpd.conf dependency, I'm running SuSE 9.3 with minimal tweaks. /

Re: "Please correct the errors below." is displayed without actual errors

2005-11-27 Thread stava
Wouldn't "ediatble=False" on a required field give this error?

Re: mod_python log

2005-11-28 Thread stava
Yup, that took care of it, thanks! /LarS

Re: php, mod_python postgresql conflict?

2005-12-19 Thread stava
My two-cents worth: I've used mod_php and mod_python together (accessing mysql) successfully for a good while on a SuSE 9.3 platform (right out of the box setup, no fiddling). R /LarS

Re: Admin functionality available on public site

2006-01-20 Thread stava
Well, I'm interested too, and apparently "You can do that", so: details? R/LarS

Re: How to draw line charts in Django?

2011-05-05 Thread stava
On Thu, 05 May 2011 13:14:57 +0530, Kenneth Gonsalves wrote: On Thu, 2011-05-05 at 00:28 -0700, Nge wrote: I want to know. How can I create line charts in Django? Then I have to take data from postgresql for x-axis and y-axis. So how should I do? How can apply django, postgres, graph and ajax?