What if we instead make it so that context_processor.auth only sets the
"user" template variable if request.user is not an AnonymousUser
instance and then in templates you would use
{% if user %}
I am logged in.
{% endif %}
to determine if the user is logged in. If the user is not logged in,
th
On 7/12/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
> I'm almost ready to submit some patches (I still need to do some code
> cleanup and write some documentation), but before I do:
> 1) Are there any comments on the approach that I have suggested?
> 2) Is this a big enough change that peop
On 7/12/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
> Unless you can make a particularly convincing case for using an alternative,
> based upon some deficiency of unittest that will adversely affect django
> testing, I'm inclined to stick with whats in the standard library.
>
> If the powe
On Wed, 2006-07-12 at 17:13 +0300, Jyrki Pulliainen wrote:
> On 7/12/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
[...]
> > When a test targets is executed, django-admin:
> > 1) creates a test database named 'test_' + settings.DATABASE_NAME
>
> This is created to the database server being u
On 7/12/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Just as an additional data point, or point of discussion or whatever,...In summary, it's
py.test without the magic, plus support for pluginsthat can be used to change test selection, running and reporting.Unless you can make a particularly c
Create your own admin/submit_line.html template.
-rob
--~--~-~--~~~---~--~~
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 unsubscri
On 7/12/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
I'll write up what I was thinking about in another mail; I started topost it in response to this, but it adds no value to your proposal.Baited breath, and all that :-)
We are going to see more and more cases of a models/ sub-directory, notj
On 7/12/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
For my own project, I put together a testing middleware for viewsand manipulators, which saves the context given to a template andallows tests that are solely context based. The middleware canalso write out test cases while you use the browser.
On Wednesday 12 July 2006 21:27, Gary Wilson wrote:
> Jay Parlar wrote:
> > You can use functions inside list_display:
> >
> > class Admin:
> > list_display = ('get_last_name',)
> >
> > def get_last_name(self):
> > return self.user.last_name
> > get_last_name.short_desc
On Wednesday 12 July 2006 16:49, Iván Alemán wrote:
> does anyone have integrated django with an actual development
> environment, like the one I described above LAMP?
>
> does the integration works with minor workarounds?
I'm not quite sure what you mean. I'm using Django with LAMP (L =
Linux
Yea, I'm not really that sold on .is_loggedin() either... some
alternatives:
.is_real_user()
.is_known()
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email
> For the admin interface, probably your best option is to override the
> delete view. This is very simple, actually, because all actions are
> directed by the url and can be overridden by urls.py.
>
> So, in your urls.py file, above include('admin/', ...), type in
> something like:
> (r'(\w+)/(\
I do have {% load i18n %} in my template already - will try your
function tomorrow, it's home time now :-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email
> For the admin interface, probably your best option is to override the
> delete view. This is very simple, actually, because all actions are
> directed by the url and can be overridden by urls.py.
>
> So, in your urls.py file, above include('admin/', ...), type in
> something like:
> (r'(\w+)/(\
> That's what I'm after. But I see no reason why we could accomodate more
> options! =)
For the admin interface, probably your best option is to override the
delete view. This is very simple, actually, because all actions are
directed by the url and can be overridden by urls.py.
So, in your url
Jay Parlar wrote:
> You can use functions inside list_display:
>
> class Admin:
> list_display = ('get_last_name',)
>
> def get_last_name(self):
> return self.user.last_name
> get_last_name.short_description = "Last Name"
But you can't sort or seach it.
--~--~---
Gribbie wrote:
> I've got a click the flag on the welcome screen - when they 1st load
> the page it is in english - it uses the last 2 lines of the method:
>
> request.session['django_language']='en-uk'
> return render_to_response('welcome.html', {'request':request,
> 'user':request.u
On 7/12/06, Gary Wilson <[EMAIL PROTECTED]> wrote:
>
> So I've got a model resembling:
>
> ==
> from django.contrib.auth.models import User
>
> class ExtendedUser(models.Model):
> user = models.OneToOneField(User)
>
> class Admin:
> list_display = ('user',)
> search
So I've got a model resembling:
==
from django.contrib.auth.models import User
class ExtendedUser(models.Model):
user = models.OneToOneField(User)
class Admin:
list_display = ('user',)
search_fields = ('user',)
==
The admin has a user column but it is so
If I display {{request.sesssion.django_language}} on my template it is
"en-uk" on 1st load which is correct. I then click the french flag
which passes lang='fr' and...
If I use HttpResponseRedirect then the page is translated but
{{request.sesssion.django_language}} is still 'en-uk'.
If I use r
Hi.
If we japanese make character mappings, it will be millions and can't
cover all of them.
Mapping plan doesn't seem realistic for Chinese too.
So I agree with Antonio and Bill.
But people who use latin charcter prefer mappings to encoding, I think.
How about plugable python logic with each c
hello, we're a group of 11 developers + 2 designers, we basically
develop using LAMP + Smarty + Subversion and Dojo
we are starting a new project that includes several sections and
features like blogs, forums, music section, members profiles, etc,
some sections are already in a "beta" stage and o
Hi
When will Manipulators be replaced? I didn't notice any big checkins
that might relate to it and couldn't find more info in the wiki or on
django-developers.
I'm a bit worried, because I've got quite a lot of code in custom
manipulators. Never really liked them much, so any improvements will
On 7/12/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
> I've got a project at work that requires a formal test harness, so I
> thought I would kill two birds with one stone and spend some time adding a
> formal test framework for all Django applications.
>
> This came up a few weeks ago [1],
Just as an additional data point, or point of discussion or whatever,
I've been working on a plugin for my test runner (nose) that is quite
similar in operation to what you've described above. If you want to
check it out, you can get nose via easy install: easy_install nose and
the plugin here:
s
Here're Serbian mappings (default Serbian language in Django is Serbian Latin):
var SERBIAN_LATIN_MAP =
{
"š": "s", "đ": "dj", "ž": "z",
"č": "c", "ć": "c"
}
var SERBIAN_CYRILLIC_MAP =
{
"а": "a", "б": "b", "в": "v",
"г": "g", "д": "d", "ђ": "dj",
"е": "e", "ж": "z", "з": "z",
"и":
It's too early in the morning for me to read this thread in detail, but
I'd like to mention that I ran into a similar problem a while back and
wrote a small patch for it. It's against a pre-MR trunk and I haven't
had time to update it for post-MR, but it's pretty simple and should be
easy to modif
On Thu, 2006-07-06 at 11:20 +0800, Russell Keith-Magee wrote:
> On 7/6/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
[...]
> One idea that was bounced around in my conversation with the
> client was
> that TIME_ZONE defaults to empty (or None, preferably) and if,
>
Hiya
I've got a click the flag on the welcome screen - when they 1st load
the page it is in english - it uses the last 2 lines of the method:
request.session['django_language']='en-uk'
return render_to_response('welcome.html', {'request':request,
'user':request.user})
If they click
2006/7/12, Bill de hÓra <[EMAIL PROTECTED]>:
>
> Malcolm Tredinnick wrote:
>
> > Personally, I was kind of hoping whoever wrote
> > the patch might think this sort of thing through and give us a concrete
> > target to throw ideas at. :-)
>
> Hi Malcolm,
>
> Here we go:
>
> [snip]
>
>
> I need to t
Andrey Golovizin wrote:
> Bill de hÓra wrote:
>> I need to test this properly and fill in the mappings
>
> The official Cyrillic-Latin mapping could be found here:
> http://en.wikipedia.org/wiki/Translit
Great resource Andrey, thanks. I'll fold that mapping in.
cheers
Bill
--~--~-~--~
James Bennett wrote:
> On 7/11/06, Bill de hÓra <[EMAIL PROTECTED]> wrote:
>> I need to test this properly and fill in the mappings, but the gist of
>> the approach should be clear. When that's done, unless someone has an
>> objection, I'll file a patch against
>
> The structure and logic look go
Malcolm Tredinnick wrote:
>> return s.substring(0, num_chars);// trim to first num_chars chars
>> return s.substring(0, num_chars);// trim to first num_chars chars
>> }
>> ]]]
>
> Probably only one of the last two lines is necessary. :-)
DRY!
> I am the about the worst guy in the worl
Gribbie wrote:
> Hi Nebojsa
>
> Thanks for your reply - we are using django internationalisation. It
> all works fine when logged in it's just the introduction pages before
> the user logs in where we have the problem.
Well, if django i18n engine can't find out proffered locale from the browse
Hi Nebojsa
Thanks for your reply - we are using django internationalisation. It
all works fine when logged in it's just the introduction pages before
the user logs in where we have the problem.
Many thanks
Gribbie
--~--~-~--~~~---~--~~
You received this message
On Wed, 2006-07-12 at 15:38 +0800, Russell Keith-Magee wrote:
>
> Hi all,
>
> I've got a project at work that requires a formal test harness, so I
> thought I would kill two birds with one stone and spend some time
> adding a formal test framework for all Django applications.
Hmmm .. deja vu.
Gribbie wrote:
> Hi
>
> I have an application which when the user is logged in translates
> using:
> request.session['django_language']='en-uk' or what ever language
> code they select.
>
> This works fine when the user is logged in but I'd like to offer the
> user the option to translate th
Russell Keith-Magee wrote:
> I've got a project at work that requires a formal test harness, so I thought
> I would kill two birds with one stone and spend some time adding a formal
> test framework for all Django applications.
Russell, that sounds great! It looks like everyone's reinventing
the
James Bennett wrote:
> On 7/12/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
>> If you allow Null, this is in my opinion a strong indication that
>> deleting the other end should not cascade but set Null.
>
> Whatever the default ends up being, whether it stays cascading or
> moves to restrictin
iServicePro is an innovative approach to offering affordable tools for
Java and J2EE developers. in particular, we are a professional team for
applying oneself to develop and integrate eclipse plug-in for user
applications.
Our mission now is to deliver business value and to maximize
developers'
> But, yes, it is often very useful.
>
> As far as I can see, the cascade happens in the Model.delete()
> function, and not really in the admin. Therefore all deletes are
> cascading unless you carefully set the foreign keys to Null before
> you delete. You cannot change this behaviour wit
On 7/12/06, Michael Radziej <[EMAIL PROTECTED]> wrote:
> If you allow Null, this is in my opinion a strong indication that
> deleting the other end should not cascade but set Null.
Whatever the default ends up being, whether it stays cascading or
moves to restricting, assuming that allowing NULL
Hi,
the cascading delete came to surprise for me, too. I'm quite familiar
with a range of relational databases, and none of them does cascading
by default. They usually forbid it by default. That's why I did not
expect it at all, and of course it happened during a demonstration,
nearly wi
Hi all,
I've got a project at work that requires a formal test harness, so I thought I would kill two birds with one stone and spend some time adding a formal test framework for all Django applications.
This came up a few weeks ago [1], and although I didn't comment at the time, it struck me as a
> Not that I'm aware of. Personally, I think we've got bigger fish to
> fry, especially since the cascading delete performed by the admin
> *should* be a familiar behavior for those who've worked with databases
> before.
I agree, it makes sense from a database user/designer perspective.
Problem i
45 matches
Mail list logo