Re: dynamical "by" argument in regroup syntax?

2007-05-20 Thread frnc
ok, I completely missed to note that there is a tutorial named "template language for python programmers" with a section "extending the template system" that goes through the matter. Maybe later on an update. thanks --~--~-~--~~~---~--~~ You received this message

Re: Can I prepopulate a SlugField with a ForeignKey?

2007-05-20 Thread John-Scott
It's been a while since I've used Django (trying to get back into it), but unless the API has changed dramatically since then, you should be able to do something like: def __str__(self): return 'Color: %s, Size: %s, Price: %s' % (self.color, self.size, self.price) Of course, change the

Re: I'm not sure how to write this database command in django... any thoughts?

2007-05-20 Thread Kelvin Nicholson
Roboto wrote: > Tables exist =P > Yay. > Here is where I am at now.. and my error > [snip] > > TypeError: iteration over non-sequence > This likely means your user_list is empty, I think. So, double check that your first filter (putting the objects into user_list) actually returns

Re: I'm not sure how to write this database command in django... any thoughts?

2007-05-20 Thread Roboto
Tables exist =P Here is where I am at now.. and my error user_list = Access.objects.filter(team = team_profile).exclude(status = "NON") roster = user_list.extra( select={ 'first_name': 'SELECT first_name FROM login_personal WHERE

Re: I'm not sure how to write this database command in django... any thoughts?

2007-05-20 Thread Roboto
.. I was thinking about this for the LONGEST time. I get it now finally. It would be login_personal Thanks On May 20, 3:30 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun, 2007-05-20 at 19:22 +, Roboto wrote: > > This is what I'm currently runnign with now... > > >

Can I prepopulate a SlugField with a ForeignKey?

2007-05-20 Thread Greg
I have the following model class sdetails(models.Model): color = models.ForeignKey(color) size = models.ForeignKey(size) price = models.ForeignKey(price) theslug = models.SlugField(prepopulate_from=("color", "size", "price")) class Admin:

Re: I'm not sure how to write this database command in django... any thoughts?

2007-05-20 Thread [EMAIL PROTECTED]
Also a dumb question. Did you syncdb after you created your models? The table may not actually exist yet. You might have to create it by hand of you have already created the model and validated then synced. Make sense? On May 20, 12:30 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sun,

Re: How to Display 2 items of an Object

2007-05-20 Thread Kelvin Nicholson
robo wrote: > I assume you guys also know python. If so, I wish to get some help > with this implementation: > What I want to return is a new variable each time through the for > loop: > If I am understanding this correctly, take a look at setattr() You would have to do something like this, I

Re: Decimal fields have landed on trunk: rename your FloatFields

2007-05-20 Thread Chris Moffitt
This is great news. Thanks for all your work in getting this done! -Chris --~--~-~--~~~---~--~~ 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

Decimal fields have landed on trunk: rename your FloatFields

2007-05-20 Thread Malcolm Tredinnick
I don't want to get into the habit of announcing every single change to trunk, but let's make a pre-emptive strike, just this once... If you use FloatField in your models and follow trunk, you are really, really going to want to read the BackwardsIncompatibleChanges page in the wiki before using

Re: Scheduler proposal

2007-05-20 Thread James Bennett
On 5/20/07, Marc Fargas Esteve <[EMAIL PROTECTED]> wrote: > Both cases are really really bad depending on what you are trying to achieve. > > You could simply run a cronjob that dispatches different signals like: > "hourly_signal", "daily_signal" and listen for them anywhere. The idea of some

Can be usefull

2007-05-20 Thread ujikol
see here http://wittylink.com/977321 --~--~-~--~~~---~--~~ 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

Re: Django Book

2007-05-20 Thread Dave Lists
Amazon.co.uk now says August 23rd :-) Any idea on when we might see a release? Dave. [EMAIL PROTECTED] wrote: > I wouldn't expect that date at all. > > On Mar 14, 12:52 pm, "Derek Lee-Wo" <[EMAIL PROTECTED]> wrote: >> Amazon shows that the book on Django will be published on March 26th >>

Re: Adding attibutes to models via mixins

2007-05-20 Thread Malcolm Tredinnick
On Sun, 2007-05-20 at 21:32 +0200, Marek Kubica wrote: > Hi all! > > I've got a normal model and I would like to add additional functionality > via a mixin-class. This works quite well, until I tried to modify some of > the attributes of the model from my mixin. > > I've got two fields which

Scheduler proposal

2007-05-20 Thread Andi Albrecht
Hi, while developing a small application I had to implement some scheduled tasks like sending notification mails (hourly, daily and weekly) and gathering some information from around the web (every two hours). I've searched for deploying these tasks and came across the cron jobs solution. It

Adding attibutes to models via mixins

2007-05-20 Thread Marek Kubica
Hi all! I've got a normal model and I would like to add additional functionality via a mixin-class. This works quite well, until I tried to modify some of the attributes of the model from my mixin. I've got two fields which both fail to be set, but in different ways: - setting 'objects' to a

Re: I'm not sure how to write this database command in django... any thoughts?

2007-05-20 Thread Malcolm Tredinnick
On Sun, 2007-05-20 at 19:22 +, Roboto wrote: > This is what I'm currently runnign with now... > >user_list = Access.objects.filter(team = > team_profile).exclude(status = "NON") > roster = user_list.extra( > select={ > 'first_name': 'SELECT

"Legitimate" Online Paid Survey Scams Revealed Part 1

2007-05-20 Thread Moona Naeem
"Legitimate" Online Paid Survey Scams Revealed Part 1 Are you looking for scam-free and legitimate online paid surveys, free membership online paid survey, fact honest paid survey or market online paid research survey? http://2site.com/hqmdca Paypal to RM - Withdraw your money from

Re: I'm not sure how to write this database command in django... any thoughts?

2007-05-20 Thread Roboto
This is what I'm currently runnign with now... user_list = Access.objects.filter(team = team_profile).exclude(status = "NON") roster = user_list.extra( select={ 'first_name': 'SELECT first_name FROM Personal WHERE user = user_list.user'

Re: Need help correctly using Join's (ForeignKey, ManyToManyField) in my admin

2007-05-20 Thread Malcolm Tredinnick
On Sun, 2007-05-20 at 11:34 -0700, Greg wrote: > Malcolm, > Ok, I've modified my models.py with the following code > > class sdetails(models.Model): > color = models.ForeignKey(color) > size = models.ForeignKey(size) > price = models.ForeignKey(price) > > class

I'm not sure how to write this database command in django... any thoughts?

2007-05-20 Thread Roboto
Hey all, I've got some issues writing this query out, so maybe I can get some help I have 4 tables: User (default from django) Profile (foreign key is User) Access (foreign Key is User and Team) Team I want make a roster for each team, so I would do the following "select * from access where

Re: Need help correctly using Join's (ForeignKey, ManyToManyField) in my admin

2007-05-20 Thread Greg
Malcolm, Ok, I've modified my models.py with the following code class sdetails(models.Model): color = models.ForeignKey(color) size = models.ForeignKey(size) price = models.ForeignKey(price) class style(models.Model): name = models.CharField(maxlength=100)

Re: One, maybe two small bugs.

2007-05-20 Thread Ben Jones
> > def save(self): > > if not self.id: > > super(Entry, self).save() # to get the Id > > self.divisions.add(self.mainDivision) > > super(Entry, self).save() # annoying double save... > > > > If I apply 'save' to all instances of Entry in the shell, the > > relationship is

Re: Need help correctly using Join's (ForeignKey, ManyToManyField) in my admin

2007-05-20 Thread Malcolm Tredinnick
On Sun, 2007-05-20 at 10:03 -0700, Greg wrote: > Hello, > I am trying to create a Django website where I sell area rugs. I'm > starting the process of creating the structure of my site, but am > having problems creating my admin correctly. Each area rug that I > sell has a list of sizes (with a

Need help correctly using Join's (ForeignKey, ManyToManyField) in my admin

2007-05-20 Thread Greg
Hello, I am trying to create a Django website where I sell area rugs. I'm starting the process of creating the structure of my site, but am having problems creating my admin correctly. Each area rug that I sell has a list of sizes (with a price associated with each size). I can't seem to

Re: how to get a list of all installed applications

2007-05-20 Thread Malcolm Tredinnick
On Sun, 2007-05-20 at 18:44 +0200, Stefan Foulis[spiderware gmbh] wrote: [...] > I've used django.db.models.get_apps() to get all the models for all > installed applications before. Is there a similar method somewhere in > django to get all the installed applications. Have a look in

how to get a list of all installed applications

2007-05-20 Thread Stefan Foulis [spiderware gmbh]
I'm working on a little Navigation/Sitemap-ish application that will provide a way to define the sitemap similar to urls.py, but with way more options. based on that data the application will automatically create the necessary urlpatterns und provide a facility to make nice navigations

Re: Business Application

2007-05-20 Thread Tim Chase
> Thanks on those comments. I don't know python and neither > ruby, my question is is python hard to learn of a guy who has > pascal As a former Pascal coder, it was a hard transition to go from a truly strongly-typed language (none of this wishy-washy pseudo-strong-typed stuff of C or C++, but

Re: trouble using fastcgi

2007-05-20 Thread jordi.f
Any reason for not using Django's built-in fastcgi server? $ ./manage.py runfcgi host=127.0.0.1 port=3033 It's explained in the docs, http://www.djangoproject.com/documentation/fastcgi/ --~--~-~--~~~---~--~~ You received this message because you are

Re: Business Application

2007-05-20 Thread Christian M Hoeppner
> Thanks on those comments. I don't know python and neither ruby, my > question is is python hard to learn of a guy who has pascal > background. The only advantage I know for python over ruby is speed. I > have heard people saying ruby on rails is a full stack web application > framework, is this

Re: Business Application

2007-05-20 Thread james_027
Hi Tim On May 20, 8:21 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > I am seeking for some information, guidelines for me to choose the > > right framework for me. I am choosing between code igniter, django, & > > rails. So far my concerns with django is that I have read somewhere > > else that

Re: tests: best pactices help

2007-05-20 Thread Russell Keith-Magee
On 5/20/07, Sandro Dentella <[EMAIL PROTECTED]> wrote: > > Hi again!, > > some "easy" questions to use tests in the best way. > > 1. 'manage.py test' finds unittest in tests.py *and* models.py. It doesn't > seem to find docstring other that in tests.py. I pasted the Animal > example

Re: Business Application

2007-05-20 Thread Tim Chase
> I am seeking for some information, guidelines for me to choose the > right framework for me. I am choosing between code igniter, django, & > rails. So far my concerns with django is that I have read somewhere > else that says django is much appropriate for web publishing type of > web site but

dynamical "by" argument in regroup syntax?

2007-05-20 Thread frnc
Hi everybody, I'm writing my first app with Django (quite a newbie with python too) and I stumbled onto the following problem: I have a template which has to regroup a object_list by a field that the user has determined by choosing it in a tag of a form. So, what I pass via extra_context to the

Re: Limiting SQL queries in a custom manager method

2007-05-20 Thread Olivier Guilyardi
Jeremy Dunck wrote: > On 5/18/07, Olivier Guilyardi <[EMAIL PROTECTED]> wrote: > ... >> Okay, so I suppose a workaround is to pass offset and length as arguments to >> my_query() >> > ... >> I suppose I may also try to extend the QuerySet class to add my own method. >> But >> this might get

[OT] allurstuff

2007-05-20 Thread Derek Anderson
well, my first real django app is now online! http://allurstuff.com/ it's kind of like craigslist, but with maps. sorry to tout my own warez, but, you know, proud father syndrome and all :) derek --~--~-~--~~~---~--~~ You received this message because

tests: best pactices help

2007-05-20 Thread Sandro Dentella
Hi again!, some "easy" questions to use tests in the best way. 1. 'manage.py test' finds unittest in tests.py *and* models.py. It doesn't seem to find docstring other that in tests.py. I pasted the Animal example in a model but no test was run till I put it into tests.py. Am

Re: tests: one failure --> all test declared failed

2007-05-20 Thread Sandro Dentella
Solved, I apologize, url.py is correct, and the way to make a bad url was by introducing a 'raise TypeError' in the view, but I used -w/o realizing- that same view for login: stupid me! This is another good point to move to the new syntax for client.login()... but I didn't want to before I

Re: Setting up my application

2007-05-20 Thread Duc Nguyen
Just put those other one urls before the catch-all, for example: ... (r'^aboutus/', 'views.aboutus'), (r'^history/', 'views.history'), (r'^contactinfo/', 'views.contactinfo'), (r'(?P\w+)/', 'views.whatever), ... Greg wrote: > Duc, > Because sometimes the word will be be a manufacturer. Some

Re: Setting up my application

2007-05-20 Thread Greg
Duc, Because sometimes the word will be be a manufacturer. Some example possible url's of my site could be: www.mysites.com/milliken/ www.mysites.com/mohawk/ www.mysites.com/aboutus/ www.mysites.com/history/ www.mysites.com/contactinfo/ So sometimes it wouldn't be a manufacturer. How would I

Re: My Learning Path

2007-05-20 Thread chell
Thanks, I'll definitely check it out! On 19 Mai, 15:10, "Todd O'Bryan" <[EMAIL PROTECTED]> wrote: > Check out How to Think Like a Computer Scientist (Python version). It's > an intro CS text, so it may be a little basic, but it does a very good > job of introducing all of the important Python

Re: How to Display 2 items of an Object

2007-05-20 Thread robo
I assume you guys also know python. If so, I wish to get some help with this implementation: What I want to return is a new variable each time through the for loop: catQuantity = len(categoryList) for x in catQuantity: cat(x) = get_object_or_404(Category, cat_order=x) return cat(x)

Business Application

2007-05-20 Thread james_027
Hi, I am seeking for some information, guidelines for me to choose the right framework for me. I am choosing between code igniter, django, & rails. So far my concerns with django is that I have read somewhere else that says django is much appropriate for web publishing type of web site but I am