Your user must be registered on service with django-cas-provider.
Insead of django-cas-consumer i recomend to use django-cas [1]
[1] http://code.google.com/p/django-cas/
On Fri, Apr 29, 2011 at 8:48 PM, Stodge wrote:
> Of course! Thanks - I have the template working, now I need to get the
> log
Of course! Thanks - I have the template working, now I need to get the
login functionality working for the consumer.
On Apr 29, 9:35 am, Alex Kamedov wrote:
> Your user must be redirected from django-cas-consumer login view to
> django-cas-provider
> login. Login form is shown on service with d
Your user must be redirected from django-cas-consumer login view to
django-cas-provider
login. Login form is shown on service with django-cas-provider.
On Fri, Apr 29, 2011 at 7:30 PM, Stodge wrote:
> django-cas-consumer
--
Alex Kamedov
skype: kamedovwww: kamedov.ru
--
You received th
I installed django-cas-provider and django-cas-consumer. I configured
the consumer to use the CAS service offered by the provider and I
added a base.html template for the consumer. Is this base template
supposed to contain the login form? Or is the login form supposed to
be available on teh provide
Smartif is great, I don't get why it's not a standard part of django
templates.
On Jun 17, 5:02 pm, Steve Howell wrote:
> Another option is to install the snippet below, which supports "in":
>
> http://www.djangosnippets.org/snippets/1350/
>
> On Jun 17, 1:53 pm, Ben Davis wrote:
>
>
>
> > Nope
Another option is to install the snippet below, which supports "in":
http://www.djangosnippets.org/snippets/1350/
On Jun 17, 1:53 pm, Ben Davis wrote:
> Nope, you'll need to set a variable in your view. You can also try creating
> your own filter such that {% if friend|is_in_group %} would wo
Nope, you'll need to set a variable in your view. You can also try creating
your own filter such that {% if friend|is_in_group %} would work (it's
pretty easy to do, just check out the docs for custom template filters)
On Tue, Jun 16, 2009 at 2:40 PM, CrabbyPete wrote:
>
> Is there a way do so
Is there a way do something like this with the template system
{% if friend in group.members.all %} or simply {% friend in
group.members.all %}
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
If you are trying to construct a "base" template for several views you
could
also use the {% if %} tags, and only show the relevant parts of the
page.
For example, if you wanted to display a table, but the number om
columns
would vary, this would enable you to only display the needed columns.
On
On Apr 6, 6:38 am, codingJoe wrote:
> Up front, I'm not the most elegant coder, so please forgive.
>
> I have a page that is produced using django templates. I used the
> templates to do the header and footer, but now I'm down into the body
> of the page. Using the data from my template, I
Up front, I'm not the most elegant coder, so please forgive.
I have a page that is produced using django templates. I used the
templates to do the header and footer, but now I'm down into the body
of the page. Using the data from my template, I am able to fill the
first cell.
Is is possibl
I am using Basic Blog from the Django-Basic-Apps released by Nathan
Borror if that helps.
On Sep 4, 9:44 am, unklbeemer <[EMAIL PROTECTED]> wrote:
> I am wanting to show all blog entries written by certain authors..how
> would I go about doing this in my templates.
>
> In my Blog model I have an
I am wanting to show all blog entries written by certain authors..how
would I go about doing this in my templates.
In my Blog model I have an author variable.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
Cool, thanks for the tip.
I took your latter suggestion and below is a rewrite of the
django.template.loader.get_template method. The only additional
requirement is the FS_DIR constant that I import from my settings file
(which I was already using in settings.py to clean up my TEMPLATE_DIR
path
On Mon, 2008-02-11 at 16:55 -0800, Peter wrote:
> I have a bunch of widgets that I access dynamically and they render
> their own parts of a page. I would like to give these widgets the
> ability to use templates. Furthermore, these are not installed apps,
> so I do not have access to the
> "dj
I have a bunch of widgets that I access dynamically and they render
their own parts of a page. I would like to give these widgets the
ability to use templates. Furthermore, these are not installed apps,
so I do not have access to the
"django.template.loaders.app_directories.load_template_source"
On Dec 14, 1:03 am, Steve Freitas <[EMAIL PROTECTED]> wrote:
> Only, it doesn't work. It seems like . lookups
> require the argument to be a literal, not a variable.
Grindizer addresses your specific problem of enumerating key/value
pairs in a template (piece of cake!), but if you still wanted to
have you take a look at the django documentation ?
http://www.djangoproject.com/documentation/templates/#for
Because we can see this :)
{% for key, value in data.items %}
{{ key }}: {{ value }}
{% endfor %}
On 14 déc, 08:03, Steve Freitas <[EMAIL PROTECTED]> wrote:
> I have a dictionary, an
It seems that you've made a typo. change {{myDict.key}} to {{myDict.keys}}
On Dec 14, 2007 3:03 PM, Steve Freitas <[EMAIL PROTECTED]> wrote:
>
> I have a dictionary, and I'd like to iterate over the keys, using the
> keys to look up the result, like:
>
> {% for key in myDict %}
> The key is {{key
I have a dictionary, and I'd like to iterate over the keys, using the
keys to look up the result, like:
{% for key in myDict %}
The key is {{key}} and the value is {{myDict.key}}.
{% endfor %}
Only, it doesn't work. It seems like . lookups
require the argument to be a literal, not a variable. I'
On Nov 1, 9:56 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I have this code in my view, for example:
>
> a=['a','b','c'] # a list of row labels
> b=[1,2,3] # a list of col label
> c=tab # an array (list of list) with len(a) rows and len(b) cols.
If c[i, j] previously had a value of x,
Nobody can help me ?
On 1 nov, 14:56, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I have this code in my view, for example:
>
> a=['a','b','c'] # a list of row labels
> b=[1,2,3] # a list of col label
> c=tab # an array (list of list) with len(a) rows and len(b) cols.
> return render_to_resp
I have this code in my view, for example:
a=['a','b','c'] # a list of row labels
b=[1,2,3] # a list of col label
c=tab # an array (list of list) with len(a) rows and len(b) cols.
return render_to_response('template.html',{'a':a,'b':b,'c':c})
then on the template side, it's easy to print c
{% for
I have this code in my view, for example:
a=['a','b','c'] # a list of row labels
b=[1,2,3] # a list of col label
c=tab # an array (list of list) with len(a) rows and len(b) cols.
return render_to_response('template.html',{'a':a,'b':b,'c':c})
then on the template side, it's easy to print c
{% for
Thanks Russell. I'll go re-read them (again). One of these days
they'll actually sink into my thick skull.
On Jun 7, 7:09 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 6/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
> > Figured it out. Template wanted (for whatever reason)
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
Figured it out. Template wanted (for whatever reason)
{% for foo in bar.foos.all %} instead of {% for foo in
bar.foos_set.all %}
On Jun 7, 12:09 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> I'm just getting more and more stumped.
>
> I went ahead and created a custom view for Foo, so that
I'm just getting more and more stumped.
I went ahead and created a custom view for Foo, so that's taken care
of, but Bar (which should be easy) isn't working either.
I have:
class Bar(models.Model):
name= models.CharField(maxlength=100)
foos = models.ManyToManyField(Foo,
filter_i
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
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.
On Jun 6, 4:05 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> This doesn't exactly answer your question (because I'm a huge noob
> still), but M2M relationships work in both
>
This doesn't exactly answer your question (because I'm a huge noob
still), but M2M relationships work in both directions:
http://www.djangoproject.com/documentation/db-api/#many-to-many-relationships
I think to access it in the template, you'd just need to pass the
information from your view?
O
I know I'm making this harder than it has to be, but the logic is just
escaping me.
I've got two models, say "Foo" and "Bar"
"Bar" establishes a manyToManyField relationship with "Foo":
foos = models.ManyToManyField(Foo,
filter_interface=models.HORIZONTAL, null=True, blank=True)
I'm using a ge
You could set an extra context variable in each view that tells
whether to display the div. The variable is accessible from the
parent template.
base.html:
{% if show_inset %}
{% block inset %}{% endblock %}
{% endif %}
You could also use a template tag for the whole chunk, but this s
On 2 июн, 17:37, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> On Sat, 2007-06-02 at 06:07 -0700, Eugene Morozov wrote:
> > Hello,
> > I have a question which might be trivial to answer, but I didn't found
> > answer by scanning the docs.
> > In my base template I have defined inset block:
> >
On Sat, 2007-06-02 at 06:07 -0700, Eugene Morozov wrote:
> Hello,
> I have a question which might be trivial to answer, but I didn't found
> answer by scanning the docs.
> In my base template I have defined inset block:
>
> {% block inset %}{% endblock %}
>
> I want to remove
Hello,
I have a question which might be trivial to answer, but I didn't found
answer by scanning the docs.
In my base template I have defined inset block:
{% block inset %}{% endblock %}
I want to remove tags if derived template
doesn't fill in the inset block. Of course I c
I looked through the documentation, and tried a few experiments - it looks
like you can't - but I wanted to make sure I wasn't doing something wrong:
We tried to do something like:
{% if {{trigger_variable}} %}
{% block foo %}
{% endblock foo %}
{% else %}
{% block altfoo %}
{% endblo
Well, you beat me to it, but I was going to say that a cutsom manager
is probably the way I'd do this. :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
That's not a bad solution.
I just came up with a solution I'm very happy with. I created a custom
manager that only returns visible objects.
This way I can just do categories = Category.objects.all() and
category.forum_set.all() in my template and it will only display
visible objects. It works g
Could create a list and loop through that, e.g.
cat_list = Category.objects.filter(visible=True)
list = []
for c in cat_list:
list.append({"cat":c, "forums":c.forum_set.filter(visible=True,
category__visible=True})
Then:
{% for x in list %}
{{ c.cat.name }}
{% if c.forums %}
{% for forum in
Yuck. I don't want to do it that way. It couples the display logic with
the template. If I ever need to change the criteria that determines
when to display forums/categories, I will need to change it in two
places (view and template).
--~--~-~--~~~---~--~~
You rec
timster escribió:
> {% for category in categories %}
> {{ category.name }}
> {% if category.forum_set.count %}
> {% for forum in category.forum_set.all %}
> {{ forum.name }}
> {% endfor %}
> {% else %}
> no forums in this category
> {% endif %}
>
To start off, I have two models:
class Category(models.Model):
name = models.CharField(maxlength=50)
visible = models.BooleanField(default=True)
class Forum(models.Model):
category = models.ForeignKey(Category)
name = models.CharField(maxlength=50)
visible = models.BooleanFie
Thank you, I'll have a look.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EM
Hi Malcolm,
{{forloop.counter|add:offset}} works fine.
Thanks,
Rob
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubs
On 3/11/06, Glenn Tenney <[EMAIL PROTECTED]> wrote:
>
> In my templates, I'd like to be able to (for example):
> Given an "object_list" of rateable things, I'd like to
> then get the "Rating" valules for the current user.
> I'm trying to figure out a good way to do this.
>
> I don't see any way in
In my first Django app I've got the following "rough" model (not
real code, but enough to show what I mean):
class Rateable
some stuff common to all "Rateable" objects
class Rating
who = ForeignKey(User)
what = ForeignKey(Rateable)
values = ...
class People(Rateab
On 3/10/06, Rob Slotboom <[EMAIL PROTECTED]> wrote:
>
> Is it possible to add some initial value to a forloop.counter?
>
> This would be handy when using limit and offset.
>
> More general, is is possible to use template vars as values for
> calculations:
> {{ var1 }} + {{ var 2 }}
>
I'v develop
On Fri, 2006-03-10 at 02:41 -0800, Rob Slotboom wrote:
> Is it possible to add some initial value to a forloop.counter?
>
> This would be handy when using limit and offset.
>
> More general, is is possible to use template vars as values for
> calculations:
> {{ var1 }} + {{ var 2 }}
The first t
Is it possible to add some initial value to a forloop.counter?
This would be handy when using limit and offset.
More general, is is possible to use template vars as values for
calculations:
{{ var1 }} + {{ var 2 }}
--~--~-~--~~~---~--~~
You received this message
Hi,
Once users log into my site, every page there on should have 'Welcome
User_name' on the top right corner with the option for them to logout.
I don't want to supply the user info. on every view.
Can my template check to session for user_id and see if the user is
logged in, and I could perhaps
perfect, thanks!
On 9/20/05, Boffbowsh <[EMAIL PROTECTED]> wrote:
>
> I have this exact scenario in my project:
>
> {% if
> forloop.counter0|divisibleby:"3" %}{% endif %}
>
>
I have this exact scenario in my project:
{% if forloop.counter0|divisibleby:"3"
%}{% endif %}
On Monday 19 Sep 2005 3:17 pm, Milton Waddams wrote:
> I've probably missed this somewhere though can't seem to workout how
> to do this.
>
> I want to have a list of products listed in a 3 column table with the
> number of rows growing to cover all the items.
use a for loop
--
regards
kg
http:
I've probably missed this somewhere though can't seem to workout how to do this.
I want to have a list of products listed in a 3 column table with the
number of rows growing to cover all the items.
eg.
product 1
product 2
product 3
product 4
product 5
55 matches
Mail list logo