I have a template as such:
---
|
TITLE|
|--|
|| |
||
| Item 1
Hi there,
I'm wanting to display the durrent day, month and year on my site and
wanted to know the easiest way to do it.
Would I have to create a template tag, or is there anyway of just
sticking it straight into the template?
Something similar to what the following php returns:
date("F j, Y");
Thanks for the advice Peter.
I did what you said, and nothing showed (meaning the {% if
is_paginated %} was false).
How would I make it so is_paginated=True? I don't see how this is set
anywhere.
When i removed the IF statement so I could just see if the {% load
paginator %} code worked I get t
Ahh thanks very much
On Mar 27, 12:03 am, Brian Armstrong <[EMAIL PROTECTED]> wrote:
> On Mar 26, 6:56 pm, DuncanM <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have a template that looks like such:
>
> > {% if object_list %}
>
I have a template that looks like such:
{% if object_list %}
{% for menu in object_list %}
{{ menu.name }}
Description: {{ menu.description }}
{% endfor %}
{% else %}
No menus have been created yet, please check bac
Just to clear up if its not obvious already. In the admin section
when I add a new Menu, I get the MenuItems shown below to add, just
when I click the save button it does not save them to the DB, but it
does save the menu created.
--~--~-~--~~~---~--~~
You received
Yeah, I've done that, I actually created the models at the same time
so they were all created at once.
On Mar 9, 1:35 pm, Nick Fishman <[EMAIL PROTECTED]> wrote:
> DuncanM wrote:
> > I checked my DB and for somereason the MenuItem's are not being saved
> > whe
I was trying to create some models similar to that of the basic
example "Polls" application. Except instead of Polls and Choice, it
would be Menu and MenuItem.
I have the following in my models:
from django.db import models
# --
# Menu Class
# --
class Menu(models.Model):
nam
iew in the Events
application. How would I create a view external to all apps that I
can add all the necessary code in to make my home template?
Regards,
Duncan
On Mar 8, 8:11 pm, Nick Fishman <[EMAIL PROTECTED]> wrote:
> DuncanM wrote:
> > My events.views:
> > [code]
> &
I thought I could link two apps together however I can't seem to get
this working.
I have 2 very very basic apps (news, events)
And i would like to display them both on a homepage as sort of widgets
(just showing latest 5 of each)
I have a events.html template:
[code]
5 Upcoming Events
{% if l
I want to create a model that doesn't ask for the users input on the
date, it takes the days date automatically,
I thought it would be as simple as doing:
class News(models.Model):
newsTitle = models.CharField("News Title", maxlength=200, core=True,
help_text="Title of the news item e.g. websi
Hi Karen,
(r'^team/(?P[0-9]+)/results/(?P[0-9]+)/$',
'django.views.generic.list_detail.object_detail', dict(results_dict,
template_name='teams/team_results_reports.html')
doesn't work for me, but I've been thinking about your post, and you
were right about me wanting to leave breadcrumbs (why co
Thanks for the help Tim, however I've tried that and it doesn't work :
(
Is there any other way you could think of achieving it, even if it
doesn't use generic views and urls?
Thanks,
Duncan
--~--~-~--~~~---~--~~
You received this message because you are subscri
Firstly: there are many teams, each team can have many results.
so obviously you'd need an id for the result id as well not just team/
1/results/detail.
Sorry it was a bad example in the previous post, it could be team/3/
results/5/ or team/10/results/522 (i.e. the team and results numbers
aren
Hi,
I have looked at the django docs and couldn't find anything exactly
related to what I want to do. I have my urls set up currently so:
team/
returns a page for that team
team//results
returns a results page for that team
I'm stuck when trying to do:
team//results/
which I'd like to return
Thanks for the quick and detailed reply Russ, I'll have a look at the
wiki now.
Regards,
Duncan
On Apr 17, 12:33 am, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 4/17/07, DuncanM <[EMAIL PROTECTED]> wrote:
>
>
>
> > Briefly, I have a
Briefly, I have a system set up to manage football teams, with
fixtures, results, players etc.
How would I go about editing the admin permissions so that User X
could only edit the fixtures and results for Team X, and User Y could
only edit the fixtures for Team Y? I've looked at the admin secti
et_sql_clause()
if fieldname == '*':
column = '*'
else:
column = self.model._meta.get_field(fieldname).column
cursor = connection.cursor()
cursor.execute("SELECT COUNT(*)" + sql, params)
cursor.execute("SELECT COUNT(%s)&quo
{{ result.opponentscore }}
{{ fixture.opponent }}
{% endfor %}
{% endfor %}
However neither attempt at showing a result work, any help is much
appreciated.
Duncan
On Mar 14, 11:27 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Wed, 2007-03-14 at 04:20 -0700, DuncanM wrote:
&
lcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Wed, 2007-03-14 at 00:13 +, DuncanM wrote:
> > I have a schema as follows:
> [...]
> > How would I get it so I had a template that showed:
> > Result
> > Team A 0 - 3 Team B 22/03/07
>
> > e.g. the homeTeam
Thats the problem, I have no idea where to start with it, so do not
have any current code for it, or any errors.
Duncan
On Mar 14, 3:42 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> Can you post your current code...and the error you are receiving?
>
> On
I have a schema as follows:
Team
Fixture
Result
=
====
id
id
id
name
homeTeam fixture_id
.
awayTeam homeScore
date
awayScore
I'm not sure exactly how you could do this,
but for an employee to change department, you will edit it. This edit
is saved in django's admin log (or whatever its called) so maybe you
look at something similar to that where it only saves the changes for
an employee where the department id has chan
I have some classes related to football (soccer),
I have Player, Team, Fixture, Result, Squad, Squad Selector,
Appearance and Scorer classes. They way I have modelled it is that A
player belongs to a squad, and each team is picked from a squad (e.g.
a squad may consist of 30 players but a team wi
Ooops I realise you can use a verbose name on a foreign key field you
must just use verbose_name="xxx"
e.g. Poll = models.ForeignKey(Poll, verbose_name="the related poll")
On Mar 5, 9:16 am, "DuncanM" <[EMAIL PROTECTED]> wrote:
> Thank you Kai,
> I rea
line:
fixture = models.ForeignKey(Fixture, "Fixture", core=True,
help_text="Fixture to select squad for.")
the bit "Fixture" which I have on all my fields because I thought it
is a verbose name, which you cannot apparantly specify for a foreign
key (I assume it gets it
Any help please im desperatly stuck.
TIA duncan
On Mar 2, 5:13 pm, "DuncanM" <[EMAIL PROTECTED]> wrote:
> On top of the above post, I've come accross an error when trying to
> sync my db (with having simplified list_displays not those from
> above). When ever I
ecent call last):
File "manage.py", line 11, in ?
execute_manager(settings)
File "/home2/duncanm/lib/python2.4/django/core/management.py", line
1319, in execute_manager
execute_from_command_line(action_mapping, argv)
File "/home2/duncanm/lib/python2.4/django/
list_display = ('result', 'howdenscore', 'opponentscore',)
list_filter = ['result',]
search_fields = ['result']
I was wondering in the admin panel for the result, I have list_display
= ('result', 'howdenscore', 'o
date in the dd/mm/yy format. And again only
displays that date format to the user.
DuncanM
On Mar 2, 2:18 pm, Tim Chase <[EMAIL PROTECTED]> wrote:
> > In my models I use DateField quite a few times, is there any
> > way I can adjust it so it stores information in the database
&
In my models I use DateField quite a few times, is there any way I can
adjust it so it stores information in the database as dd/mm/yy and
retrieves/handles it in this way too rather then its current -mm-
dd format?
Thanks
--~--~-~--~~~---~--~~
You received th
When you use this field type, django automatically places a clock next
to the field which is very handy with quick links: 6am, noon,
midnight, now() or something similar.
Is there any way I can get the list that is displayed then to be set
values? such as 10am, noon and 2pm? or will I have to rel
Any idea where outside it could be? I am using mod_python with apache.
Thanks for all your help
Duncan
On Feb 26, 7:34 pm, "Honza Král" <[EMAIL PROTECTED]> wrote:
> On 2/26/07, DuncanM <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi,
> > I have so
On Feb 26, 5:45 pm, "oggie rob" <[EMAIL PROTECTED]> wrote:
> I can't tell if this is the cause, but you should remove the "pass"
> right under "class Admin":
>
> -rob
Nope I have that on my other classes as well and I don't have any
problems with them, I did try removing it just in case but it
Hi,
I have some models related to a football (soccer) team, I had models
for everything working fine except my Results model. I tried adding
it yesterday and encountered a few problems with it, which was solved
due to the help from these groups (thanks). However now when I run
syncdb I don't get
Indeed, I am such an idiot at times.
Once again your help is very much appreciated.
Many thanks
Duncan
On Feb 26, 1:06 am, "Chase" <[EMAIL PROTECTED]> wrote:
> I don't know exactly what it's referring to, but check to make sure
> that any True's in your model (I don't see any in the one you post
se?
On Feb 26, 12:33 am, "DuncanM" <[EMAIL PROTECTED]> wrote:
> Thank you Honza and Chase, you have both been extremely helpful.
>
> Many thanks,
> Duncan
>
> On Feb 26, 12:09 am, "Chase" <[EMAIL PROTECTED]> wrote:
>
> > More like:&g
Thank you Honza and Chase, you have both been extremely helpful.
Many thanks,
Duncan
On Feb 26, 12:09 am, "Chase" <[EMAIL PROTECTED]> wrote:
> More like:> goalkeeper = models.ForeignKey(Player,
> related_name="goalkeeper_for")
> > leftback = models.ForeignKey(Player, related_name="leftback_
)
etc??
On Feb 25, 10:29 pm, "Honza Král" <[EMAIL PROTECTED]> wrote:
> On 2/25/07, DuncanM <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have 2 classes:
>
> > class Player(models.Model):
> > team = models.ForeignKey(Team)
> > forename = mo
I have 2 classes:
class Player(models.Model):
team = models.ForeignKey(Team)
forename = models.CharField(maxlength=50)
surname = models.CharField(maxlength=50)
age = models.PositiveIntegerField()
sex = models.CharField(maxlength=1, choices=Gender_Choices)
class Admin:
pass
lis
L:http://duncanm.webfactional.com/teams/1/
Exception Type: TemplateSyntaxError
Exception Value:'if' statement improperly formatted
Exception Location: /home2/duncanm/lib/python2.4/django/template/
defaulttags.py in do_if, line 608
I know this is a very stupid question but from
Hi, I know this isn't necessarily a Django specific problem but I am
using django to develop my system so here goes.
Basically I am making a system for a football team (soccer for you
americans) and can't seem to get my head around a way of possibly
doing it.
I've left out some of the other stuff
Just a quick update, I intend to go with webfaction hosting so if there
is anyone out there willing to help me every now and then and wants the
10% affilliation then either reply here or email me directly.
Many thanks to all the suggestions.
DuncanM
On Oct 23, 2:48 pm, "Hollywood Cole&quo
d
from the hosting company)
And the same with Webfaction using their affiliate scheme (people get
10% of what I will be spending per month) so if anyone is interested
let me now.
Thanks again,
Duncan
sjzabel wrote:
> Hi Duncan,
> I have been happy with the US based webfaction.com
&g
I've looked through the hosting recommendations on the django site and
can't find any uk based django providers, could anyone suggest any?
I'm also looking for reliable cheap django hosting (based anywhere) if
anyone has some suggestions.
anges to the database also reflect in the
menu.
Thanks,
DuncanM
--~--~-~--~~~---~--~~
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 unsu
46 matches
Mail list logo