I'm using the Blueprint CSS framework and need to be able to have
every 6th list item processed with different code than every 1st-5th.
I guess you could do some sort of "is divisible by 6" thing, but I'm
not sure exactly what's entailed to get the job done. New to Django,
if you haven't noticed.
mamco wrote:
> Hi,
> In attempting to get a better grasp of Django, I'm attempting a fairly
> simple timecard app. Multiple users of a small chain of retail
> stores, where occasionally the employees jump between stores(company),
> and between projects and activities.
>
> The interesting model i
> This is a major clue. Even if nothing was returned from your template tag
> the paragraph text would still show up. My bet is that you don't have a
> Block 'arts' in the "front/index.html." You will need that if you want it to
> display.
> Seehttp://docs.djangoproject.com/en/dev/topics/template
On Fri, May 1, 2009 at 9:02 PM, Charlie DeTar wrote:
> I am indeed using the latest trunk (R10651). I'm actually not
> particularly interested in testing commit or rollback; though thanks
> for the pointer, that helps for the future. I'm really just
> interested in testing cases which raise Int
On 5/1/2009 5:47 PM, mamco wrote:
> Hi,
> In attempting to get a better grasp of Django, I'm attempting a fairly
> simple timecard app. Multiple users of a small chain of retail
> stores, where occasionally the employees jump between stores(company),
> and between projects and activities.
>
> Th
> What is the proper way to "reset" or "rollback" the connection in a
> test case after an IntegrityError has been raised? This only seems to
> be an issue with PostgresSQL; in sqlite the "current transaction is
> aborted, commands ignored" doesn't seem to come up.
>
>
> What vers
Hi,
In attempting to get a better grasp of Django, I'm attempting a fairly
simple timecard app. Multiple users of a small chain of retail
stores, where occasionally the employees jump between stores(company),
and between projects and activities.
The interesting model is something like this:
cla
On Fri, May 1, 2009 at 1:44 PM, Charlie DeTar wrote:
>
> Hi,
>
> I'm writing tests for an application, and want to test cases where
> IntegrityError's get raised. However, whenever an IntegrityError
> comes up, I can't get the test client to recover -- it always fails
> with:
>
> InternalError:
Just ran into a URLs tag issue myself figured id add onto this
discussion to reveal a little tidbit that's very important.
Be VERY VERY careful of errors in your urls.py file. I was dealing
with an issue like this all day and realized I had some incorrect
syntax in my urls.py. Things seemed to be
Hello,
I'm using Django 1.1 beta / firefox 3 / ubuntu jaunty
When i go in the admin site i cannot save anything. The "save" buttons
don't work at all, they don't do anything, for any table.
It use to work but today i deleted my sqlite3 db and recreated it
using syncdb and the problem appeared.
The problem was it wasn't creating the tables like it should, all it
did was spit out that warning. I assumed that the warning was the
reason the tables weren't created. But I just now realized the reason
the tables weren't being created was because I forgot to add the app
in the settings.py file.
On Fri, 2009-05-01 at 13:49 -0700, jrs_66 wrote:
> Thanks! Very helpful!
>
> Any idea where a very experienced SQL coder can find a few details
> beyond the three pages of model/queryset documentation? Such as
> information on a) SQL CASE statements (or equivalent), b) performing
> LEFT JOINs (
On Fri, 2009-05-01 at 14:59 -0700, nbv4 wrote:
> Whenever I run the syncdb command, I get this error:
>
> ch...@chris-desktop:~/Websites/jobmap$ python manage.py syncdb
> /var/lib/python-support/python2.6/MySQLdb/__init__.py:34:
> DeprecationWarning: the sets module is deprecated
> from sets im
You see MySQLdb warning not Django.
May be you are using MySQLdb version that is not full compatible with Python 2.6
On Sat, May 2, 2009 at 1:59 AM, nbv4 wrote:
>
> Whenever I run the syncdb command, I get this error:
>
> ch...@chris-desktop:~/Websites/jobmap$ python manage.py syncdb
> /var/li
Whenever I run the syncdb command, I get this error:
ch...@chris-desktop:~/Websites/jobmap$ python manage.py syncdb
/var/lib/python-support/python2.6/MySQLdb/__init__.py:34:
DeprecationWarning: the sets module is deprecated
from sets import ImmutableSet
I'm using Python 2.6 on Ununtu 9.04. I s
On Fri, 2009-05-01 at 14:27 -0700, Malcolm Tredinnick wrote:
[...]
> Again, provide some details about the problem(s) you're trying to solve
> and we can help.
Email is always hard to interpret, since it doesn't include body
language. If there's any confusion about the intent of my words: I'm
*no
On Fri, May 01, 2009 at 01:49:55PM -0700, jrs_66 wrote:
> On May 1, 2:03 pm, Malcolm Tredinnick wrote:
> > So what's the model-related situation where a case-statement is
> > going to be necessary? I know some exist, but I'm interested in
> > which particular problem you're trying to solve so that
I have these two models:
class CoursePrefix(models.Model):
prefix = models.CharField(max_length=6)
title = models.CharField(max_length=40, blank=True)
department = models.ForeignKey(Department)
def __str__(self):
return self.prefix
class Meta:
verbose_name_pl
Thanks! Very helpful!
Any idea where a very experienced SQL coder can find a few details
beyond the three pages of model/queryset documentation? Such as
information on a) SQL CASE statements (or equivalent), b) performing
LEFT JOINs (or equivalent). Would studying the source code be my best
op
Probably not necessary to start each title with "help" (which is pretty
much implicit in the fact that there's a question asked on the list) or
"beginner" (which isn't particularly helpful to us, as it could mean
antyhing). Just a note for the future. :-)
On Fri, 2009-05-01 at 12:16 -0700, zayatz
On Fri, May 1, 2009 at 4:07 PM, zayatzz wrote:
>
> As far as i know all templatetag errors fail silently (true?)
Actually templatetags can throw errors in the templates by, well, throwing
an uncaught exception (try the url tag that doesn't have a reverse without
'as' in it). So if there was an
As far as i know all templatetag errors fail silently (true?) In any
case im not getting an error, but i dont get this paragraph with The
time is text either.
Just in case you need view code too - ill post it here.
def index(request):
if 'language' not in request.session:
On Fri, May 1, 2009 at 3:16 PM, zayatzz wrote:
>
> Hello
>
> In order to find more about django i proceeded to try creating
> templatetags. I decided to follow custom templatetag examples at
> djangoproject and djangobook (they are slightly different in both
> compliation and renderer part).
>
>
Hello
In order to find more about django i proceeded to try creating
templatetags. I decided to follow custom templatetag examples at
djangoproject and djangobook (they are slightly different in both
compliation and renderer part).
In any case the outcome is that the example described there does
Can't answer your question directly, but it looks as if you are trying
to extend the field list for a user. In this case you should check out
the proper way of doing it using AUTH_PROFILE_MODULE:
http://docs.djangoproject.com/en/dev/topics/auth/?from=olddocs#storing-additional-information-about-u
> What is the proper way to "reset" or "rollback" the connection in a
> test case after an IntegrityError has been raised? This only seems to
> be an issue with PostgresSQL; in sqlite the "current transaction is
> aborted, commands ignored" doesn't seem to come up.
To make this more concrete, he
Malcom,
Cheers to that.
It's always hard to figure out what attitude you are conveying when
you post to a message board so I don't know how I sound in this
thread. Forgive me if I sound whiny or complainy, that is certainly
not my intent. Quite the contrary, my overall attitude toward Django
is
On Fri, 2009-05-01 at 11:28 -0700, Malcolm Tredinnick wrote:
[...]
> Certainly the error reporting from some of the URL resolving is a little
> weak and that's something we're going to fix at some point. Hopefully
> before 1.1 comes out. So bear with us for a little while longer on that
> front an
On Fri, 2009-05-01 at 11:13 -0700, Kevin Audleman wrote:
>
> > I can't explain any of this, but I've been thinking about your
> > question since you posted it beause I know this type of error happens
> > to me a lot (and indeed has been hard to debug), but I couldn't put my
> > finger on remember
> I can't explain any of this, but I've been thinking about your
> question since you posted it beause I know this type of error happens
> to me a lot (and indeed has been hard to debug), but I couldn't put my
> finger on remembering what my solution was. It just happened, I fixed
> my syntax er
On Fri, 2009-05-01 at 10:48 -0700, jrs_66 wrote:
> Hi,
>
> Any pointers as to where I could find any info about performing a SQL
> CASE statement using Django? Even more fundamental... is there really
> no way of doing a LEFT OUTER JOIN in Django (other than terribly
> sloppy role your own hacks
Hi,
Any pointers as to where I could find any info about performing a SQL
CASE statement using Django? Even more fundamental... is there really
no way of doing a LEFT OUTER JOIN in Django (other than terribly
sloppy role your own hacks)? Does anyone know of any more complete
model/queryset docs
Hi,
I'm writing tests for an application, and want to test cases where
IntegrityError's get raised. However, whenever an IntegrityError
comes up, I can't get the test client to recover -- it always fails
with:
InternalError: current transaction is aborted, commands ignored until
end of transact
On May 1, 4:59 pm, deostroll wrote:
> Hi,
>
> Suppose if I want to edit a contact in my contact book, I am able to
> initiate the appropriate command because I know the primary key value.
> How do you get the data pertaining to this key value in your python
> code? Ultimate aim is to load a web f
Got it, shouldn't be hitting /polls
Since we put in the object_id
Alex
On May 1, 8:57 am, arfinsd wrote:
> Have a newbie question. I'm stuck on the tutorial and keep getting a
> 404 error when I try to hit:http://127.0.0.1:8000/polls
>
> My files are listed below, does anyone see something tha
Hi,
Suppose if I want to edit a contact in my contact book, I am able to
initiate the appropriate command because I know the primary key value.
How do you get the data pertaining to this key value in your python
code? Ultimate aim is to load a web form, with appropriate data in the
form...
--deo
Have a newbie question. I'm stuck on the tutorial and keep getting a
404 error when I try to hit: http://127.0.0.1:8000/polls
My files are listed below, does anyone see something that I'm doing
wrong?
URLS.py
#--
# Uncomment the next two lines to enable the admin
> Plain ol' Python multiple inheritance should work. Just define the
> fields you want in some class:
> {{{
> class PersonMixin(object):
> first = models.CharField(max_length=16)
> last = models.CharField(max_length=16)
>
> class Person(models.Model, PersonMixin):
> pass
>
> class Pers
I created the following:
class Profile(models.Model):
user= models.ForeignKey(User, unique=True)
phone = models.CharField(max_length=15, blank = True, null
= True, unique = True)
def __unicode__(self):
return self.user.username
But when I look at it in the Adm
I completely removed pil from my system and rebuilt it with --force
and now it seems to be working. Thanks for the help!
On May 1, 10:23 am, George Song wrote:
> Can you try the same operation using the Django development server and
> see what happens?
>
> On 5/1/2009 7:19 AM, Jason Sypolt wrote
Ok, I overloaded save_formset in BAdmin and everything works fine.
Thank You.
On 1 Maj, 16:46, George Song wrote:
> On 5/1/2009 4:29 AM, eli wrote:
>
>
>
> > Hi,
>
> > I have problem with save_form, save_model, save_formset methods in
> > Admin class admin.TabularInline.
>
> > class AAdmin(admi
On 5/1/2009 4:29 AM, eli wrote:
> Hi,
>
> I have problem with save_form, save_model, save_formset methods in
> Admin class admin.TabularInline.
>
> class AAdmin(admin.TabularInline):
> model = A1
> extra = 3
>
> def save_form(self, request, form, change):
> print "form"
>
Can you try the same operation using the Django development server and
see what happens?
On 5/1/2009 7:19 AM, Jason Sypolt wrote:
> Also, I'm going through wsgi and not mod_python. Not sure if that
> makes a difference..
>
>
> On May 1, 10:12 am, George Song wrote:
>> On 5/1/2009 6:56 AM, Jas
On 5/1/2009 5:13 AM, pallavi wrote:
> For example lets say my python script is named "science.py" and it
> reads two input files for the input data : abc.txt and xyz.txt and
> after computation the output file is : output.txt
If abc.txt and xyz.txt are available somehow directly on the applicati
Also, I'm going through wsgi and not mod_python. Not sure if that
makes a difference..
On May 1, 10:12 am, George Song wrote:
> On 5/1/2009 6:56 AM, Jason Sypolt wrote:
>
> > I have pil 1.1.6 installed - it can find a jpeg decoder and all tests
> > pass. I'm using django 1.0.2 and python 2.5 on
Yes, and everything looks to be installed correctly under site-
packages. I guess django can find everything ok too, otherwise I'd
probably get an import error.
On May 1, 10:12 am, George Song wrote:
> On 5/1/2009 6:56 AM, Jason Sypolt wrote:
>
> > I have pil 1.1.6 installed - it can find a jpeg
On 5/1/2009 6:56 AM, Jason Sypolt wrote:
> I have pil 1.1.6 installed - it can find a jpeg decoder and all tests
> pass. I'm using django 1.0.2 and python 2.5 on centos 5.3. Whenever I
> try to upload a jpeg via the admin (ImageField), I get the following
> validation error.
>
> "Upload a valid i
Thanks!
On May 1, 8:47 am, Karen Tracey wrote:
> On Fri, May 1, 2009 at 9:28 AM, Kristian R. Van Tassell <
>
>
>
> k.vantass...@gmail.com> wrote:
>
> > I'm attempting to iterate through each "User" and get a list of
> > "Events" for each user. I feel that my code below is sound, but Django
> > d
Hi Karen,
Thanks a lot for such an elaborate answer. I took your advice and
stepped back a few steps. I needed to plan it out better. What I was
ultimately doing prior to this post was just trying to get it to save
and then add the other features later, features that should really be
required fro
I have pil 1.1.6 installed - it can find a jpeg decoder and all tests
pass. I'm using django 1.0.2 and python 2.5 on centos 5.3. Whenever I
try to upload a jpeg via the admin (ImageField), I get the following
validation error.
"Upload a valid image. The file you uploaded was either not an image
o
Malcolm Tredinnick escribió:
> The Model class calls pre_save() to work out the value to save into the
> database. That's working correctly for you, as you've noticed: the right
> value is being saved.
>
> Some Field subclasses in Django also use pre_save() as a way to
> normalise the value in th
On Fri, May 1, 2009 at 9:28 AM, Kristian R. Van Tassell <
k.vantass...@gmail.com> wrote:
>
> I'm attempting to iterate through each "User" and get a list of
> "Events" for each user. I feel that my code below is sound, but Django
> doesn't agree (I'm not using a template because I'm just doing a p
I'm attempting to iterate through each "User" and get a list of
"Events" for each user. I feel that my code below is sound, but Django
doesn't agree (I'm not using a template because I'm just doing a proof
of concept at this point, hence the direct HttpResponse(eventList)).
I'm getting this error
On Fri, 2009-05-01 at 05:11 -0700, Alfonso wrote:
> I've got a very simple Order model and an invoice model. Currently
> within the admin section, the invoice admin page contains associated
> orders as an edit_inline. The user adds orders to the invoice by
> clicking 'save and continue editing'
Dear Django Users and Developers,
I am very new to this world of web services and also python. I was
reading about django and could not find solution for my problem.
I hope anyone from this community can help me with the solution.
I have a python application
This python script contain some modul
I've got a very simple Order model and an invoice model. Currently
within the admin section, the invoice admin page contains associated
orders as an edit_inline. The user adds orders to the invoice by
clicking 'save and continue editing' at which point the system pulls
through the correct price
Hi,
I have problem with save_form, save_model, save_formset methods in
Admin class admin.TabularInline.
class AAdmin(admin.TabularInline):
model = A1
extra = 3
def save_form(self, request, form, change):
print "form"
return form.save(commit=False)
def save_model
You cannot make cross-site requests in Javascript, for security reasons.
See: https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript
This has nothing to do with Django, however, so if you need further
information, you should take your question to the JQuery mailing lists.
Zain
On Thu
On May 1, 8:00 am, gforce wrote:
> Hi,
>
> I am having problem getting the Model String Representation working
> following the Djangobook 2.0. I can save and add records no problems.
>
> I have
>
> Django (installed from svn) (1, 1, 0, 'beta', 1)
>
> Mysql 5x
> Python 2.5.4
>
> I have followed t
Hi,
I am having problem getting the Model String Representation working
following the Djangobook 2.0. I can save and add records no problems.
I have
Django (installed from svn) (1, 1, 0, 'beta', 1)
Mysql 5x
Python 2.5.4
I have followed the model view using "def __unicode__(self):" but in
adm
Plain ol' Python multiple inheritance should work. Just define the
fields you want in some class:
{{{
class PersonMixin(object):
first = models.CharField(max_length=16)
last = models.CharField(max_length=16)
class Person(models.Model, PersonMixin):
pass
class Person2(models.Model, Pe
61 matches
Mail list logo