I have a model "Entry" with an "active" field, which is just a
boolean. All of the current entries were false, and I was trying to
set them all as true, and I'm running into a strange problem. Here's
an example, trying to set just one entry to inactive:
>>> from dictionary.models import Entry
>>
No, that's not the problem. Even if I redo the query now, I still get
the same count (see below). And, like I said, the change does not show
up in the admin either -- THE VALUE HAS NOT BEEN CHANGED.
This behavior is so unexpected I'm not sure how to even begin trouble-
shooting it.
~Karen
PS --
to the db.
>
> You could debug by doing:
>
> from django.db import connection
> connection.queries
> e1.save()
> connection.queries
>
> to see what the SQL generated was.
>
> Then start looking at your database to see what it's doing.
>
> Malcolm
>
>
I'm trying to make a concordance (ie, a list of a certain searchterm,
including its surrounding context) and I can get it to work in the
interpreter, but I'm having problems figuring out how to make it a
list that I can pass it to the template. This is what works in the
interpreter (tokens is a li
Yes, that worked. Thank you!
Of course, now that I fixed that, I have to deal with the other
problem that I was avoiding... But I'll post that in a different
question. :-)
Thanks again, Pedro.
On Apr 15, 9:35 pm, Pedro Kroger wrote:
> You can try something like:
>
> def my_view(request):
>
I have the following view set up:
def concord(request):
searchterm = request.GET['q']
... more stuff ...
return render_to_response('concord.html', locals())
With URL "http://mysite.com/concord/?q=برشه";, and template code
Your search for {{ searchterm }} returned {{ results }}
re
No, that's not the issue. In addition to displaying the count, the
page also shows the resulting sentences, and the count here is correct
because no results were returned.
I think Karen, below, might be right that it has something to do with
the encoding of the search string... I'll try working th
Yep, the encoding was the problem. I just added a line
searchterm = searchterm.encode('utf-8')
and now it works!
Thank you!
On Apr 16, 9:19 am, Karen Tracey wrote:
> 2011/4/16 Karen McNeil
>
>
>
> > I have the following view set up:
>
> > de
Hello,
I'm designing a model which is a collection of texts. Some of the
texts will be things like books, with a date of publication, and
some of them will be articles or transcripts with a mmddyyy date of
publication/broadcast.
I'd like to structure it somehow so that when I view the list
I've created an application to manage texts, storing the content in a
TextField, along with metadata in other fields. Now that I've
completed the model and started actually adding the texts, the admin
is getting vey slow. The app is just for the use of me and my
team, so the slowness is not a d
ead of counting the words each time the admin
> page is displayed (if that's what you are doing).
>
> On Feb 1, 2:22 am, Karen McNeil wrote:
>
> > I've created an application to manage texts, storing the content in a
> > TextField, along with metadata in other fiel
I have three Django sites that I've been working on recently and I've
been doing most of the development work in Dreamweaver. I don't use
any of the wysiwyg features (or, pretty much, any of the Dreamweaver
program features), but I like it because I can do all the the code
edits and the FTP transf
So... that's a no, then?
I mean, about the question I asked. You know, the "is there an IDE +
FTP program" question?
Although, to assuage everyone's concerns:
- I do have a development site that I use to test any significant
changes before I put them on the live site.
The point that I
So... that's a no, then?
I mean, about the question I asked. You know, the "is there an IDE +
FTP program" question?
Although, to assuage everyone's concerns:
-- I do have a development site that I use to test any significant
changes before I put them on the live site. The point that I was
tryi
This is definitely doable. And easy -- you can use django's generic
views for it.
I recommend you pick up / download "Practical Django Projects," by
James Bennett. He'll walk you through every step for creating a blog,
using generic views, etc.
~Karen McNeil
On Feb
Just wanted to give you all an update: I started using Aptana Studio
with the PyDev plug-in and I'm really liking it; I think it was just
what I needed.
Thanks for all the suggestions!
~Karen
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
16 matches
Mail list logo