Re: dumpdata doesn't seem to respect database routers

2010-04-08 Thread Russell Keith-Magee
On Fri, Apr 9, 2010 at 2:34 AM, wizard_2 wrote: > Hi everyone, > Mange dumpdata seems to be ignoring my database router and failing on > a model thats in a different db. > > I have two databases, default (mysql db named knothedashboard) and > bluecherry (mssql database named dataKNOT). Here's my r

Re: Request to the list owner

2010-04-11 Thread Russell Keith-Magee
On Mon, Apr 12, 2010 at 1:58 PM, Omer Barlas wrote: > Can you please add a prefix to the email subject? I am reading my mail > mostly from my BB Bold, but I cannot filter mail like Thunderbird > does, it would be much simpler if there was a prefix like [django] or > such. No. This has been propo

Re: manage.py loaddata silently fails

2010-04-12 Thread Russell Keith-Magee
On Tue, Apr 13, 2010 at 2:14 AM, Phlip wrote: >> How do I access the error message? > > In this case, turning on --verbosity=2 reveals a huge dump, and > tweezering through it reveals the fixture file was not found. (A > colleague bumped its app from the app list.) > > It seems that "fixture not f

Re: form_for_model, DecimalFIeld, and decimal_places

2007-06-05 Thread Russell Keith-Magee
On 6/6/07, ringemup <[EMAIL PROTECTED]> wrote: > > Hello again -- > > I'm creating a form using form_for_model. The model in question has a > decimal field with 2 decimal places. The form, however, is displaying > the field with one decimal place. I've googled and poked through the > tests, but

Re: Form input to csv + file upload

2007-06-05 Thread Russell Keith-Magee
On 6/6/07, Vincent Nijs <[EMAIL PROTECTED]> wrote: > > Question: If I want to save the file to a directory and information about > the submitter (e.g., name and time of submission) directly to a csv file, > how would I do that in Django? Do you need 'newforms' to do that? In the > documentation it

Re: form_for_model, DecimalFIeld, and decimal_places

2007-06-05 Thread Russell Keith-Magee
On 6/6/07, ringemup <[EMAIL PROTECTED]> wrote: > > > 1) This sounds like it could be a bug. If your model defines 2 decimal > > places, my initial reaction is that the form should show 2 decimal > > places by default. > > Well, I figured that with currency being such a common use, if it were > a b

Re: yearless date

2007-06-05 Thread Russell Keith-Magee
On 6/6/07, dailer <[EMAIL PROTECTED]> wrote: > > looking for ideas on the best way to handle this. I have a need to set > up date ranges not tied to a particular year, like Jan 1 - Feb 12. I > like that the admin interface provides a date selector so I'm tempted > to just use a DateField and ignor

Re: QuerySet Question - Selecting a Single Field

2007-06-05 Thread Russell Keith-Magee
On 6/6/07, Bryan Veloso <[EMAIL PROTECTED]> wrote: > > Alright, new problem for you guys. Here's an example model in an app > called "scores", which contains all the scores for a particular > player: > > # Baseball > baseball= models.PositiveIntegerField('Baseball Skill > Level', b

Re: QuerySet Question - Selecting a Single Field

2007-06-05 Thread Russell Keith-Magee
On 6/6/07, Bryan Veloso <[EMAIL PROTECTED]> wrote: > > > Score.objects.order_by('-baseball') > > > > will return all the objects in reverse order. > > Does this only grab the baseball scores? Or grabs all of them and THEN > sorts them by score? > (Just for future reference.) This will grab _all_

Re: Form input to csv + file upload

2007-06-05 Thread Russell Keith-Magee
On 6/6/07, Vincent Nijs <[EMAIL PROTECTED]> wrote: > > I have been searching for examples but everything that I see has a link to a > database. How to you 'get' the data from a form in django? What is the > equivalent of 'data = cgi.FieldStorage(keep_blank_values=1)' I would use > with a Python cg

Re: QuerySet Question - Selecting a Single Field

2007-06-05 Thread Russell Keith-Magee
On 6/6/07, Bryan Veloso <[EMAIL PROTECTED]> wrote: > > > This will grab _all_ score objects, and sort them by baseball score. > > If there isn't a baseball score, then 'baseball' will have a value of > > None, which is still a sortable value. > > Alright, so just to be safe, I really shouldn't be

Re: Page 404 is getting old fast

2007-06-06 Thread Russell Keith-Magee
On 6/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Request URL:http://localhost:8000/biz/article/ > > Using the URLconf defined in mygration.urls, Django tried these URL > patterns, in this order: > >1. ^admin/ >2. ^entrys/ >3. ^articles/ >4. ^address/ > > The current

Re: inheriting a models.Model inherited class

2007-06-06 Thread Russell Keith-Magee
On 6/6/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Advice? Model inheritance is a planned, but not-yet-implemented feature. Watch this space! http://code.djangoproject.com/wiki/ModelInheritance However, there is a workaround, using OneToOneFields. http://www.djangoproject.com/document

Re: GenericRelation support in GeoDjango

2007-06-06 Thread Russell Keith-Magee
On 6/7/07, Brian Luft <[EMAIL PROTECTED]> wrote: > > Does anyone have any information about whether this is just a to do or > if there are deeper underlying issues that need to be addressed within > the gis branch to bring this in? Caveat: I haven't been keeping a close eye on the GIS stream. Ge

Re: Uploading Image, Marking a Field as True

2007-06-06 Thread Russell Keith-Magee
On 6/6/07, Bryan Veloso <[EMAIL PROTECTED]> wrote: > > Alright, example model: > > # Baseball > baseball = models.PositiveIntegerField('Baseball Skill Level', > blank=True, null=True, maxlength=4) > baseball_approved = models.BooleanField('Approved', default=False) > baseball_proof = models.ImageF

Re: Is composite primary key possible?

2007-06-06 Thread Russell Keith-Magee
On 6/7/07, Lars Stavholm <[EMAIL PROTECTED]> wrote: > > And then I hit a snag: there's one table that uses a composite > primary key made up of three fields. (the attachment table in trac.db) > > I've scanned the doco and I've googled, this is what I came up with: > > o define one of the fields as

Re: Newforms: Override FileField save method

2007-06-06 Thread Russell Keith-Magee
On 6/7/07, grahamu <[EMAIL PROTECTED]> wrote: > > Does anyone here know where/how I should override the default save > method for a newforms-based FileField? It looks like you're looking for the functionality requested in ticket #3297. The patch that is there works, but probably won't be accepted

Re: Data versioning (staging)

2007-06-06 Thread Russell Keith-Magee
On 6/6/07, oggie rob <[EMAIL PROTECTED]> wrote: > > Hi all, > I have some models and need to add the capability of versioning the > data. Basically for each object that represents a page, I want to have > a "running" version and an "editing" version of the same page, so that > users can see the "a

Re: DBMigrations - an library/tool for database evolution

2007-06-06 Thread Russell Keith-Magee
On 6/6/07, Marinho Brandao <[EMAIL PROTECTED]> wrote: > > Hello all, > > first, my english is not *fantastic", forgive em some wrong phrase :) No need to apologise. Your English is much better than my (I'm guessing here) Portuguese. :-) > I've created at last days a project called DBMigrations [

Re: Login Right After Creating a New User

2007-06-06 Thread Russell Keith-Magee
On 6/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi Everyone, > I'm trying out django and it's been really easy getting the auth > library up and running. I hit an issue where I want to login a new > user right after they've registered and take them to their profile > page. > > I tr

Re: Adding a group, and users to that group

2007-06-06 Thread Russell Keith-Magee
On 6/7/07, Vincent Nijs <[EMAIL PROTECTED]> wrote: > > TypeError: create() takes exactly 1 argument (2 given) > > Any ideas? Calling g = Group.objects.create("section81") is the same as calling Group("section81") This yeilds an error because there is no way of knowing which model field the str

Re: Newforms: Override FileField save method

2007-06-06 Thread Russell Keith-Magee
On 6/7/07, grahamu <[EMAIL PROTECTED]> wrote: > > Russ, > Perhaps you are correct. I am using 5335 patched with #3297, but guess > I just don't know how to code (or name?) the necessary method. You shouldn't need to code or name anything. When you save the form, the file should be saved into the

Re: Many to many in template question

2007-06-07 Thread Russell Keith-Magee
On 6/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > That's what I thought, too, but I can't seem to access it. Maybe I > need to just write a custom view for this page. Based on what you've said so far, you shouldn't need to write a new view. You just need to reference the m2m data correc

Re: Taking a patch

2007-06-07 Thread Russell Keith-Magee
On 6/7/07, brian corrigan <[EMAIL PROTECTED]> wrote: > > Hey all, > > I am looking to take in the patches for ticket #399 (BigInt field). I > am not sure how to do this though. There is an original patch.txt > followed by a couple of .diff files. Are the .diff files the > difference between the or

Re: Simple Template Dict Problem

2007-06-07 Thread Russell Keith-Magee
On 6/7/07, Trey <[EMAIL PROTECTED]> wrote: > > The first line, dict.1 works fine. But when I try to use the d > variable for the dict index it doesn't work. Is there a way to > accomplish this? No, by design. We have explicitly tried to avoid making the django template language a programming lang

Re: Simple Template Dict Problem

2007-06-07 Thread Russell Keith-Magee
On 6/7/07, Trey <[EMAIL PROTECTED]> wrote: > > I thought that something like that was the answer. > > Normally I would agree but I can't think of another way to make a > calendar style layout with certain events on it. Check out my glorious > hack and tell me what you think. My eyes! They burn! :

Re: Many to many in template question

2007-06-07 Thread Russell Keith-Magee
On 6/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Figured it out. Template wanted (for whatever reason) > {% for foo in bar.foos.all %} instead of {% for foo in > bar.foos_set.all %} This would all be a lot clearer if you would read the DB-api docs. The related-objects section explains

Re: Adding a group, and users to that group

2007-06-07 Thread Russell Keith-Magee
On 6/7/07, Vincent Nijs <[EMAIL PROTECTED]> wrote: > > Thanks for the help Russ: > > That worked. Next problem :) I want to add users to a group. > > g = Group.objects.get(name='section81') > > gives errors. I'm guessing the errors you are getting are telling you that various attributes can't be

Re: DBMigrations - an library/tool for database evolution

2007-06-07 Thread Russell Keith-Magee
On 6/8/07, Marinho Brandao <[EMAIL PROTECTED]> wrote: > > I think this is a better solution than create a Django contrib or > another dependent sollution. Personally, I'd prefer an integrated tool - but I acknowledge that this is personal preference. Best of luck - this isn't a small problem :-)

Re: test client login problems

2007-06-26 Thread Russell Keith-Magee
On 6/20/07, Chris Brand <[EMAIL PROTECTED]> wrote: > > I'm running into problems with the test client's login method. > Specifically, within a single test method, the first login succeeds but the > second one fails. > Is this something that should work ? Am I doing something wrong ? Apologies for

Re: newforms and File (image) upload

2007-06-26 Thread Russell Keith-Magee
On 6/21/07, Dirk van Oosterbosch, IR labs <[EMAIL PROTECTED]> wrote: > > On 20-jun-2007, at 22:19, SanPy wrote: > > > File and image uploading for newforms, AFAIK, is not implemented in > > 0.96. There is a ticket for this (#3297). If you look in the django- > > developers newsgroup and search for

Re: XML serializer

2007-06-26 Thread Russell Keith-Magee
On 6/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > Since serializer has query set as parameter. If data is not query > from database, How to construct data structure (query set) and pass to > serializer ? The Django serializers accept any iterable, not just query sets. You

Re: How can I rename uploaded files to a random filename?

2007-06-26 Thread Russell Keith-Magee
On 6/25/07, rob <[EMAIL PROTECTED]> wrote: > > We upload all of our images via the Admin app and would like all > uploaded images to be renamed to a set of numbers. We can generate the > random numbers fine, but is there an easy way to rename the file once > it's uploaded in the Admin app? Not at

Re: Unittests and coverage

2007-06-26 Thread Russell Keith-Magee
On 6/26/07, Michal <[EMAIL PROTECTED]> wrote: > > Hello, > I try to write test together with coverage [1]. This tool could tell me, > which lines of code was or wasn't executed and therefore tell, how my > tests are (or aren't) "superior". > > I put initial code for coverage into setUp, and cleanu

Re: Tests fail on redirects when admin urls enabled

2007-06-26 Thread Russell Keith-Magee
On 6/26/07, Rand Bradley <[EMAIL PROTECTED]> wrote: > This is occurring wherever I test a redirect. If I comment out the admin > line in urls.py , the errors disappear. I am on the latest development > version to date (5541). > > Any insight or help would be greatly appreciated! Thanks. Looking a

Re: test client login problems

2007-06-27 Thread Russell Keith-Magee
On 6/28/07, Chris Brand <[EMAIL PROTECTED]> wrote: > > > The 'bool object has no attribute status_code' message is generated > > because the login() method visits the named url, and tries to fill in > > the form it finds. If you are already logged in, and you visit a > > login-decorated view, the

Re: django.contrib.auth: 'module' object has no attribute 'get_max_name_length'

2007-06-27 Thread Russell Keith-Magee
On 6/28/07, Ramiro Morales <[EMAIL PROTECTED]> wrote: > > It isn't a big problem, it will go away when you set DATABASE_NAME variable > in settings.py (the next step) and it will eventually be solved so the > behavior > matches the documentation again. FYI - I've fixed this in [5557]. Yours, Ru

Re: gettatr() access to ManyToMany huuuge delay?

2007-06-28 Thread Russell Keith-Magee
On 6/28/07, grassoalvaro <[EMAIL PROTECTED]> wrote: > > text: 1.149759 > name: 0.017819 > - > > Can someone explain me, why when i'm doing gettatr(test, "text") > (ManyToMany) i have so long delay? That is django (not database) >

Re: Fixtures for datetime fields using auto_now

2007-06-28 Thread Russell Keith-Magee
On 6/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm writing tests for an application, and I sort by update_time for > one model. Is it possible in my fixtures to set fixed times? Right > now, the update_time attribute is always almost "right now". If I try > to set it in my JSON fi

Re: Admin for Table of Foreign Keys

2007-06-28 Thread Russell Keith-Magee
On 6/28/07, JimR <[EMAIL PROTECTED]> wrote: > > below. When I include the 'def __str__(self)' it displays the user id > in the admin interface, but when I access the record I get an error > "__str__ returned non-string (type Userid)" The error message is telling you the exact problem. Your __str

Re: One-to-one relationship (model inheritance) or generic relations?

2007-06-28 Thread Russell Keith-Magee
On 6/28/07, Jamie Pittock <[EMAIL PROTECTED]> wrote: > > I don't want to code myself into a corner, so when I start looking at > features such as allowing users to search all venues would I be best > with one parent model or will I be ok keeping them separate? The > different types of venues hav

Re: contenttypes

2007-07-02 Thread Russell Keith-Magee
On 7/2/07, Lic. José M. Rodriguez Bacallao <[EMAIL PROTECTED]> wrote: > Hi everyone, I really need some help on the contentypes app, could someone > explain me how it work with an example, I have read a little explanation on: > http://feh.holsman.net/articles/2006/06/03/django-contenttype > but it

Re: Sybase support for Django

2007-07-02 Thread Russell Keith-Magee
On 7/2/07, adm <[EMAIL PROTECTED]> wrote: > > Has anybody used sybase with Django? > I couldn't find any references. Sybase isn't on the currently supported database list, and I'm not aware of any plans to add support for Sybase. If you want to try your hand at adding support for Sybase, feel fr

Re: manage.py validate error

2007-07-02 Thread Russell Keith-Magee
On 7/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm currently creating models (quite a bit of them) using Django and I > find it hard to "debug" them. "./manage.py validate" usually returns > errors with no context nor line numbers, and sometimes the error comes > from an import and is

Re: Sybase support for Django

2007-07-02 Thread Russell Keith-Magee
On 7/3/07, adm <[EMAIL PROTECTED]> wrote: > > Russ, > I sure can try that. The problem is I haven't gone through the > Django framework in details as such, which make me quite helpless > while adding the support. Thats fine. However, as fair warning - this is the first time that Sybase supp

Re: Sybase support for Django

2007-07-03 Thread Russell Keith-Magee
On 7/3/07, Carl Karsten <[EMAIL PROTECTED]> wrote: > > Russell Keith-Magee wrote: > > Thats fine. However, as fair warning - this is the first time that > > Sybase support has been requested (compared to the regular requests > > for MS SQL Server support), so I

Re: Basic Form Question - Radio Option Values

2007-07-03 Thread Russell Keith-Magee
On 7/4/07, Blaine Garrett <[EMAIL PROTECTED]> wrote: > > The very last line is the one that doesn't work. Says > BookmarkSubmitForm is not defined. This makes sense, but I have no > idea how idea to assign this. I tried self which is undefined, etc. 'self' won't be defined until there is an insta

Re: When to use Admin Forms and/or Generic Views and/or New Forms ?

2007-07-03 Thread Russell Keith-Magee
On 7/4/07, Vizcayno <[EMAIL PROTECTED]> wrote: > > Hello: > I know that Django provides 3 ways in using Web forms: Admin Forms, > Generic views and New Forms where Admin forms is the easiest one to > use. > What I would like to know is: > 1) Which determinant aspects should force me to use Generic

Re: Random string template tag

2007-07-03 Thread Russell Keith-Magee
On 7/4/07, Bryan Veloso <[EMAIL PROTECTED]> wrote: > > I don't know if this exists or not, but I'd like to insert a tag (much > like cycle) that allows the random selection of a string. I'm trying > to randomly assign a class to a to simulate "random image > rotator" type functionality. Something

Re: Generic Relations + Admin Interface

2007-07-03 Thread Russell Keith-Magee
On 7/4/07, David <[EMAIL PROTECTED]> wrote: > > Please let me stress that that isn't the full implementation (if you > want me to go into further detail, please let me know). Basically, I > want to be able to assign many different objects (of different model > types) to an Article. I need to be a

Re: Random string template tag

2007-07-03 Thread Russell Keith-Magee
On 7/4/07, Bryan Veloso <[EMAIL PROTECTED]> wrote: > > > {{ classes|random }} > > Can you serve Context to the base template? > I thought of that earlier, but I couldn't think of how to give it > Context. What do you mean? You pass a context to the template renderer; if the template you render re

Re: Building forms by hands

2007-07-05 Thread Russell Keith-Magee
On 7/5/07, Alexander Solovyov <[EMAIL PROTECTED]> wrote: > > Hi all. > > I want to build forms in HTML by hands, without helpers from django > (like outputting field with label and etc), but I can't find one thing > - how I can get value from field (to select appropriate field in > radioselect, f.

Re: Using newforms to create multiple related objects?

2007-07-05 Thread Russell Keith-Magee
On 6/29/07, Michael Sylvan <[EMAIL PROTECTED]> wrote: > > Is there a way to do this sort of things cleanly, short of using the > newforms-admin branch of Django? Or do I have to do something like > changing the form's fields attribute by hand? Using formsets from newforms-admin will be the easies

Re: --+++Does anybody have instructions to make a photo app+++--

2007-07-05 Thread Russell Keith-Magee
On 7/6/07, Naco <[EMAIL PROTECTED]> wrote: > Please don't use ---+++ highlighting for the subject of messages when writing to this list. Its very impolite. Yours, Russ Magee %-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: importing users from another db

2007-07-07 Thread Russell Keith-Magee
On 7/8/07, Carl Karsten <[EMAIL PROTECTED]> wrote: > > I am migrating a site from .net/access to django. the MySql Migration Wizard > gets the data out of access and into a MySql db nice and easy. There is even > some provision for scripting it, but don't ask me about that cuz I havn't used > it

Re: importing users from another db

2007-07-07 Thread Russell Keith-Magee
On 7/8/07, Carl Karsten <[EMAIL PROTECTED]> wrote: > > Russell Keith-Magee wrote: > > Django users have many skills. Unfortunately, mind reading is > > generally not one of those skills :-) > > > > Yeah, I see what you mean. seemed obvious to me :) > >

Re: generate choices list from database

2007-07-08 Thread Russell Keith-Magee
On 7/8/07, Stu <[EMAIL PROTECTED]> wrote: > > In a similar vein to the OP, I'm trying to populate a choices list for > a form (using newforms) from a database: > > nameChoices = Names.objects.filter(initials='AB') > NameSelection.base_fields['names'].widget = > widgets.Select(choices=nameChoices.N

Re: Deleting Object/

2007-07-08 Thread Russell Keith-Magee
On 7/9/07, TheOrb <[EMAIL PROTECTED]> wrote: > > I am new to Django and getting started with the Poll example. > > 1 ) While in the Shell if type "Poll.objects.a() " I get the result > [, ] > > Why am I getting 2 poll objects and what command can I use to > delete one. Well - you are gett

Re: installation issues

2007-07-08 Thread Russell Keith-Magee
On 7/9/07, surfwizz <[EMAIL PROTECTED]> wrote: > > I am having trouble installing Django on Mac OSX 10.4.10. Any help > would be welcome. Thanks! Django works fine on MacOSX - I'm developing on OSX right now. If you want help, you're going to need to ask a specific question. What part of the i

Re: Remove a field from a form

2007-07-09 Thread Russell Keith-Magee
On 7/9/07, ilDave <[EMAIL PROTECTED]> wrote: > > Hi! > I have to show two identical forms in a page, so I used form_for_model > and I created two form objects. ... > What am I missing? Try form_for_model(MyModel, fields=('field1','field2')). That will generate a form for MyModel that only contain

Re: installation issues

2007-07-09 Thread Russell Keith-Magee
On 7/10/07, surfwizz <[EMAIL PROTECTED]> wrote: > > I had trouble running the install as per the instructions (using > terminal), so I just ran setup.py in IDLE as a module. Is there a way > to fix this, or get this install running properly? I don't know how to put this more clearly. Django wor

Re: TestCase, Client() and Exception

2007-07-10 Thread Russell Keith-Magee
On 7/10/07, Mambaragi <[EMAIL PROTECTED]> wrote: > > ] client = Client() > ] self.assertRaises(TemplateDoesNotExist, client.get, "/user/ > preferences/") > > Is is a bug or my mistake?? It's a mistake on your part. assertRaises isn't a very effective test for the test Client, because web browser

Re: ForeignKey(User, list_display=full?

2007-07-10 Thread Russell Keith-Magee
On 7/11/07, Carl Karsten <[EMAIL PROTECTED]> wrote: > I am hoping to do something like > contact = models.ForeignKey(User, list_display = ('first_name', 'last_name') ) A big -1 on this idea. This mixes the data representation with the display representation. One of the major reasons for the newf

Re: Hard-coded sting in IFEQUAL

2007-07-10 Thread Russell Keith-Magee
On 7/11/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > running .91 due to upgrade soon. For future reference, that would have been a very useful piece of data to provide with your original report. Django 0.91 is 18 months old - and a lot of very significant changes and bugfixes have been ma

Re: Dynamically created fields for a newform

2007-07-10 Thread Russell Keith-Magee
On 7/11/07, Cole Tuininga <[EMAIL PROTECTED]> wrote: > > Hey all - I'm a newforms newbie running 0.96. I was just wondering if > there was a way to create fields for a newform dynamically. Some of > the fields are coming from a database and hence, could change when the > form is created. Yes. Y

Re: Problem in current svn TRUNK

2007-07-10 Thread Russell Keith-Magee
On 7/10/07, Peter Nixon <[EMAIL PROTECTED]> wrote: > > How can I debug this in a way that will provide the developers with more > usefull info? The best way to help us debug this would be to produce a minimal example that replicates the problem - that is, a standalone example that is as small as

Re: Problem accessing ManyToManyField

2007-07-10 Thread Russell Keith-Magee
On 7/11/07, Shankar <[EMAIL PROTECTED]> wrote: > > > I tried the following inside the python interpreter. > :: > >>> entries[0].authors.all() > Traceback (most recent call last): The syntax you describe looks fine; I tried using your model with trunk ([5637]) and it worked fine for me

Re: installation issues

2007-07-10 Thread Russell Keith-Magee
On 7/11/07, surfwizz <[EMAIL PROTECTED]> wrote: > > When I went to the beginner lesson and tried to set up a project, it > reports that it cannot find the path that I am trying to use. > I don't know if this helps, but this is what the software is telling > me. No. It doesn't. Not even a little b

Re: Site framework

2007-07-11 Thread Russell Keith-Magee
On 7/11/07, Glebb <[EMAIL PROTECTED]> wrote: > > Hi, I'm trying to use the site framework, and it works, but I just > have one problem. I have a form (from form_for_model for example) > which represents an object which has a site foreign key. The site > selection shows up just fine in the form. Bu

Re: session in all templates?

2007-07-11 Thread Russell Keith-Magee
On 7/12/07, Martin Kaffanke <[EMAIL PROTECTED]> wrote: > At the moment I use on some places a > > {'session': request.session} for the Context to render the template. > How Can I make the session automaticaly available in the base template, > without having to be aware that I don't forgett this pa

Re: Flex integration, best practices?

2007-07-12 Thread Russell Keith-Magee
On 7/12/07, Sells, Fred <[EMAIL PROTECTED]> wrote: > > So I'm not using many (any?) of the cool features of Apache or django once > my page is up. Would be reasonable to bypass Apache (and django) and use > something like SCGI to just serve XML data? Or did I just reveal how little > I truely kn

Re: Apps importing from each others models

2007-07-12 Thread Russell Keith-Magee
On 7/13/07, leanmeandonothingmachine <[EMAIL PROTECTED]> wrote: > > Is it possible for two apps to import from each others models? Lets > say I have two apps, articles and photos: > ... > this will return errors importing errors, but if you take out either > of the relations then it imports fine.

Re: Is there any way to custom group models in the admin panel?

2007-07-12 Thread Russell Keith-Magee
On 7/12/07, Sebastian Macias <[EMAIL PROTECTED]> wrote: > > By default models are grouped by app. I really need to be able to > break down that grouping a little bit more. I will have an app with > probably 40-50 models and would like to group those logically instead > of having them all listed un

Re: Do FormFields know which Model Field they're from?

2007-07-12 Thread Russell Keith-Magee
On 7/13/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > > The docs for newforms say how to override a field if you wish: > ... > But what if I only want to override the appointment field in my model > with a form field that limits people to choosing weekdays, but leave the > birth_date field as a no

Re: Fixtures for datetime fields using auto_now

2007-07-12 Thread Russell Keith-Magee
On 6/28/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > On 6/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > I'm writing tests for an application, and I sort by update_time for > > one model. Is it possible in my fixtures to set fixed

Re: Problem accessing ManyToManyField

2007-07-12 Thread Russell Keith-Magee
On 7/11/07, Shankar <[EMAIL PROTECTED]> wrote: > > Hi Russ, > > Thanks very much for your input. The answers to your 'sanity checks' are > inline. Thanks for the answers, but it doesn't appear to have shed any light on anything. Having another look at your application, it occured to me that the

Re: installation issues

2007-07-12 Thread Russell Keith-Magee
On 7/13/07, surfwizz <[EMAIL PROTECTED]> wrote: > > I tried that originally. I'm sorry that I thought that you meant that > I should try it as >>>import Django. Anyway, here's what >>>import > django looks like: > Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) Ok - your prompt is reporting Py

Re: newforms does not create label's 'for' attribute

2007-07-12 Thread Russell Keith-Magee
On 7/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > without 'for' works ok with FireFox, but when it comes to IE > 6/7, it does not work. Hi YoungRok, Looks like you have found a bug. For future reference I've logged this as ticket #4860. Yours, Russ Magee %-) --~--~-~--~

Re: python.py deserialization and handling foreign key fields ?

2007-07-14 Thread Russell Keith-Magee
On 7/14/07, Etienne Robillard <[EMAIL PROTECTED]> wrote: > > Hi Russell, > > Thanks for responding to this thread. You were right > for the data not matching the model. The assumption that > some_model_instance.__dict__.keys() would return the fields names > is simply wrong. :) You can get the li

Re: SQL VIEWs as Django Models for aggregation --- delete() issues with django.db.models.query: delete_objects

2007-07-14 Thread Russell Keith-Magee
On 7/13/07, JeffH <[EMAIL PROTECTED]> wrote: > > This post relates to two separate Django issues that intertwined for > me: > 1. Lack of aggregation support in Django's ORM > (I am delighted to see > http://groups.google.com/group/django-developers/browse_thread/thread/f433edf7b0ebdbcb/ > ) For

Re: Installing Django

2007-07-15 Thread Russell Keith-Magee
On 7/16/07, shahabbash <[EMAIL PROTECTED]> wrote: > > Hi Everyone, > > I am new to Django and am currently following the instructions on the > Django site to get all the necessary components installed. My > question is simple: Can Django be installed and run on Windows? If so > where can I get t

Re: Efficient reverse access on ForeignKey?

2007-07-16 Thread Russell Keith-Magee
On 7/16/07, jj <[EMAIL PROTECTED]> wrote: > > Now I'd like to restrict the query to books which have been printed in > 'Holland': > q = q.filter(foreign_print_set__country='Holland') Try: q = q.filter(foreignprint__country='Holland') foreignprint doesn't get an underscore unless it is

Re: How to make dictionary out of model instance

2007-07-16 Thread Russell Keith-Magee
On 7/16/07, Eratothene <[EMAIL PROTECTED]> wrote: > > I need to make dictionary out of django.auth.model.User instance in > such format: > > {'username':'val1', 'password':'val2', 'email':'', > 'first_name':'val3', 'last_name':'val4' ...} > > In order to populate this data in to the custom form. I

Re: Efficient reverse access on ForeignKey?

2007-07-16 Thread Russell Keith-Magee
On 7/16/07, jj <[EMAIL PROTECTED]> wrote: > > Excellent, this works! > > Now, probably the documentation is misleading. From documentation/db- > api: > > > You cannot access a reverse ForeignKey Manager from the class; it > must be accessed from an instance. Example: > Blog.entry_set

Re: Error from python manage.py syncdb

2007-07-16 Thread Russell Keith-Magee
On 7/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Is the server running locally and accepting > connections on Unix domain socket "/tmp/.s.PGSQL.5433"? This is a Postgres error, telling you that the psycopg can't connect to the Postgres DB. You need to play around with

Re: SQL VIEWs as Django Models for aggregation --- delete() issues with django.db.models.query: delete_objects

2007-07-16 Thread Russell Keith-Magee
On 7/17/07, JeffH <[EMAIL PROTECTED]> wrote: > > Russ: Thanks for your reply! > > 1. I don't consider my views-as-models approach elegant at the > implementation level, but: Its a bit of a nifty hack. However, I was talking more about views as a general tool - it would be nice to support them. Th

Re: Improve the dynamic generation of a form with newforms library

2007-07-16 Thread Russell Keith-Magee
On 7/16/07, yml <[EMAIL PROTECTED]> wrote: > > This is not bat but i would prefer if instead of the list of tuple > containing my forms could directly instantiate a "all in one" form. > This would avoid the loop on list_answer_forms. This is were I get > stuck. Could you please let me know how t

Re: regex in url

2007-07-16 Thread Russell Keith-Magee
On 7/17/07, james_027 <[EMAIL PROTECTED]> wrote: > I am very new to django as well as python. how is it that ?P > seems to be ignore by the regex function? I can't see any explanation > in django's documentation. is this something magic or hack my django? What do you mean by ignored? Are you get

Re: How can I run syncdb task without loading any initial_data fixtures?

2007-07-16 Thread Russell Keith-Magee
On 7/17/07, Manoj Govindan <[EMAIL PROTECTED]> wrote: > > I have created an initial_data fixture for using with my test cases. > However I do not want these to be loaded every time I run syncdb after > making a change during development. Is there a way to turn off loading > initial_data, perhaps u

Re: How can I run syncdb task without loading any initial_data fixtures?

2007-07-16 Thread Russell Keith-Magee
On 7/17/07, Manoj Govindan <[EMAIL PROTECTED]> wrote: > > Hi Russ, > I *did* try loading fixtures by making use of Django's own TestCase. > > However, this proved to be too expensive in terms of time taken to run > tests given that: > 1) Deriving test classes from Django's TestCase slows execution

Re: How can I run syncdb task without loading any initial_data fixtures?

2007-07-16 Thread Russell Keith-Magee
On 7/17/07, Manoj Govindan <[EMAIL PROTECTED]> wrote: > > Hi Russ, > > Quote: initial_data is intended for data that must _always_ be in your > database. > > Shouldn't developers have the option to run syncdb without loading > initial_data? For example: a model has changed and the developer > mere

Re: How can I run syncdb task without loading any initial_data fixtures?

2007-07-16 Thread Russell Keith-Magee
On 7/17/07, Manoj Govindan <[EMAIL PROTECTED]> wrote: > > Given the (admittedly uncommon) "select only" nature of the app, I > think my statement accurately reflects my need. You think. For the moment. Until one day, something subtle changes in the implementation of get_foobar() which _does_ chan

Re: How can I run syncdb task without loading any initial_data fixtures?

2007-07-17 Thread Russell Keith-Magee
On 7/17/07, Manoj Govindan <[EMAIL PROTECTED]> wrote: > > > If there are times that you don't want to load the data, then it isn't > > initial data. Put it in a different fixture, and load it when you need > > it. > > I am bit confused now. Are you implying that the developer should not > prepare

Re: Django ORM is very cool.

2007-07-17 Thread Russell Keith-Magee
On 7/17/07, james_027 <[EMAIL PROTECTED]> wrote: > > Is there any plan to make Django ORM available as a stand alone ORM > which can be use in other application development. This could increase > django's user can they can use the model with several application > interface besides the web interfac

Re: small question on templates

2007-07-17 Thread Russell Keith-Magee
On 7/18/07, rogerdpack <[EMAIL PROTECTED]> wrote: > > I know that django support "method lookup, then hash member lookup > then something" or what not, for template functions, but, my question > is can you call a function (like a method) and pass it arbitrary > parameters. {% function1 'a', 'b' %}

Re: How can I run syncdb task without loading any initial_data fixtures?

2007-07-17 Thread Russell Keith-Magee
On 7/17/07, Manoj Govindan <[EMAIL PROTECTED]> wrote: > > I have a question here. I have found Django to be much faster than, > say, Rails. However, Django seems to take way more time to load > fixtures (I am not counting the time taken to create the database > each time here) compared to Rails.

Re: session question

2007-07-18 Thread Russell Keith-Magee
On 7/18/07, james_027 <[EMAIL PROTECTED]> wrote: > > sorry for this stupid question ... does django's session only work > when cookies are enabled? Yes. Yours, Russ Magee %-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Problem with multiple django versions on mod_python

2007-07-18 Thread Russell Keith-Magee
On 7/19/07, oggie rob <[EMAIL PROTECTED]> wrote: > > Please, if you've seen the same issue or have any helpful ideas to try > to stop the error, let me know. I think I've seen the same problem (or, at least, an analogous one). Unfortunately, I can't provide much by way of helpful debug or solutio

Re: Problem with multiple django versions on mod_python

2007-07-19 Thread Russell Keith-Magee
On 7/20/07, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > > For the record, the description which was given to you whereby "if the > first request served by a thread used the old version of Django, that > was the version that was used for all subsequent requests on that > thread" is nonsense. Ther

Re: Mapping models to CRUD urls?

2007-07-19 Thread Russell Keith-Magee
On 7/20/07, John M <[EMAIL PROTECTED]> wrote: > > http://.../model3/add/#- calls a view to add a new model3, with > foreign key model2 of # > http://.../model3/edit/#- calls a view to edit a model3 of ID# > > It seems simple enough, but wanted to get everyones feedback on > anything I'm mi

<    4   5   6   7   8   9   10   11   12   13   >