Thanks. I didn't realize that "forloop" really meant forloop. I
thought it meant the name of my loop!
On Oct 18, 4:39 am, Daniel Roseman wrote:
> On Oct 18, 3:11 am, jeffself wrote:
>
>
>
> > I've got a view that returns a generic list. It contains the
I've got a view that returns a generic list. It contains the following
fields:
school, wins, losses, pf, pa, rating
I want to add a field called rank that assigns the values 1 through
whatever for each of the records returned. Is this possible using the
templating engine or do I have to write pur
Thanks Karen! That did the trick.
--~--~-~--~~~---~--~~
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 t
Here's my url.py:
from django.conf.urls.defaults import *
urlpatterns = patterns('Rankings.college.views',
url(r'^rankings/division/(\w+)/$', 'rankings_by_league'),
)
views.py
def rankings_by_league(request, league):
try:
league = League.objects.get(slug__iexact=league)
exc
Thanks Jim. I'll give this a shot.
On Sep 25, 8:24 pm, Jim McGaw wrote:
> What you might be asking for is the following syntax, that allows you
> to perform queries against the data in more than one table:
>
> CurrentRanking.objects.filter
> (school__schoolseason__league__league_name="League Na
Derek,
I actually had done my model the way you suggested, but changed my
mind. I guess I should listen to my first instinct!
Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post t
Oops. I should have said my current view returns a list of rankings
(school_name, rating) rather than all schools.
On Sep 25, 7:59 pm, jeffself wrote:
> I've got the following models:
>
> class League(models.Model):
> league_name = models.CharField(max_length=100)
I've got the following models:
class League(models.Model):
league_name = models.CharField(max_length=100)
class School(models.Model):
school_name = models.CharField(max_length=100)
class SchoolSeason(models.Model):
season = models.IntegerField()
school = models.ForeignKey(School
I already have the demo in place. I just wanted to spruce it up with
a presentation and wanted to know if something already existed that I
could work from. Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"
Is there a presentation available that I can use? Would like to skip
the whole building of the presentation myself if possible. If there
isn't one, I may create an "open-source" presentation myself and make
it available for others to build on.
--~--~-~--~~~---~--~
I'm working on an application that will need data entry from many
users. The users belong to various departments in the organization
and the information that gets entered by each user should contain the
department information. The reason for this is that the users should
be able to view and edit
My model has 3 main classes, School, Contest, Participant.
School contains the following fields: school_name, slug, nickname.
Contest contains the following fields: date_scheduled, title, notes.
Participant contains the following fields: contest (foreign key),
school (foreign key), score
I want
Peter & Baxter,
I did not realize how easy this was. I work primarily in ColdFusion
and you cannot pass a ColdFusion variable into Javascript directly. I
never even tried to just put a template variable in for the latitude
and longitude. Wow, this is awesome!
Thanks for you help guys!
--~--~-
I'm trying to get an understanding of using maps with Django. I've
installed Geopy and totally understand how it works. I also can
produce a Google map with data I provide in the javascript. My
question is how do I get the data from Django into the Google Maps
javascript?
Example:
I have a cla
On Mar 30, 9:18 pm, Michael <[EMAIL PROTECTED]> wrote:
> I would search for "googlemapsAPI." Really though the integration
> with googlemapsis mostly a front end application. So you would
> create it all with front end javascript.
>
> The only real django knowledge to pass here would be to make
info,
> 'election_detail'),
> )
>
> and then in your election models:
> def get_absolute_url(self):
> return ('election_detail', (), { 'slug': self.slug, })
>
> 2008/4/22 jeffself <[EMAIL PROTECTED]>:
>
>
>
> > Here's t
'fields': ('precinct_photo','precinct_map')
})
)
def __unicode__(self):
return '%s %s' % (self.precinct_number, self.precinct_name)
def get_absolute_url(self):
return ('django.views.generic.list_deta
rl referring
> to the elections one,
>
> Michael
>
> On Mon, Apr 21, 2008 at 12:48 PM, 小龙 <[EMAIL PROTECTED]> wrote:
> > Show me -- Settings.py
>
> > 2008/4/21, jeffself <[EMAIL PROTECTED]>:
>
> > > I've got a project that cont
I've got a project that contains two apps (elections and precincts).
My root urls.py looks like this:
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^elections/', include('elections.urls')),
(r'^precincts/', include('precincts.urls')),
(r'^admin/', include('djang
ECTED]> wrote:
> Possibly what you have set for get_absolute_url in your models.py
> file?
>
> On Apr 18, 1:14 pm, jeffself <[EMAIL PROTECTED]> wrote:
>
> > My project contains two apps, elections and precincts. My main
> > urls.py file looks like
My project contains two apps, elections and precincts. My main
urls.py file looks like this:
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^precincts/', include('precincts.urls')),
(r'^elections/', include('elections.urls')),
(r'^admin/', include('django.cont
On Apr 16, 10:08 am, "Hernan Olivera" <[EMAIL PROTECTED]> wrote:
> > If the question is "can it handle business logic rather than just
> > be a system for writing blog software and news sites?" then most
> > certainly. Several of the Django sites I've authored (they're
> > internal rather t
I'm sure everyone has created models that contain city, state,
country, and other location information. Is there an app already
written for Django that I can import?
I want to be able to select either a country followed by a state
followed by a city (all filtered) or enter a postal code. I woul
Is there a reason you must use MySQL? GeoDjango works much better
with PostgreSQL with the PostGIS extensions.
On Mar 31, 11:40 am, Greg_IAP <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> I'm working on a image processing pipeline for french astrophysicians
> using web services through django.
>
On Mar 28, 9:34 pm, andy baxter <[EMAIL PROTECTED]>
wrote:
> Peter Rowell wrote:
> >> So should I just create two classes that are identical but name one
> >> CurrentElectionResults and the other PastElectionResults?
>
> Can't you just have a single class 'ElectionResults' and add a field
> call
On Mar 29, 11:40 pm, ameriblog <[EMAIL PROTECTED]> wrote:
> i have a site that lists candidates for mayor, on the page i have
> biographical information, also i want to include recent news for that
> candidate. i have news setup as a class in the models.py that has a
> ManyToMany relationship wi
On Mar 29, 12:56 am, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Fri, Mar 28, 2008 at 11:21 PM, <[EMAIL PROTECTED]> wrote:
> > I'm trying to figure out the best way to link-up everything. Any
> > suggestions?
>
> So, since I talked about it at PyCon, I'll take an example from this
> proje
Hey ameriblog,
I do ratings as well. My current application was written in C about
10 years ago and I've flirted with rewriting it in Python. In fact, I
posted a message on comp.lang.python last year about trying to speed
up my app:
http://groups.google.com/group/comp.lang.python/browse_thread/
I'm starting to see a lot of benefit in using UUID as a primary key
rather than autogenerated id numbers. Since Django doesn't natively
support the field, I guess you would have to use a CharField with a
max_length of 32. Unfortunately, this wouldn't produce a native UUID
datatype which Oracle a
I've created a class called ElectionResults that contains the
following fields:
election = models.ForeignKey(Election)
precinct = models.ForeignKey(Precinct)
office = models.ForeignKey(Office)
candidate = models.ForeignKey(Candidate)
total_votes = models.PositiveIntegerField(default=0)
Here's th
bobhaugen wrote:
> Following http://www.djangoproject.com/documentation/install/
>
> I'm stuck at the steps of setting up the symlinks to django.
> Step 3. ln -s `pwd`/django-trunk/django SITE-PACKAGES-DIR/django
> Step 4. ln -s `pwd`/django-trunk/django/bin/django-admin.py /usr/local/
> bin
>
>
I'm creating an election site and I have created the following 4 main
classes:
class Election(models.Model):
election_name = models.CharField(max_length=100, unique=True)
slug = models.SlugField(prepopulate_from=("election_name",),
unique=True)
election_date = models.DateField()
clas
I'm working on a project where I've identified the following classes:
class FiscalYear(models.Model):
fyear = models.CharField(max_length=6, unique=True)
startdate = models.DateField()
enddate = models.DateField()
class System(models.Model):
system_number = models.CharField(max_l
I'm trying to get an understanding of the Feed Framework, so I've
created a simple application to try it out. I have followed the steps
that are in the documentation but I'm getting the following error when
I go to this URL: "http://127.0.0.1:8000/feeds/news/":
AttributeError at /feeds/news/
'No
I have a bin directory in my home folder. In that, I created a link
for django-admin.py pointing to /opt/django-source/django/bin/django-
admin.py.
My $HOME/bin is in my path.
On Dec 27, 11:53 pm, mOne <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am using Leopard currently and am getting started with
I'm creating an admin interface using the Admin application and I've
renamed a field with the following code:
def display_classification(self):
return self.class_name
display_classification.short_description = 'Classification'
However, when I do this, the column heading no longer allows sort
Which version of Python are you using on Leopard for Django? The
included version or did you download and compile another copy?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gr
s/3588/
>
> 2007/10/31, jeffself <[EMAIL PROTECTED]>:
>
>
>
> > I just installed Leopard last night and haven't gotten around to
> > installing Django yet. Should I use the default Python installation
> > or should I install Python myself like I did in Tig
I just installed Leopard last night and haven't gotten around to
installing Django yet. Should I use the default Python installation
or should I install Python myself like I did in Tiger? Any issues
with psycopg2 or the egenix stuff? I'm not worried about mod python
yet since I'm still in the l
I've never run into this problem before but all of a sudden its not
working. My source is located in /opt/django_src. I run 'sudo svn
update' and I'm now getting errors.
svn: PROPFIND request failed on '/svn/django/trunk'
svn: PROPFIND of '/svn/django/trunk': Could not read status line:
Connect
On Jul 20, 11:09 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 7/21/07, jeffself <[EMAIL PROTECTED]> wrote:
>
>
>
> > How do I get the season to
> > display in the select box of my season field on the Game form?
> > Normally th
On Jul 20, 4:50 am, lars <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> yesterday I tried to install django on my macbook. Since I wanted to
> have a more recent python interpreter I installed the one from
> macports.
> There's a pitfall, however. Because in order to get MD5 running you
> have to inst
In my model for my application, I've created a class called Season.
There is only one field in this class and that is called year and its
of type integer. In another class called Game, I have a field called
season which is a ForeignKey to Season. When I bring up the add Game
form in the Admin, m
Just updated Django to latest version. I'm running it on a Mac Book
Pro with Python 2.5.1 from the MacPorts packaging system. When I run
'python manage.py runserver', I get the following error:
ImportError: No module named _md5
I have a feeling this may be more of a python problem than Django,
44 matches
Mail list logo