Re: How do i run just 1 test module?

2006-11-13 Thread Gary Wilson

Curious, does the new testing setup contain any mechanism for running
tests for my own applications, say in a package /tests instead
of in modeltests/ or regressiontests/ ?


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: doc fixes regarding old forms

2006-11-13 Thread Gary Wilson

Michael Radziej wrote:
> Hi,
>
> there's a ticket (#3005) that fixes bad documentation about writing
> forms. It's been closed as wontfix because newforms are coming (and then
> re-opened by the reporter).

Just for clarification, I re-opened #3005 but I wasn't the reporter.  I
was, however, the reporter of the original ticket (#2757) concerning
the new-admin changes [1] not being used in the forms documentation.

> Following the tradition to discuss tickets on the devel-list, I'd like
> to ask you to reconsider this policy. The old forms will be around for
> months. Patching the docs doesn't bring any dangers for existing code.
> The ticket is obviously right, since generic views do it the same way.
> The patch is small.

I suppose my ticket (#2757) and patch were also passed by since new
forms were "comming soon."  That was a couple months ago :(

> And ... I really can imagine the face of users who fall for the wrong
> docs when they find out about the ticket (perhaps when their own tickets
> get closed as duplicate?)
>
> Please, let's strive for correct docs even for changing parts. At least,
> when someone is so kind and provides a patch.

Yes, correct docs are important.  Plus, docs get frozen with each new
release, errors included.

[1] http://code.djangoproject.com/wiki/NewAdminChanges#ViewFunctions


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: How do i run just 1 test module?

2006-11-13 Thread Russell Keith-Magee

On 11/14/06, Victor Ng <[EMAIL PROTECTED]> wrote:
>
> Is there a way to tell runtests.py to test just one module?

Yes. Pass in the app name, not the full app path. For example
(ommitting the pythonpath and settings bits):

python runtests.py basic

will run just the 'basic' modeltest;

python runtests.py basic choices cache

will run the 'basic' and 'choices' model tests, plus the 'cache'
regression test.

>From the look of your test case, you're looking for

python runtests.py schemaevo

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: related object descriptor incorrectly returns

2006-11-13 Thread shaunc


> > Well, in "your email or username" I entered my email. (I get confused:
> > presumably I don't have a "django" username, or is it my username here
> > at google groups?)
>
> It's in the "settings" link at the bottom of the page.

Ah...settings link?... there it is(!)... I must say, that's a bit
obscure down there. Perhaps there were some instructions I missed?

> Please don't take this the wrong way, but we're *very* aware of it; we
> just haven't found the right solution yet to both make it easy for
> people to post things and to avoid the 5 metric tons of spam that
> get flung at our Trac every day.
>
Point taken... I have adjusted my email spam filters pretty carefully
to get all legitimate mail, but that results in them getting only about
%85 of spam, which is probably not enough for a site as prominent as
yours is.

Well... now that I've set the "settings", I've been able to submit the
bug. (No one discouraged me from that on the list...:))


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: The create/update/delete generic views need a 'message' parameter...

2006-11-13 Thread jp

You are correct Collin. :)

I noticed that myself but couldn't go back and edit it or anything.

James, also I noticed that the messages system even with authenticated
users won't work properly with generic views because again, there is no
way to know whether the update/creation was a success or not.

On Nov 13, 3:51 pm, "Collin Grady" <[EMAIL PROTECTED]> wrote:
> Point of clarification, it'd be a GET param, since you can't add POST
> in a redirect ;-)
>
> --
> I do not fear computers.  I fear the lack of them.
> -- Isaac Asimov


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: The create/update/delete generic views need a 'message' parameter...

2006-11-13 Thread Collin Grady

Point of clarification, it'd be a GET param, since you can't add POST
in a redirect ;-)

--
I do not fear computers.  I fear the lack of them.
-- Isaac Asimov


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: The create/update/delete generic views need a 'message' parameter...

2006-11-13 Thread jp

James, I discussed with you some on IRC earlier my situation, but I'll
bring it up here so others can read it.

The problem with your suggestion is it will only work for authenticated
users. If you have anonymous users, using messages like that simply
won't work. The Django docs suggest using the session, but updating the
session properly, ie to say request.session['message'] = 'Job created'
is pretty much impossible to do accurately because there is no way to
know whether the generic view method was a failure or a success.

The only other option is to pass your message as a POST param via the
redirected URL, but that completely destroys the 'pretty URLs' that
most devs aim for.

That is why I feel like the only way to properly fix this is to have a
'message' param in the generic views itself which can properly give an
indicator message if the method succeeds.

On Nov 13, 3:30 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 11/13/06, jp <[EMAIL PROTECTED]> wrote:
>
> > Something that is fairly common in web applications are indicator
> > messages. For example, after you've posted an article, the site should
> > echo back to you 'Article x created'. This is important because it
> > let's the user know what is going on.You might want to check out the 
> > 'messages' feature of the auth app[1],
> which essentially does the same thing, and has support via a context
> processor to ensure it shows up in any view that uses RequestContext
> (which includes all of the generic views). The messages you see in the
> admin about "object was created successfully" or "object was updated
> successfully" are examples -- they're Message objects which are
> attached to your user when you take a particular action, and cleared
> after being displayed.
>
> [1]http://www.djangoproject.com/documentation/authentication/#messages
>
> --
> "May the forces of evil become confused on the way to your house."
>   -- George Carlin


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: The create/update/delete generic views need a 'message' parameter...

2006-11-13 Thread James Bennett

On 11/13/06, jp <[EMAIL PROTECTED]> wrote:
> Something that is fairly common in web applications are indicator
> messages. For example, after you've posted an article, the site should
> echo back to you 'Article x created'. This is important because it
> let's the user know what is going on.

You might want to check out the 'messages' feature of the auth app[1],
which essentially does the same thing, and has support via a context
processor to ensure it shows up in any view that uses RequestContext
(which includes all of the generic views). The messages you see in the
admin about "object was created successfully" or "object was updated
successfully" are examples -- they're Message objects which are
attached to your user when you take a particular action, and cleared
after being displayed.

[1] http://www.djangoproject.com/documentation/authentication/#messages

-- 
"May the forces of evil become confused on the way to your house."
  -- George Carlin

--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



The create/update/delete generic views need a 'message' parameter...

2006-11-13 Thread jp

Something that is fairly common in web applications are indicator
messages. For example, after you've posted an article, the site should
echo back to you 'Article x created'. This is important because it
let's the user know what is going on.

Unfortunately with Django generic views, particularly the
create/update/delete ones, there isn't any way to easily pass a success
message to be displayed via a template. That in my opinion needs to be
a parameter option, because otherwise it is fairly difficult to check
as to whether the create/update/delete method was a success and thus
the message needs to be passed into the template.

It would also be nice for the auth generic views (login, logout), as an
easy way to say 'You are logged in, x', or 'You are logged out', etc.

Does anyone else agree with me? It would just take the form of a
keyword argument. For example:

from django.views.generic.create_update import create_object

def create_job(request):
return create_object(request, model=Job, post_save_redirect='/',
login_required=True, message='Job added')


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



win cash for free

2006-11-13 Thread pratush

Win cash Rs.5,000. Guaranteed real players, real winners. Free
registration!
http://surl.in/HLDDT238206SVRAKSX


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



How do i run just 1 test module?

2006-11-13 Thread Victor Ng

Is there a way to tell runtests.py to test just one module?

Is this not the right command to invoke?

PYTHONPATH=~/testdir python runtests.py modeltests.schemaevo.models
--settings=testapp.settings

thanks,
vic
-- 
"Never attribute to malice that which can be adequately explained by
stupidity."  - Hanlon's Razor

--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



[commercial] Django Training

2006-11-13 Thread sago

I just wanted to announce the first open commercial Django Training
program.

As well as being a great program, I hope it will be another
reinforcement in the message that Django is a deployable commercial
system for corporate web application development. I hope that having a
solid and skills-based program available will encourage more companies
to adopt Django and thereby raise the value of all our skills.

You can see details at

http://www.lamptraining.com/course/introduction-django/

And download the syllabus* at

http://www.lamptraining.com/syllabus/introduction-django.letter.pdf/
http://www.lamptraining.com/syllabus/introduction-django.a4.pdf/

I'm running two public open courses in the next couple of months, you
can see them at the info page above or on the schedule at:

http://www.lamptraining.com/schedule/

I'm also running a similar program with a Introduction to Python
program combined (see

http://www.lamptraining.com/course/django-and-python/

) on-site in a couple of weeks. If there's interest I could run that
publically too.

I'm adding new stuff over the next week or so, including some more
detail on some of the non-Django programs. If you need any more detail,
let me know.

Background
--

I've been developing web applications since 1996. I've been using
Django for over a year now to deliver projects for my clients (I
consult in software R). Recently, as companies have been considering
moving infrastructure to Django I've been asked to provide training,
both technical and in the form of management evangelism. As that has
increased in my workload, I decided to bring all the various training
that I can provide under the banner of this new training organisation:
LAMP Training (www.lamptraining.com).

Simply because there is nobody else doing it, and because there is a
lot of interest, most of the stuff I'm doing over the next couple of
months is Django related.

If you'd like to join a program, or have one delivered to your team get
in touch:

http://www.lamptraining.com/contact/


Best regards

Ian.


* Incidentally the site is a django project, including the on-demand
production of syllabus pdf's in a range of paper sizes. Nothing too
complex, the whole project is just a few hundred lines of code and was
three day's work, including design. But further evidence, if any is
required, as to the productivity Django can provide.


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Re: Problem with custom view and changeManipulator

2006-11-13 Thread ElGranAzul

Sorry, i've send it to the wrong list. Sorry for the noise.


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---



Problem with custom view and changeManipulator

2006-11-13 Thread ElGranAzul

Hi all.

I've a problem with an edit view. The idea is a model with 2 fk, but
editable in the same form. I've created a view to edit it. the code is
in http://paste.e-scribe.com/2798/ but it doesn't handle the
dom_social.

Someone have an idea please?

PD: I'm working with last svn version


--~--~-~--~~~---~--~~
 You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~--~~~~--~~--~--~---