Re: Help accessing user.

2007-10-01 Thread Jason C. Leach
Hi: I have sessions installed - and working. Just don't know how to get at them from in a template? {{ request.session.user }}? Noting seems to work. On 10/1/07, Richard Dahl <[EMAIL PROTECTED]> wrote: > > Django works just like any other web app. It is stateless. There is > no way of passing

Re: strange behavior of primary_key and ManyToManyField

2007-10-01 Thread zeliboba
Nis Jørgensen wrote: > Yes, this is a bug. ok, I'll make a bug ticket > .add(a) to gfive a foreign key violation. Does your backend support > foreign keys? I guess so, I'm using sqlite3 > Also, if you understand what is happening, why aren't you just doing > what Leo is suggesting, rather

Re: Help accessing user.

2007-10-01 Thread Richard Dahl
Django works just like any other web app. It is stateless. There is no way of passing the object from one view to another. You must enable sessions in order to store the user associated with any given login. Refer to the django documentation for sessions. -richard On Oct 1, 2007, at 9:46

Re: Django Email Failure

2007-10-01 Thread kidormb
Thanks for the reply, but SMTP AUTH extension not supported by server. is the exact error message that I receive, which I think is a python error. Any ideas, Thanks again On Sep 30, 9:49 pm, Thejaswi Puthraya <[EMAIL PROTECTED]> wrote: > [snipped] > > > I get the error message: > > >

Help accessing user.

2007-10-01 Thread Jason
Hi: So I pass the built in login my own template for authentication - and it works. I get a user object back and life is good. However I can't access the user outside of this page/template. I don't seem to be able to get a handle on the Context's so - I'm stuck. Can anyone help. I'd just like

Re: Template category / subcategory with for loops?

2007-10-01 Thread [EMAIL PROTECTED]
Nono, my searching didn't pull this up in the discussion groups, so I'll take a look. Thanks much! Lance On Oct 1, 6:11 pm, "Chris Moffitt" <[EMAIL PROTECTED]> wrote: > I'm sure people are sick of me for continuing to post this, but folks keep > asking, so I'll keep posting! > > In satchmo, we

default locations for css and js files

2007-10-01 Thread staff-gmail
I can't figure out where to put my css and js files. I did not want to hard code the media path in my settings file so it is the default ''. So if I put a css file in my template - where does Django look for the relative path ? Any help appreciated.

Re: Should Django have a road map?

2007-10-01 Thread Russell Keith-Magee
On 10/1/07, Stefan Matthias Aust <[EMAIL PROTECTED]> wrote: > > There are still 12 tickets from the last sprint (great effort, BTW) > left to check-in. The casual observer easily gets the impression that > work is sporadic, uncoordinated and not target-oriented, in one word: > chaotic. Yes, of

Re: choose the database at runtime

2007-10-01 Thread Ben Ford
Hi, I've had to do something similar to this myself... my suggestion would be to have a look at the multiple-db-support branch, here is some code that I use on top of that branch to connect to different databases with the same schema: This function is from the wiki article

Post question

2007-10-01 Thread [EMAIL PROTECTED]
I dunno if this is possible or not. I have a form that posts to a third party. It's a paypal payment processing type thing. What I want to do is go through a view (or middleware??) and do something before I go on to where the form was posting to. But I need to pass all the form data on to the

Re: Template category / subcategory with for loops?

2007-10-01 Thread Chris Moffitt
I'm sure people are sick of me for continuing to post this, but folks keep asking, so I'll keep posting! In satchmo, we used elementree to build up such a nested list. You can see the custom template tag here-

Re: What's going on with Row Level Permissions?

2007-10-01 Thread Russell Keith-Magee
On 9/10/07, djworth <[EMAIL PROTECTED]> wrote: > > I have been trying to figure out what the current status is of the RLP > branch. Does anyone know? It seems dead or have I missed something? No, no, he's not dead, he's, he's restin'! Remarkable bird, the RLP Branch, idn'it, ay? Beautiful

Re: Custom User model in django.contrib.auth

2007-10-01 Thread Russell Keith-Magee
On 10/2/07, handsome greg <[EMAIL PROTECTED]> wrote: > > Extending the model to add more fields isn't really > an issue for me, I would just really like to use my own table but keep > the django.contrib.auth functionality without hacking the source. Is > this possible in any way currently? Thanks

Re: choose the database at runtime

2007-10-01 Thread Russell Keith-Magee
On 10/2/07, bluesky <[EMAIL PROTECTED]> wrote: > > So information about the connection to db should be stored on session, > not globally. Is this possible with django? Well, anything is possible, but not necessarily easy. It certainly isn't a built-in feature - at least, not like you describe.

Template category / subcategory with for loops?

2007-10-01 Thread [EMAIL PROTECTED]
I have been unable to wrap my brain around a simple solution for the following. I have a list of items that have a category and subcategory. I would like to print them out in a hierarchy using the template system. items = [ { 'name' : 'item1', 'category' : 'foo', 'subcategory'

Problem with MultipleChoiceField

2007-10-01 Thread Chris Brand
This behaviour seems odd. Am I doing something wrong, or have I hit a bug ? I'm expecting that changing the choices of f shouldn't affect f2. I'm using 0.96. class MyForm(forms.Form): x = forms.MultipleChoiceField() > f = MyForm() > f2 = MyForm() > f2.as_p() u'X: \n > f.choices =

Re: How to keep track of iterations through a for loop in my template?

2007-10-01 Thread George Vilches
Greg wrote: > Hello, > I have a table in my template that will contain an x number of rows > depanding on what I get back from the view. I want my table row > background color to rotate between red and white. As of now, I don't > know how to keep track of each iteration through my for loop to

Re: How to keep track of iterations through a for loop in my template?

2007-10-01 Thread jake elliott
hi greg Greg wrote: > Hello, > I have a table in my template that will contain an x number of rows > depanding on what I get back from the view. I want my table row > background color to rotate between red and white. As of now, I don't > know how to keep track of each iteration through my for

Re: How to keep track of iterations through a for loop in my template?

2007-10-01 Thread Malcolm Tredinnick
On Mon, 2007-10-01 at 14:59 -0700, Greg wrote: > Hello, > I have a table in my template that will contain an x number of rows > depanding on what I get back from the view. I want my table row > background color to rotate between red and white. As of now, I don't > know how to keep track of each

How to keep track of iterations through a for loop in my template?

2007-10-01 Thread Greg
Hello, I have a table in my template that will contain an x number of rows depanding on what I get back from the view. I want my table row background color to rotate between red and white. As of now, I don't know how to keep track of each iteration through my for loop to set the appropriate

PyCon-Tech Meeting Tomorrow, Oct. 2nd, 2pm EST

2007-10-01 Thread Douglas Napoleone
There will be a PyCon-Tech Meeting tomorrow. The meeting will be held on irc in [EMAIL PROTECTED], at 2pm Eastern Standard Time (1pm Central) . This is a public meeting and all are invited to attend. `PyCon `_ is a volunteer conference for the python community, by the

Re: Should Django have a road map?

2007-10-01 Thread Mark Green
On Mon, 2007-10-01 at 17:07 +0200, Stefan Matthias Aust wrote: > Joe, > > 2007/10/1, Joe <[EMAIL PROTECTED]>: > > [...] > > And this is the biggest disconnect between Django's team and the > > business world. If I went to my bosses and told them "It's done when > > it's done" about our

Re: Forms vs. Admin?

2007-10-01 Thread cjl
John: > I mostly meant your tutorials. Not sure what your "instant code" does > since we don't happen to use windows. Thanks for clearing that up. The 'Instant Django' code is really just a batch file, nothing too complicated. The idea was that when someone wants to mess around with Django,

Handling DB connect error.

2007-10-01 Thread handsome greg
Ok here's another quick question. How can I catch a DB connect that fails and perform some kind of action (display a "sorry... site's down" page, etc.) if the DB isn't available? I can't seem to figure it out. Thanks! --~--~-~--~~~---~--~~ You received this

Re: Create and send post data to a view?

2007-10-01 Thread Joseph Heck
Right on - a better solution if you're keeping it all in the same server! -joe On 10/1/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > > On 10/1/07, Joseph Heck <[EMAIL PROTECTED]> wrote: > > You could do it by having your view act as a proxy. Basically > > instantiate a new connection to the

choose the database at runtime

2007-10-01 Thread bluesky
Hi! I have a little problem with an erp application. As we would let customers use our web server we should create a db for every customer and connect the application to the right one at run time on login. Every db has the same schema. Users should give the following information at login:

Custom User model in django.contrib.auth

2007-10-01 Thread handsome greg
Hey dudes, I read James's blog post (http://www.b-list.org/weblog/2006/ jun/06/django-tips-extending-user-model/) about extending the User model and the relative futility of the now defunct replaces_module() function. My question is this: I have a legacy db with a users table. My table actually

Re: Forms vs. Admin?

2007-10-01 Thread staff-gmail
cjl wrote: > John: > > >> I think it would actually be of more benefit if you could/would >> contribute this to the django project and have it on the project site. >> That way we can all contribute to it and make it even better. >> > > Are you referring to my 'Instant Django' website? > >

Re: Should Django have a road map?

2007-10-01 Thread Malcolm Tredinnick
On Mon, 2007-10-01 at 12:18 -0700, Joe wrote: [...] > Are you sure there is no compromise on doing a "stable" tag every few > months? Unless you religiously monitor the timelines and the google > groups, it is a little difficult to pick a good time to tag the trunk > between major merges and

Re: Forms vs. Admin?

2007-10-01 Thread cjl
Marty: Thank you for your reply. I like your point of view, and it makes sense to me. To paraphrase: Admin is a good way to quickly get under the hood and work with the 'raw' data, not a way for users to interact with your web application. I guess that I misunderstood the official tutorial.

Re: Forms vs. Admin?

2007-10-01 Thread cjl
John: > I think it would actually be of more benefit if you could/would > contribute this to the django project and have it on the project site. > That way we can all contribute to it and make it even better. Are you referring to my 'Instant Django' website? I would have no problems

Saving Uploaded files to the Server

2007-10-01 Thread jacoberg2
Hey everyone, I have brought up this issue before, and I was able to fix a few things but I am still having a lot of problems. I have a model with a filefield, and i was testing it with the development server and it worked perfectly. When I tried to copy it into the working server is when I

Re: Should Django have a road map?

2007-10-01 Thread Joe
Derek, I agree with you that the waterfall method of software development is broken and we don't use it here. However, we do set deadlines and goals, and we try to make them an accurate estimation of time required to complete work. How do we do this? Using a lot of the techniques that you

Re: test models

2007-10-01 Thread Richard Dahl
My approach to a similar problem is to instantiate a user within my test setup and pass that user to the model.save function. i.e class Device(models.Model): foo = models bar = models def save(self, user=None): model_instance = save_function(self, user)

Re: Should Django have a road map?

2007-10-01 Thread Joe
isadvantage to tagging a release every > > couple of months? It would provide a serious benefit to those of us > > who have to deal with corporate red tape. > > One disadvantage from that kind of model is security: we would either > have to keep security fixes up to date for a much

Re: Should Django have a road map?

2007-10-01 Thread Derek Anderson
actually, "it's done when it's done" can be sold in a corporate environment. it has the unfortunate characteristic of being the closest thing to truth when modeling software development, and no amount of pre-planning or chart-making is going to get you a more accurate answer. some key facts

Re: Random objects in view

2007-10-01 Thread Tomas Kopecek
Alessandro Ronchi napsal(a): > 2007/10/1, Tomas Kopecek <[EMAIL PROTECTED]>: > >> items = shuffle(items) > > > If I do that I get > > Exception Type: TypeError > Exception Value:object doesn't support item assignment > Oh, sorry, I forget that it works in place. It means you have to

test models

2007-10-01 Thread Lic. José M. Rodriguez Bacallao
hi everybody, I need to test how my models work outside the browser, with unit tests but one of my models had an attribute "created_by" representing the user who created it. Right now I'm using "ThreadLocals" middleware to get the current user outside views but I don't know how can I test it in

Re: Random objects in view

2007-10-01 Thread Alessandro Ronchi
2007/10/1, Tomas Kopecek <[EMAIL PROTECTED]>: > items = shuffle(items) If I do that I get Exception Type: TypeError Exception Value:object doesn't support item assignment The '?' works If I put it on objects.all.order_by('?') instead objects.all -- Alessandro Ronchi Skype: aronchi

Re: Create and send post data to a view?

2007-10-01 Thread Marty Alchin
On 10/1/07, Joseph Heck <[EMAIL PROTECTED]> wrote: > You could do it by having your view act as a proxy. Basically > instantiate a new connection to the view in question from your web > application using urllib2 or the like. Then get the results, process > them as you wish, and send the results

Re: Should Django have a road map?

2007-10-01 Thread staff-gmail
okay,okay, I'll just write up something and submit it :) I didn't see any welcome or about page on the main site so I'll work on that and include this stuff. Now back to coding. Tim Chase wrote: >> similar - sooo, do you think it's worthwhile to pull this together on a >> about / welcome

Re: Create and send post data to a view?

2007-10-01 Thread Joseph Heck
You could do it by having your view act as a proxy. Basically instantiate a new connection to the view in question from your web application using urllib2 or the like. Then get the results, process them as you wish, and send the results of that post-processing (if any) back to the original client

Re: Forms vs. Admin?

2007-10-01 Thread staff-gmail
I think it would actually be of more benefit if you could/would contribute this to the django project and have it on the project site. That way we can all contribute to it and make it even better. cjl wrote: > I'm a Django and web-development newcomer, working on a tutorial for > other

Create and send post data to a view?

2007-10-01 Thread Greg
I was wondering if I could send POST data to another view for processing. My original view would not be sent any POST data. The post data would get generated in my view and sent to another view for processing. Is this possible? --~--~-~--~~~---~--~~ You

Re: Should Django have a road map?

2007-10-01 Thread Henning Hraban Ramm
Am 2007-10-01 um 18:46 schrieb Tim Chase: >> similar - sooo, do you think it's worthwhile to pull this together >> on a >> about / welcome / introduction page under a heading like "How Django >> Works". Then when these comments come, they can be pointed to the >> page. If you think it's

Re: What's going on with Row Level Permissions?

2007-10-01 Thread Richard Dahl
Aryko, I didn't need row-level permissions so much as I needed role-based permissions, sort of the same thing but not exactly. I rolled my own. I do not believe the rlp branch is being actively maintained, but cannot say for sure as I have not looked into it in a while. Essentially I associate

Re: Random objects in view

2007-10-01 Thread Tomas Kopecek
Alessandro Ronchi napsal(a): > I tried to create a random view with the code on the bottom. It > doesn't work, the order is always the same. > What's wrong? > items.order_by('?') ? Means, that order is undefined but not random with each call. If you want to randmize order, use this from

Re: Forms vs. Admin?

2007-10-01 Thread Marty Alchin
On 10/1/07, cjl <[EMAIL PROTECTED]> wrote: > OK, I guess my question is: In a mature web application developed with > Django, is admin really used for anything? Or, now that newforms- > admin is almost here, is there any difference between admin and forms? > Will admin just be another form, with

Random objects in view

2007-10-01 Thread Alessandro Ronchi
I tried to create a random view with the code on the bottom. It doesn't work, the order is always the same. What's wrong? # Create your views here. from adottami.adozioni.models import Scheda, Referente from django.views.generic.list_detail import object_list #from

Re: Should Django have a road map?

2007-10-01 Thread Marty Alchin
On 10/1/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Maintaining information in more than one place is a burden. We are all > volunteers. Ergo, we try to keep the effort required to maintain stuff > to a minimum. The reason I made the point that all of this information > is available via

Re: Forms vs. Admin?

2007-10-01 Thread cjl
HG: Thank you for your reply. I guess I don't really have a well-formed question, but I having trouble thinking of an example of using the admin interface that isn't artificial. It seems that admin might be good when you are developing a website or application to quickly add and edit data, but

Re: What's going on with Row Level Permissions?

2007-10-01 Thread Aryko
Hey, I also need to use RLP for my project and I'd like to know if there's any update to expect for this branch or any way to include RLP to the trunk. Thanks. On Sep 10, 3:22 am, djworth <[EMAIL PROTECTED]> wrote: > I have been trying to figure out what the current status is of the RLP >

Re: What's the best way to handle big sets of data?

2007-10-01 Thread Bruno Tikami
Hello Tim and Richard, Sorry for the late reply but I was offline for the last days. I asked the same question to Brazilian Django users and I've got the same answer 'focus on your sgbd, Django is not going to be your problem' so I decided to have a better look on Postgres and start to do some

Re: Should Django have a road map?

2007-10-01 Thread Tim Chase
> similar - sooo, do you think it's worthwhile to pull this together on a > about / welcome / introduction page under a heading like "How Django > Works". Then when these comments come, they can be pointed to the > page. If you think it's worthwhile, I'll post some text to a > documentation

Re: Forms vs. Admin?

2007-10-01 Thread staff-gmail
I just posted a ticket (documentation #5645) for something similar - I also think the choice is confusing to new users sooo, let's get some documentation improved on this - feel free to contribute to the ticket - I'll try to do likewise. Horst Gutmann wrote: > Do you mean for other users

Re: Should Django have a road map?

2007-10-01 Thread staff-gmail
It would provide a serious benefit to those of us >> who have to deal with corporate red tape. >> > > One disadvantage from that kind of model is security: we would either > have to keep security fixes up to date for a much larger number of > releases or EOL releases

Re: strange behavior of primary_key and ManyToManyField

2007-10-01 Thread Nis Jørgensen
zeliboba skrev: > actually, I understand how it works, it seems to be a bug anyway. > consider this: > > from django.db import models > > class Author(models.Model): > name = models.CharField(maxlength=50) > > class Reference(models.Model): > """ > >>> a = Author(name='some name') >

Re: Should Django have a road map?

2007-10-01 Thread Malcolm Tredinnick
On Mon, 2007-10-01 at 17:36 +0200, Stefan Matthias Aust wrote: [...] > I'd like to reword (and overstate) your statement: "If you're too lazy > to search for the existing information yourself, you're not worth it." > Is that correct? Of course not. Please stop trying to inflame the conversation

Re: Forms vs. Admin?

2007-10-01 Thread Horst Gutmann
Do you mean for other users but yourself? In this case IMO you can compare giving someone access to the admin backend to giving someone access to something like phpMyAdmin. So basically you want to give this privilege only to those people, you can 100% trust and who should be able to change

Re: Should Django have a road map?

2007-10-01 Thread Malcolm Tredinnick
ses much faster, which is also a not insignificant downside in the corporate world. Another is credibility and QA: either you have to have periodic freezes prior to these snapshots to stabilise things, bring translations up to date, etc, or else they mean nothing. In the latter case, it isn't be

Forms vs. Admin?

2007-10-01 Thread cjl
I'm a Django and web-development newcomer, working on a tutorial for other newcomers like me: http://www.instantdjango.com Anyway, I am working on the second chapter of my tutorial, and want to show people how the 'admin' interface works. I am using the 'newforms- admin' branch for this

Re: Should Django have a road map?

2007-10-01 Thread Stefan Matthias Aust
2007/10/1, Malcolm Tredinnick <[EMAIL PROTECTED]>: > Of course, lower priority issues are going to languish a bit longer than > more pressing needs. Somebody who wants to count open tickets instead of > looking a bit deeper isn't going to like that, but since we're not > catering to that

Re: Should Django have a road map?

2007-10-01 Thread Stefan Matthias Aust
James, 2007/10/1, James Bennett <[EMAIL PROTECTED]>: > Not having copious documentation of everything the dev team is doing > isn't the same as "making it a secret" ;) I believe in "clarification by overstatement" :) > Again, the easy way to see what's going on is to watch the Trac > timeline

Re: Is there a {% if_less_than %} template tag

2007-10-01 Thread Rob Slotboom
Hi Greg: Just started using it yesterday :-) http://code.google.com/p/django-template-utils/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Editing FileFields inline (in newforms-admin)

2007-10-01 Thread AndyB
Hi there, I'm trying to use some editable inline filefields. My model has Items and Downloads, Downloads are many-to-one to Items and contain a name, description and FileField. When an master object (Items in my case) has exiting inline objects (Downloads in my case) you can't save any changes

Please help with extra validation in admin

2007-10-01 Thread Rob Slotboom
This is my model and I use a custom save to prevent the creation of a category with a parent_id which is the same a the current_id (child of itself) class Category(models.Model): name = models.CharField(maxlength=70, unique=True) slug = models.SlugField(maxlength=50, unique=True,

Re: Should Django have a road map?

2007-10-01 Thread Stefan Matthias Aust
Joe, 2007/10/1, Joe <[EMAIL PROTECTED]>: > [...] > And this is the biggest disconnect between Django's team and the > business world. If I went to my bosses and told them "It's done when > it's done" about our upcoming product releases, I would get fired. > Your response should be, "It's really

Is there a {% if_less_than %} template tag

2007-10-01 Thread Greg
Hello, I was just looking a the django built-in template tags and can't seem to find a tag that can compare two variables. I found a {% ifequal %} tag. Does one exist? Or will I have to do this logic in my view and pass my template a flag? Thanks

Re: Should Django have a road map?

2007-10-01 Thread Malcolm Tredinnick
On Mon, 2007-10-01 at 14:21 +0200, Stefan Matthias Aust wrote: > James, > > thanks for your details answer. Let me put it right here: I'm not > complaining about the lack of dedication or progress in the > development of Django. It's more about visibility and marketing. > > 2007/10/1, James

Re: Connexion to an existing database

2007-10-01 Thread Henning Hraban Ramm
Am 2007-10-01 um 14:25 schrieb Greg_IAP: > i tried to understand if i could use django to do some modifications > to an existing database...in vain. > I understand that i must rewrite the structure of the database through > django to produce a database model and to permit django to understand >

Re: Should Django have a road map?

2007-10-01 Thread James Bennett
On 10/1/07, Stefan Matthias Aust <[EMAIL PROTECTED]> wrote: > It might be very obvious to you what is missing before 0.97 can be > released because you're deeply involved with the development and > exactly know it. However, I cannot easily find the answer on the web > site. Searching the mailing

Re: Should Django have a road map?

2007-10-01 Thread Joe
> I'll pause for a moment here and step out of responding as a Django > user, and step into responding as Django's release manager: the answer > is "when it's ready". If you have a foolproof way of figuring out when > that will be, you should stop writing code and start making millions > of

Re: Data change history

2007-10-01 Thread George Vilches
Jon Atkinson wrote: > Hello, > > I'd like to add a feature to the web application I'm developing, which > will track the changes to the data in the system. I've created a web > interface for various items of data, and each has a create and an edit > view. > > If possible, I'd like to create a

Connexion to an existing database

2007-10-01 Thread Greg_IAP
Hi everybody, i tried to understand if i could use django to do some modifications to an existing database...in vain. I understand that i must rewrite the structure of the database through django to produce a database model and to permit django to understand my database structure through classes

Re: Should Django have a road map?

2007-10-01 Thread Stefan Matthias Aust
James, thanks for your details answer. Let me put it right here: I'm not complaining about the lack of dedication or progress in the development of Django. It's more about visibility and marketing. 2007/10/1, James Bennett <[EMAIL PROTECTED]>: > On 10/1/07, Stefan Matthias Aust <[EMAIL

Re: fixtures (yaml)

2007-10-01 Thread AniNair
I just reinstalled everythin including python and django.. I still get the message local_setting.py not set , using default settings, and the invalid model identifier message. Can you suggest where I should look for the errors? Plz help.. Thank you.

input_formats for SplitDateTimeField

2007-10-01 Thread omat
Hi, SplitDateTimeField does not allow you to specify input_formats, it initiates the MultiValueField with fields = (DateField(), TimeField()). As a work-around, I defined a custom field and a widget, and used them as follows. I hope this will save someone time. class

Re: Objects.get() need to limit 1 record

2007-10-01 Thread cschand
Yeah its working. I gave .filter(..)[0] and handled the IndexError, then it works Thankyou for everyone for helped me especially Nis Jørgensen cschand --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: mysql error

2007-10-01 Thread James Bennett
On 9/30/07, Jan Stavel <[EMAIL PROTECTED]> wrote: > InternalError at /admin/store/storeitem/ > (1, "Can't create/write to file > '/var/lib/mysql/tmp/#sql_2182_0.MYI' (Errcode: 2)") This is an error occurring internally in the MySQL database server, not an error in Django or in your code. --

Re: Should Django have a road map?

2007-10-01 Thread Jon Atkinson
> > > The documentation clearly advertises the current trunk > > version, but the book refers to 0.96. The django book project seems to > > have died in Feb. The site does not explain why the missing chapters > > where never written/published and what the current state is. > > The book isn't

Re: Should Django have a road map?

2007-10-01 Thread James Bennett
On 10/1/07, Stefan Matthias Aust <[EMAIL PROTECTED]> wrote: > There's no 0.97 version despites all that changes to SVN trunk for > months. Because we're not ready for a 0.97 release. The goals for the next release and the general run up to Django 1.0 are pretty well-known, even if they're not

Re: Should Django have a road map?

2007-10-01 Thread cschand
Stefan's observations have very interesting points. I am also looking forwad to replies cschand --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Objects.get() need to limit 1 record

2007-10-01 Thread Nis Jørgensen
cschand skrev: > Thanks for you replies > > but one thing... there are some differences between get and filter > > from get return obj is user model obj > but in filter it is recordsets... (I don't know i am right or not) > .get(...) returns a model object .filter(...) returns a queryset -

Re: Objects.get() need to limit 1 record

2007-10-01 Thread cschand
Thanks for you replies but one thing... there are some differences between get and filter from get return obj is user model obj but in filter it is recordsets... (I don't know i am right or not) Can you clarify this? --~--~-~--~~~---~--~~ You received this

Re: Should Django have a road map?

2007-10-01 Thread Ramdas S
Interesting observations. I like the idea of a road map. But we do not have any full time people working on Django. May be we can look at incrementing the version by 0.01every 500 SVN commits or so. RS On 10/1/07, Stefan Matthias Aust <[EMAIL PROTECTED]> wrote: > > > Over the last few weeks,

Re: Should Django have a road map?

2007-10-01 Thread Jon Atkinson
There are some interesting points here, I look forward to the replies. --Jon On 10/1/07, Stefan Matthias Aust <[EMAIL PROTECTED]> wrote: > > Over the last few weeks, we used Django to successfully create > prototype applications and it just worked great (well, large file > upload is broken, I

Data change history

2007-10-01 Thread Jon Atkinson
Hello, I'd like to add a feature to the web application I'm developing, which will track the changes to the data in the system. I've created a web interface for various items of data, and each has a create and an edit view. If possible, I'd like to create a log of who edited or created a piece

Re: How to create a nested list in a view?

2007-10-01 Thread Dan
That's fantastic it makes things a lot cleaner thanks for your help, I got it working just by adding '_set' to the associated models like so: {% for rail in railway_list %} {{rail.name}} {% for line in rail.line_set.all %} {{line.name}} {% for station in

Re: Ideas for adding default records

2007-10-01 Thread Paddy Joy
Thanks for the tip. I don't think the override will work in my particular case because I don't always add the defaults. I have a check box on the form "Add default DNS Records" and I check for this in the view: if form.is_valid(): domain = form.save(commit=True) if

Should Django have a road map?

2007-10-01 Thread Stefan Matthias Aust
Over the last few weeks, we used Django to successfully create prototype applications and it just worked great (well, large file upload is broken, I had to patch our Django version with #2070 a couple of times). What a relieve compared to Java web development! A big "thank you" to all developers

memory-efficient custom sql

2007-10-01 Thread Burak Arslan
hello everyone, here's what i've come up with when trying to make a database cursor return rows as associative arrays: def some_complex_report(request): cursor = connection.cursor() cursor.execute() rows=cursor.fetchall() fields = [ field[0] for field in

Re: Ideas for adding default records

2007-10-01 Thread Jonathan Buchanan
On 10/1/07, Paddy Joy <[EMAIL PROTECTED]> wrote: > > I have a many to one relationship between domain and DNSRecord. When > adding a domain I need to add some default DNSRecords. I do this after > saving the domain using the following code. > > > domain = form.save(commit=True) > > d =

Ideas for adding default records

2007-10-01 Thread Paddy Joy
I have a many to one relationship between domain and DNSRecord. When adding a domain I need to add some default DNSRecords. I do this after saving the domain using the following code. domain = form.save(commit=True) d = DNSRecord(domain=domain, type='NS', data='ns1.mydomain.com', aux=0,

Re: Objects.get() need to limit 1 record

2007-10-01 Thread Jarek Zgoda
cschand napisał(a): > Hello all, > I have a problem with get objects from User > > when i give > user = User.objects.get(email='[EMAIL PROTECTED]') > > if only one data is there it is executing ok... but if there are two > or more it showing and AssertionError > get() returned more than one

Re: How to create a nested list in a view?

2007-10-01 Thread Daniel Roseman
On Oct 1, 3:28 am, Dan <[EMAIL PROTECTED]> wrote: > Hello All > > I seem to be having a bit of a problem with separation of markup and > code. > > I would like to output from 3 different models; railways, rail lines > and stations a nested unordered list, so far i have got this to work: > > def

Re: Objects.get() need to limit 1 record

2007-10-01 Thread Daniel Roseman
On Oct 1, 7:30 am, cschand <[EMAIL PROTECTED]> wrote: > Hello all, > I have a problem with get objects from User > > when i give > user = User.objects.get(email='[EMAIL PROTECTED]') > > if only one data is there it is executing ok... but if there are two > or more it showing and AssertionError

Re: Objects.get() need to limit 1 record

2007-10-01 Thread James Bennett
On 10/1/07, cschand <[EMAIL PROTECTED]> wrote: > Is there any way to limit to return only one data.. ? Yes. Read the Django database API documentation: http://www.djangoproject.com/documentation/db-api/ -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct."

Re: Objects.get() need to limit 1 record

2007-10-01 Thread Alex Koshelev
user = User.objects.filter(email='[EMAIL PROTECTED]')[ 0 ] On 1 окт, 10:30, cschand <[EMAIL PROTECTED]> wrote: > Hello all, > I have a problem with get objects from User > > when i give > user = User.objects.get(email='[EMAIL PROTECTED]') > > if only one data is there it is executing ok... but

Objects.get() need to limit 1 record

2007-10-01 Thread cschand
Hello all, I have a problem with get objects from User when i give user = User.objects.get(email='[EMAIL PROTECTED]') if only one data is there it is executing ok... but if there are two or more it showing and AssertionError get() returned more than one User -- it returned 2! Is there any

Re: fixtures (yaml)

2007-10-01 Thread AniNair
Hi... Still trying to fix the fixtures... The yaml file is - fields: {d_name: 'Every day'} model: utils.Day pk: 1 - fields: {d_name: 'All open days'} model: utils.Day pk: 2 and my model is class Day(models.Model): name=models.CharField(max_length=20) class

  1   2   >