This doesn't appear to be a Django question. Your 'results' variable
is being populated by checking the length of an
nltk.text.ConcordanceIndex() instance. I'm not familiar with the nltk
module, but I'm assuming you are at least a little, since you're using
it. It appears that its length isn't usef
Hi,
I'm getting 20-30 seconds delay when trying to bind request.POST data
to form.
-
CompanyFormset = modelformset_factory(Company,
form=EditCompanyForm, extra=0)
if request.method == 'POST':
formset = CompanyFormset(request.POST, request.FILES)
if for
2011/4/16 Karen McNeil
> 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 {{ se
On Sat, Apr 16, 2011 at 7:10 AM, Toni Milovan wrote:
> I'm getting 20-30 seconds delay when trying to bind request.POST data
> to form.
>
> -
>CompanyFormset = modelformset_factory(Company,
> form=EditCompanyForm, extra=0)
>
>if request.method == 'POST':
>formset =
> searchterm = request.GET['q']
Shouldn't this be: request.GET.get('q','')
Walt
-~
--
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
I'm not sure I know why your code is misbehaving, but any
particular reason you aren't using render_to_response instead
of template/context rendering?
http://docs.djangoproject.com/en/dev/topics/http/shortcuts/#render-to-response
It's much simpler!
Walt
-~
--
You received this message because
Windows 64 does make things interesting, but just to summarize
what I do to install on Windows:
Install python2.5: http://www.python.org/download/releases/2.5.4/
Install latest apache: http://httpd.apache.org/download.cgi#apache22
Install mod_python for python 2.5:
http://archive.apache.org/dist/h
Hi,
Anyone got this problem?
I try to run grappelli on django 1.3. and run this command :
#python manage.py runserver
Server running. Withouth grappeli, I can go to django admin page. But
after install grappelli, and try to access http://127.0.0.1/admin/
error appear 'Python quite unexpectedly'
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
Also beware! Only do a client.post if you really want to test that a user
submits a form. Usually when a not-logged-in-user wants to go to a secured
page immediately he will try a get request and just enter the URL. Sometimes
your view behaves differently on get and on post (most of the times) s
I have two models, model A and model B ,
model A like this
CUSTOMER_NAME = (
(IBM, 'IBM'),
(GSMC, 'GSMD'),
(CSMC, 'CSMC'),
(HJTC, 'HJTC'),
customer_name = models.IntegerField(choices = CUSTOMER_NAME, default = IBM,)
activity_type = models.IntegerField(choices = ACTIVITY_TYPE
if i have something like this:
===
class MyModel(models.Model):
name = models.CharField(max_length=255)
class OtherModel(models.Model):
name = models.CharField(max_length=255)
mymodel = models.ForeignKey(MyModel)
class MyModelItem(models.Model):
mymodel = models.ForeignKey(M
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:
>
> > def concord(request):
> > searchterm = reques
On Sat, Apr 16, 2011 at 6:17 PM, Hudar wrote:
> Withouth grappeli, I can go to django admin page. But
> after install grappelli, and try to access http://127.0.0.1/admin/
> error appear 'Python quite unexpectedly'.
Hello Hudar,
It means python crashed, in general this occurs when theres a probl
Hello,
I'm running a test but it fails after syncdb part with the following
message:
Error: Database test_ couldn't be flushed. Possible
reasons:
* The database isn't running or isn't configured correctly.
* At least one of the expected database tables doesn't exist.
* The SQL was invalid.
2011/4/16 Karen McNeil
> Yep, the encoding was the problem. I just added a line
>searchterm = searchterm.encode('utf-8')
>
Does the nltk code not support unicode? A better solution would be to never
do explicit encoding yourself, but rather just pass unicode from the DB and
unicode from req
Hello!
I have two class, Person and employee, i need make a composition for
this (Prefer composition over inheritance):
class Person(models.Model):
name = models.CharField(max_length=50)
date_inclusion = models.DateField()
# others fields
class Employee(models.Model):
person = mod
Hi,
In which part of the test are you truncating the db?
It could also be that test_ db is still in your database
after a previous run of test, and it refuses to flush.
Try manually deleting it and running syncdb again.
--
Gladys
http://blog.bixly.com
On Apr 17, 1:20 am, Aleksandr Vladimirskiy
Hello.
In an app I'm working on I have a package which contains an arbitrary
number of modules, each of which is expected to contain several django
models. In each module, the models have the same name, but they are
nested in an outer class, which I assume shouldn't cause problems.
However, it doe
I think you're hijacking this thread, yes?
Can you submit all the code for the models, please?
Perhaps start a new thread...
--
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
On 16 April 2011 16:36, Walt wrote:
> Windows 64 does make things interesting, but just to summarize
> what I do to install on Windows:
>
> Install mod_python for python 2.5:
Do yourself a favour and switch to something else then mod_python.
It's a dead project (that's why it probably won't work
Hi Jeff,
I dont knw the details of the top of my head, but you could place
inherit a changeform template dedicated for your specific app/model,
and simply edit it to have the inline formsets on the top, or use a
conditional template tag to display only one of your inline models at
the top. I think
Hi Guevara,
Proxy models only inherit python logic, they are what you expect when
you subclass a superclass; I dont think thats what you want in this
case.
I think you actually do want multi-table inheritence, im not too well
educated in "design patterns" but i think thats what you mean by
compos
Thanks Walt.
I'm not sure why the code is misbehaving either but render_to_response
works so I'll roll with that.
Cheers
On Apr 16, 10:22 am, Walt wrote:
> I'm not sure I know why your code is misbehaving, but any
> particular reason you aren't using render_to_response instead
> of template/con
On Sat, Apr 16, 2011 at 1:35 PM, Guevara wrote:
> Hello!
> I have two class, Person and employee, i need make a composition for
> this (Prefer composition over inheritance):
>
> class Person(models.Model):
>name = models.CharField(max_length=50)
>date_inclusion = models.DateField()
>#
Hey, thank you guys so much for your help. I was able to get
everything installed. Appreciate it lots.
On Apr 16, 2:40 pm, Łukasz Rekucki wrote:
> On 16 April 2011 16:36, Walt wrote:
>
> > Windows 64 does make things interesting, but just to summarize
> > what I do to install on Windows:
>
> > I
26 matches
Mail list logo