What reason do you have for this? Security through obfuscation isn't a
good strategy, especially with something as intrinsically open as
HTML. If your site can be hacked just by being able to view the HTML
then you have bigger problems to worry about than obfuscating it.
On Mon, May 25, 2009 at 4
You want a chained select form & will need to use javascript to do it. I
prefer jquery and have used the one here -
http://www.codeassembly.com/Simple-chained-combobox-plugin-for-jQuery/
The code demos are for PHP but it's simple enough to apply to Django.
-Chris
On Sun, May 31, 2009
ecute an
insert statement via the database cursor the transaction management will
still take place, is this correct?
Cheers,
Chris
On Mon, Jun 8, 2009 at 8:11 AM, Karen Tracey wrote:
> On Sun, Jun 7, 2009 at 7:44 PM, ChrisStoyles wrote:
>
>>
>> Hi All,
>>
>> I just
fails
(again, except for any logging that has been done). The view contains a big
try/except statement and the rollback is in the "except" part.
I may have to approach this a different way, because it doesn't look like I
can easily do a fine-grained commit.
Cheers,
Chris
On Mon, J
7;t execute. Are all the calls you make to net.append()
supposed to be myrange.append() instead?
Chris
On Mon, Jun 8, 2009 at 11:46 AM, Mitch Anderson wrote:
>
> Below is what I have currently... it currently displays the numbers in
> the range its supposed to, but tying the products
PyBloxsom
developers, and thanks for their software which gave me a year of good
service!).
<http://mccormick.cx/news/entries/django-bloxsom>
Best,
Chris.
---
http://mccormick.cx
--~--~-~--~~~---~--~~
You received this message because y
The only log entries I want committed are the ones that tell me why a
roll-back occurred. What you've said below sounds like a good enough
solution, thanks for all your input.
Cheers,
Chris
On Mon, Jun 8, 2009 at 11:38 PM, Karen Tracey wrote:
> On Mon, Jun 8, 2009 at 5:39 AM, Chris
Hi,
I'm new to Django.
I've read the doc:
http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs
which is about static files but still do not quite understand what to
call everything and it isn't working
On my development machine, I want to use this hack and not deal with
other se
e a separate project somewhere in your system path so that
> all your projects can use it. Over engineering at the start is usually
> counter
> productive.
Interesting, I'm pretty sure I remember Jacob saying almost the exact
opposite in his Django tutorial at PyCon...
Chris
want to switch from MySQL to PostgreSQL. Is there an easy way for us
to take all of our data from our MySQL and move it over to PostgreSQL?
Chris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
it I'll need to chunk the data up into reasonable-sized xml files.
My questions is: what limits the size of the xml file that can be
imported with djangoadmin's loaddata command? What would people
recommend as a maximum size of xml file to use with this command?
cheers,
Chris
--
ed services and those services associated
pages? (in this app, there could be about 3 million pages that are
associated with each month though a bunch of service objects)
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://w
grant neale wrote:
> Does anyone have a hint on where I should start, re: making the
> website ready to receive this information?
Doesn't the iPhone have a web browser?
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.s
hange, so I'd like to do this through the Django
ORM. Does the Django ORM have a sql abstraction layer like sqlalchemy
where I can do the kind of thing you're proposing, or do I need to work
with models?
cheers,
Chris
--
Simplistix - Content
odels subclass that. However, as soon as
I did this, I started getting bizarre SQL errors, things like:
ProgrammingError at /some/path
relation "myapp_urlmodel" does not exist
LINE 1: ...somefield1"."somefield2" FROM "myapp_modelname" INNER JOIN
"myapp_urlm...
s such that I don't have to repeat the condition?
DRY and all that...
Chris
--~--~-~--~~~---~--~~
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@googl
e over the month names more than 6 back from the
> current position and delete the records.
I'm keen to use "real dates" as Tim suggested. Perhaps just using the
1st day in each month as the "month"?
Chris
--~--~-~--~~~---~--~~
You recei
Daniel Roseman wrote:
> If your base model doesn't contain any fields, you should probably
> mark it as abstract.
> http://docs.djangoproject.com/en/dev/topics/db/models/#id6
Thanks, knew there'd be some magic I needed t
british.assassin wrote:
> You could do this:
>
>
> {% for cell in row %}
>
> {% if forloop.first and row.url %}{{cell}}
> {% else %}
> {{cell}}
> {% endif %}
Then you're violating DRY on {{cell}}, which of course may be a lot mroe
complicated than {{cell}}...
all last):
File "models.py", line 65,
in __unicode__
return unicode(self.month.strftime('%B %Y'))
AttributeError: 'NoneType' object has no attribute 'strftime'
:-(
Chris
--
Simplistix - Content Management,
he Django book while you're at it? ;-)
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gro
Tim Chase wrote:
> Is there something obvious I missed?
Hi Tim,
I do wonder if you might get more help with these problems on the Django
developers list?
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplisti
Might as well pile on with Satchmo: http://www.satchmoproject.com
-Chris
On Mon, Oct 12, 2009 at 10:52 AM, Ben Rousch wrote:
>
> On Mon, Oct 12, 2009 at 11:50 AM, Daniel Hilton
> wrote:
> >
> > 2009/10/12 shreko :
> >>
> >> I've been looking all
Hi All,
I have a function that looks like:
def get_or_create(model,**kw):
try:
obj = model.objects.get(**kw)
except model.DoesNotExist:
obj = model(**kw)
return model
Does something like this ship with django?
If not, should it?
cheers,
Chris
--
Simplistix
/some/folder
...gives me a 404 unless I do, I'm not hopeful.
What am I doing wrong?
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--~--~-~--~~~---~--~~
You received this message be
our app you must provided full
> absolutely URL to login page, I've done it settings.py:
>
> LOGIN_URL='//login/'
Surely this should respect SCRIPT_NAME just the same as everything else?
Chris
--
Simplistix - Content Management, Batch Processing & P
buttman wrote:
> you could also do it this way:
>
> http://pythonblog300246943.blogspot.com/2009/09/cron-jobs-with-django-made-easy.html
url whacking like that is pretty evil...
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
o an
> objects.filter(),
Well, cascading deletes do happen automatically with Django, so no
problem there...
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--~--~-~--~~~---~--~
ttp://www.satchmoproject.com/docs/svn/quickstart.html
Thank you to everyone that has contributed to Satchmo and I look forward to
finalizing a 1.0 release.
-Chris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Djan
a the debugger.
Using a data dict instead of the actual request object.
the is_valid() fails for two different forms on three fields (1 for
one, 2 for the other). All three fields are choice fields.
Dump of various relevant info is below.
I appreciate any help anyone can offer.
Thanks for your time,
st.
The legacy database was ZODB, which was the problem. The data took up
about 14GB on disk in ZODB. About 1GB in Postgres
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--~--~-~--~~~-
Ended up populating the test database with fixtures via .json dumps.
Thank you very much for your help.
--- Chris
On Oct 26, 6:19 pm, Karen Tracey wrote:
> On Mon, Oct 26, 2009 at 4:12 PM, Chris Allen wrote:
>
> > Anyone have any experience with forms (ModelMultipleChoic
the way
it sets the Reply-To header to the list address...
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
).
...or you could just use xlwt and deliver the real deal ;-)
http://www.python-excel.org/
That said, I'd be surprised if the templating is the problem here, it'll
be the interaction with the database that's taking the time...
Chris
--
Simplistix - Content Management, Batc
I was
curious if anyone had done any one-off payments with Django/
authorize.net, or if there were and pluggable apps out there (I know
Satchmo, that's my backup plan).
Thanks,
Chris
--
You received this message because you are subscribed to the Google Groups
"Django users" gr
/labs
-Chris
On Wed, Dec 2, 2009 at 7:17 AM, Chris McComas wrote:
> Greetings,
>
> We have an application for our school online, just recently the
> university controller and business office finally gave us clearance to
> accept our application fee online, and they setup an account
Try this - http://code.google.com/p/django-maintenancemode/
-Chris
On Sat, Dec 5, 2009 at 6:54 PM, zweb wrote:
> What is the best way to show site down for maintenance page ?
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Django
You could add a field to store the calculated size, and override the
model's save method to perform the necessary calculation. Something
like:
def save(self, force_insert=False, force_update=False):
self.size_formatted = self.width * self.height // or whatever your
calculation actually is
I have my class definition that looks like
class Foo:
def get_bars(self):
bars = []
# do something to collect bar instances
return bars
bars = property(get_bars)
in my template, I'd like to do something like this:
{% for bar in foo.bars %}
{{bar.snafu}}
{% endfor %}
Never mind. Me am a moron. Had a totally different programming error
elsewhere. It works as is it should.
On Dec 17, 4:12 pm, Chris Curvey wrote:
> I have my class definition that looks like
>
> class Foo:
> def get_bars(self):
> bars = []
> # do someth
this may be beyond the current abilities of the Django auto-generated
admin interface, but I thought I'd ask...
I have a class called "Customer" which has a one-to-many relationship
with "ServiceRequest". I've got that all working through the admin
interface and it's working fine, like this:
cla
5.2-3
Django 1.1.1
mod_wsgi 2.5-1~lenny1
apache2 2.2.9-10+lenny6
Can anyone tell me what I'm doing wrong?
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
You received this message because you are sub
one a pattern like this? (One-to-Many, where the
"Many" side can be a series of subclasses?)
On Dec 23, 8:58 am, Chris Curvey wrote:
> this may be beyond the current abilities of the Django auto-generated
> admin interface, but I thought I'd ask...
>
> I have a class called
(although I did trace through the django.wsgi file and all the work
is still done by django.core.handlers.wsgi.WSGIHandler
- A workaround which solves the problem for me is to precede the
WSGIScriptAlias in the apache config with:
RewriteRule ^/studio$ /studio/ [R]
cheers,
Chris
PS: I never
lias*'s...
How can I step through execution from the django.wsgi file and see where
I get to? I'm guessing putting an "import pdb; pdb.set_trace()" in the
django.wsgi file won't do what I want?
cheers,
Chris
--
Simplistix - Content Management, Batch Processing &
un Apache in single process mode. See
> further down in same document on debugging.
>
>
> http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Python_Interactive_Debugger
If anyone can tell me how to do "httpd -X" on a debian or ubuntu host
I'd be very grateful
Chris Withers wrote:
> Graham Dumpleton wrote:
>>> How can I step through execution from the django.wsgi file and see where
>>> I get to? I'm guessing putting an "import pdb; pdb.set_trace()" in the
>>> django.wsgi file won't do what I want?
>&g
Karen Tracey wrote:
> On Sat, Dec 26, 2009 at 5:32 PM, Chris Withers <mailto:ch...@simplistix.co.uk>> wrote:
>
>
> If anyone can tell me how to do "httpd -X" on a debian or ubuntu host
> I'd be very grateful...
>
>
> /usr/sbin/apach
uot;root url without the
slash" case.
I have to admit, I can't see why the script name would ever need to be
trimmed like that. Graham, perhaps you might be able to shed some light
with your greater wsgi experience?
Chris
--
Simplistix - Content Management, Batch Processing & Pytho
have mod_rewrite enabled.
I don't think so, I've checked with the rewrite engine's logging and all
the urls in question are being passed straight through.
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
Continuation wrote:
> Now if I change the single quotes to double quotes, it seems to work:
> (1, "I'm looking for..."),
Double quotes are absolutely fine and a lot nicer to look at than
'I\'m hard to read'.
cheers,
Chris
--
Simplistix - Content M
if isinstance(content, Tweet):
> delta = datetime.datetime.now() - content.pub_time
> else:
> delta = datetime.datetime.now() - content.pub_date
> if delta.days > 30: #failure
>
>
> local variable 'delta' referenced b
ch
directly covered this issue so submitted a new one:
http://code.djangoproject.com/ticket/12464
Sadly, Trac ate the indentation :-(
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
You received
neridaj wrote:
> File "/Users/jasonnerida/django-apps/blog/models.py" in
> moderate_comment
> 142. if delta.days > 30:
Okay, now the line numbered code for the whole of the moderate_comment
function...
Also, check you're not mixing tabs and spaces in th
You'll probably want to use one of Django's thumbnail apps. Here's the one I
recommend:
http://code.google.com/p/sorl-thumbnail/*
-*Chris
On Sat, Jan 2, 2010 at 9:48 AM, nameless wrote:
> Hi everyone I have a simple question.
> This is my model:
>
>
> class
I have a site built with Django, we're switching things up and will be
running ExpressionEngine as our main CMS for the "front-end" /
marketing piece of our site. We will have two Django apps running
elsewhere on the site, one is a Course Management Software we built in
house, the other is an onlin
Well, I don't know the answer to your original question, but if you want to
help out with Satchmo (http://www.satchmoproject.com) feel free to. It's an
ecommerce framework not an HR or warehouse mgmt but maybe it will meet your
needs.
-Chris
On Thu, Jan 7, 2010 at 4:35 PM, Mohammad Tay
davathar wrote:
Unfortunately adding the rewrite rule mentioned as a work around
hasn't worked for me.
Please post the relevant section of your Apache config (including your
wsgi *and* rewrite lines), there's no reason the rewrite rule workaround
shouldn't work for
It really depends on how you're selecting the data from the database. If
you're doing something that necessitates a full table scan(like in-DB ORDER
BY) it will slow you down considerably. If you're selecting one row from the
database by an indexed column, then the performance will be very fast and
at 3:20 PM, nameless wrote:
> The table is queried from ajax using an autocomplete field with this
> query in the views.py:
>
> books.objects.filter(book_title__istartswith=request.GET['q'])[:100]
>
>
>
>
> ---
>
> On Jan 12, 8:47 pm, C
Alessandro Ronchi wrote:
I cannot use an SMS gateway for my app (I must use a SIM and an hardware
modem).
Why? This is not a sane requirement for a web app...
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
>1. my apache server on port 80 serves both a normal site (php) and the
>django files. i would like to keep my normal site on port 80. is there
>a way to keep it that way? as far as i understand the two servers must
>be running on different ports.
Look into what is called a "reverse proxy" e.g. Sq
rying to rack up a load of
cell phones and writing to them...
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
--
You received this message because you are subscribed to the Google Groups "Django
users" gro
Is there a way to use raw SQL with multiple databases? I thought it
might be something like:
from django.db import connection
cursor = connection.cursor(using="mydb")
but that complains about an unexpected keyword arg.
--
You received this message because you are subscribed to the Google Group
>
> from django.db import connections
>
> cursor = connections['mydb'].cursor()
> cursor.execute('INSERT ')
>
> That is, the 'db.connection' object has been replaced with an index
> called 'db.connections', keyed by database alias. Each of those
> connections behaves as the single connection di
I have this view with my form: http://dpaste.com/152046/ when I try to
submit the form I'm getting this error: unsupported operand type(s)
for //: 'unicode' and 'int' what did I do wrong?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post t
numbers like 40 or 4
On Jan 29, 8:43 am, rebus_ wrote:
> On 29 January 2010 14:40, Chris McComas wrote:> I
> have this view with my form:http://dpaste.com/152046/when I try to
> > submit the form I'm getting this error: unsupported operand type(s)
> > for //: 'unicode
The form is a ModelForm, where the fields involved, all of them are
DecimalField()
On Jan 29, 9:03 am, Chris McComas wrote:
> Changed my view to this:
>
> http://dpaste.com/152061/
>
> This is the full error message:
>
> http://dpaste.com/152060/
>
> The first t
Hey everyone, here's all of the information:
Here's the models:
http://dpaste.com/152277/
Here's my view:
http://dpaste.com/152061/
Here's the full error message:
http://dpaste.com/152060/
On Jan 29, 9:13 am, Chris McComas wrote:
> The form is a ModelForm, where the
I have this model http://dpaste.com/153722/ and I have a ModelForm for
it on my site. When I complete the form it saves everything as it
should and displays just a detail page for each entry with all of the
correct information from the Model.
When I go back to edit the form, or I view it in the CR
Here's my model form:
http://dpaste.com/153728/
The info isn't being saved as an empty value. When I view my db with
phpmyadmin, the correct values are in the ha_grade and hp_grade field
in the db, the drop-down list on the forms is just not displaying them
as being 'selected'.
On Feb 2, 10:09
Here's my view:
http://dpaste.com/153735/
One thing I just thought of, is it a problem that the data for
ha_grade and hp_grade are saved in the db as 4.3300 or 4. or
3.6700 but in the on my form they're like this: 4.33 or 4.0
or 3.67 ???
On Feb 2, 10:32 am, Shawn Milochik wrote:
> Okay.
Here's the view...
http://dpaste.com/153735/
Could it possibly be that the grade is saved in the db as 4.3300 or
4. or 3.6700 but when I view source the select on the form looks
like this:
-
A+
A
A-
B+
B
B-
C+
C
C-
CR
On Feb 2, 10:32 am, Shawn Milochik wrote:
> Okay. Sorry, I don
in my views that'd be fine as well...
On Feb 2, 10:56 am, Shawn Milochik wrote:
> On Feb 2, 2010, at 10:40 AM, Chris McComas wrote:
>
> > Here's my view:
>
> >http://dpaste.com/153735/
>
> > One thing I just thought of, is it a problem that the data for
>
Shawn -> thnx for your help, that "hacky" fix isn't working tho...
On Feb 2, 11:09 am, Chris McComas wrote:
> Thnx. The reason the grade values are 4.33, 4. 3.67 etc is because
> that value is multiplied by the value entered for ha_credithours and
> hp_credithours. If
Like this?
http://dpaste.com/153790/
On Feb 2, 12:19 pm, Shawn Milochik wrote:
> On Feb 2, 2010, at 11:49 AM, Chris McComas wrote:
>
> > Shawn -> thnx for your help, that "hacky" fix isn't working tho...
>
> Sorry 'bout that. I didn't really test
t the form and it's still not showing anything as
for ha_grade or hp_grade. The drop-down for each
still lists the value as 4.33 or 4.0 or 3.67 etc?
On Feb 2, 12:51 pm, Shawn Milochik wrote:
> On Feb 2, 2010, at 12:48 PM, Chris McComas wrote:
>
> > Like this?
>
> &g
h. Ha
On Feb 2, 1:03 pm, Chris McComas wrote:
> Nope. I dropped the table completely and started from scratch. I'm
> still testing it out, so there hasn't been any real data entered so I
> can play around with it. I dropped the table, uploaded my new models,
> syncdb, and
Again, this is my view:
http://dpaste.com/153735/
I'm thinking the error is in someway related to this line:
new_green.hp_coursepoints = new_green.hp_grade * hp_credithours
The only thing I changed was changed hp_grade from a DecimalField to
FloatField
On Feb 2, 1:14 pm, Chris Mc
Gleber,
I'll try that as well. If I can just figure out how to multiply
total = = new_green.hp_grade * hp_credithours
Where hp_grade is a FloatField (double in the MySQL db) with
hp_credithours which is a DecimalField (decimal in the MySQL db) I
think they'd solve the problem.
On Feb 2, 2:25 pm
is a DecimalField
hp_grade is a FloatField
hp_credithours is a DecimalField
I tried this, but no luck:
new_green.hp_coursepoints = Decimal(new_green.hp_grade) *
hp_credithours
On Feb 2, 2:27 pm, Chris McComas wrote:
> Gleber,
>
> I'll try that as well. If I can just figure out how to
Javier,
WORKED PERFECT! THANK YOU ALL SO MUCH! :)
On Feb 3, 9:50 am, Javier Rivera wrote:
> Chris McComas wrote:
> > I tried this, but no luck:
>
> > new_green.hp_coursepoints = Decimal(new_green.hp_grade) *
> > hp_credithours
>
> Decimal can't directly
This is kinda of a general and kind of a specific question. I have
this in my view:
http://dpaste.com/154208/
The first line adds up perfectly, but the second one doesn't and
throws an index out of range error.
What is the problem?
cog.interview_score and cog.interview_score_conv are both
Decim
I'm trying to run this IF in my views, it's throwing an index out of
range error.
http://dpaste.com/154249/
What have I done wrong?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.
not right
and threw a bad syntax error.
The field rating_recommendation is a CharField in my model/db.
On Feb 3, 2:58 pm, Shawn Milochik wrote:
> On Feb 3, 2010, at 2:52 PM, Chris McComas wrote:
>
> > I'm trying to run this IF in my views, it's throwing an index out of
> > ran
lative difficulty of getting
them done.
-Chris
On Sat, Feb 6, 2010 at 12:57 PM, snfctech wrote:
> I'm building an order entry and tracking system for a Food Co-op for
> their case and special orders. We don't need the system to be on-line
> (at the moment), but many of t
How set initial form field value in the view function?
The initial keyword is great when defining a subclass of Form if you
the initial values is ALWAYS the same.
What if it varies?...I'm guessing I must set it in the view.
How set this initial value in the view?
Chris
--
You received
How interate over just a slice of form fields in template?
I tried {% for e in form|slice:":5" %} but it appears the slice part
is just ignored.
cs
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us.
You probably don't want to reference the login view to /accounts. You
probably mean to do this:
(r'^accounts/', include ('django.contrib.auth.urls'),
That will map /accounts/login to django.contrib.views.login, /accounts/
logout to django.contrib.views.logout, etc.
In general, when using an app,
pattern.reverse_dict:
> File "/usr/lib/python2.6/dist-packages/django/core/urlresolvers.py" in
> _get_reverse_dict
> 199. self._populate()
> File "/usr/lib/python2.6/dist-packages/django/core/urlresolvers.py" in
> _populate
> 168.
Much like programming, it will come from experience. Practice a lot. You'll
make a lot of things you aren't happy with, probably like your first bits of
code :) Try to imitate things you like, and see the techniques they use to
create cool designs. It, like anything else worth doing, will be easier
Ever time a web page is visited, a view is called and a NEW request
object is passed in right?
Then if I'm not mistaken, it appears you can't maintain
request.session when you visit a new web page and a new view because a
NEW request object is passed in to the new view right?
My personal co
Wow beautiful. Thanks. I needed that.
cs
On Jul 10, 12:14 am, Javier Guerra Giraldez
wrote:
> On Fri, Jul 9, 2010 at 11:36 PM, Chris Seberino wrote:
> > elif form.is_valid():
> > ...
> > request.session["posts"].append(form.cleaned_data)
>
SESSION_SAVE_EVERY_REQUEST = True
(in settings.py)
seems to avoid a lot of potential bugs from forgetting to set
request.session.modified = True when necessary.
Is this a serious performance problem? If not, I would think this
would be a good *default* value for Django no?
Chris
--
You
I have this query, trying to get the next game in the future.
today = datetime.datetime.now()
next_game = Game.objects.filter(date__gt=today).order_by('date')[:1]
I need to use .get() if possible, instead of .filter() how can I do
this?
--
You received this message because you are subscribed to
database, in a
separate query where sport=sport and opponent=opponent to figure out
the historical Win/Loss record between the teams?
On Jul 12, 8:15 pm, John M wrote:
> Why does it matter?
>
> You could just say next_game[0] instead.
>
> J
>
> On Jul 12, 4:28 pm, Chris M
Nick, thank you so much for figuring this out!!
On Jul 8, 11:12 am, Nick Raptis wrote:
> In firefox, check your preffered language settings, in the content tab.
>
> If there is a non-standard value there (perhaps "/etc/locale/prefs.conf"
> or something) instead of a locale like en-US,
> some dja
This is my model, I'm trying to set it so that if the game is in the
future, based on the field date, then to return True, if not return
False.
http://dpaste.com/218111/
I am importing datetime in my models.py but for some reason it's
giving me nothing. I tried displaying future and nothing shows
I'm using it in my template...
Basically this http://dpaste.com/218114/
Mainly I want to use it for the {% if %} but I tried to just show it
was well and still nothing...
On Jul 14, 11:49 am, Daniel Roseman wrote:
> On Jul 14, 4:43 pm, Chris McComas wrote:
>
> > This is my
etime.datetime.now()' instead of 'datetime.now()'
>
> b>
> from datetime import datetime
> Then 'datetime.now()' should work correctly.
>
> Thanks,
> Subhranath Chunder.
>
> On Wed, Jul 14, 2010 at 9:13 PM, Chris McComas wrote:
>
>
>
501 - 600 of 1221 matches
Mail list logo