Thanks RajeshD
--~--~-~--~~~---~--~~
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 to [EMAIL PROTECTED]
James Bennett wrote:
> This is probably the way to do it; adding special-case hooks to the
> generic views doesn't sound like a good solution to me.
Well, callables which can be sent into generic views and are executed
just prior to handing off to the template in order to populate
additional co
On 10/4/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> There is some documentation on how Django's signals system works and how
> to hook into it here: http://code.djangoproject.com/wiki/Signals
I just went through and completely re-wrote that to cover signals in
as much detail as I could mu
nice !
thanks everyone
On Oct 5, 1:22 pm, "Waylan Limberg" <[EMAIL PROTECTED]> wrote:
> On 10/4/06, coulix <[EMAIL PROTECTED]> wrote:
>
> > Hello, i am using free comments in my app and starting to getting spam
> > :)
> > I dont want to use captcha yet and instead, use some content string
> > sca
On 10/4/06, coulix <[EMAIL PROTECTED]> wrote:
>
> Hello, i am using free comments in my app and starting to getting spam
> :)
> I dont want to use captcha yet and instead, use some content string
> scanning method.
> (sex, viagra, $$$ and other crap will not post the message).
> What is the best w
On Thu, 2006-10-05 at 03:05 +, coulix wrote:
> Hello, i am using free comments in my app and starting to getting spam
> :)
> I dont want to use captcha yet and instead, use some content string
> scanning method.
> (sex, viagra, $$$ and other crap will not post the message).
> What is the best
Hello, i am using free comments in my app and starting to getting spam
:)
I dont want to use captcha yet and instead, use some content string
scanning method.
(sex, viagra, $$$ and other crap will not post the message).
What is the best way to this ?
exends comments view.py ?
Thanks :)
--~--~---
Hi All,
Now I'm at ForeignKey funkiness. So I have the Services model which
has a ForeignKey field to the Sermon model. The funny thing is that
if I choose a sermon object when I first create a new service object,
all is well. If, on the other hand, I don't choose one, then it turns
out that I
I haven't managed to reproduce it. I was hoping maybe others had seen
it on their servers and knew it's cause.
--Ned.
Malcolm Tredinnick wrote:
On Wed, 2006-10-04 at 16:27 -0400, Ned Batchelder wrote:
Every once in a while, we get a stack trace from our production Django
servers
On Wed, 2006-10-04 at 18:58 -0500, James Bennett wrote:
> On 10/4/06, wam <[EMAIL PROTECTED]> wrote:
> > The closest I've been able to figure out is to create a custom view and
> > call create_object from my view. Then, depending on whether the
> > returned object from create_object is an instance
On 10/4/06, Beau Hartshorne <[EMAIL PROTECTED]> wrote:
>
> On 4-Oct-06, at 6:12 PM, Andy Dustman wrote:
>
> > I'm not sure this will fix your problem, but it might from my reading
> > of the code. Try reversing the order of the filter() and extra()
> > methods, i.e.
> >
> > qs = Place.objects.all(
On Wed, 2006-10-04 at 16:27 -0400, Ned Batchelder wrote:
> Every once in a while, we get a stack trace from our production Django
> servers with this error:
>
> ...
> File "/apps/mine/views/mine.py", line 481, in my_view
> params = request.REQUEST
>
> File "/site-packages/django/core/h
Hi Julian,
On Wed, 2006-10-04 at 01:54 -0700, [EMAIL PROTECTED] wrote:
> Hi,
>
> I recently started using Django. I'm still getting a bit confused with
> the interaction between the Views and the Template. I understand or
> figure that pretty much all the data processing should be handled
> wi
On 4-Oct-06, at 6:12 PM, Andy Dustman wrote:
> I'm not sure this will fix your problem, but it might from my reading
> of the code. Try reversing the order of the filter() and extra()
> methods, i.e.
>
> qs = Place.objects.all().extra(select={'relevance': match_expr},
> params=[query]).filter(nam
On 10/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Django's database-centric approach seems to make certain kinds of
> mostly-static sites harder to build. For example, most of what I want
> to put on my site is probably going to come from RestructuredText
> source, but that source is
On 9/15/06, mrstone <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> I'm fiddling around with MySQL fulltext search and run into a problem.
>
> Using the below code works:
>
> match_expr = "MATCH(name) AGAINST (%s IN BOOLEAN MODE)"
> qs =
> Place.objects.all().filter(name__search=query).extra(select={'releva
Curious, does that give you the full user context too? I noticed with
render_to_response() does not 'easily' use the user context.
J
On Oct 4, 1:35 pm, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I
> > need a clean separation between the data that is changed by
> > i
On 10/5/06, Greg Plesur <[EMAIL PROTECTED]> wrote:
>
> Waylan Limberg wrote:
> >> Do any of you know if there's a way to tell Django to specify "on
> > cascade delete" for foreign key references, when it creates DB tables?
Django doesn't use ON DELETE CASCADE in its table definitions, due to
some
On 10/4/06, wam <[EMAIL PROTECTED]> wrote:
> The closest I've been able to figure out is to create a custom view and
> call create_object from my view. Then, depending on whether the
> returned object from create_object is an instance of
> HttpResponseRedirect() I can determine if the addition/edi
On 9/29/06, patrickk <[EMAIL PROTECTED]> wrote:
> however, I´ve been a little bit disappointed at first that django
> doesn´t come with a js-library and that the django-developers refused
> to agree on a js-framework.
It isn't that there's a "refusal to agree", it's that there's a
recognition tha
Snirp wrote:
>
> Is there no friendly windows binary around? Is there a way to get this
> to work?
Write to me and I'll mail you back a Windows installer --- by some
reasons it's not a part of Django download page yet.
Thanks,
Eugene
--~--~-~--~~~---~--~~
You
Hi Beau
No, I'm afraid not.
I did not have time to look into it further so it's still an open thing
for me.
Regards
Sten
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this grou
On 9/29/06, patrickk <[EMAIL PROTECTED]> wrote:
> well, this is not really a question.
> however, I´ve been a little bit disappointed at first that django
> doesn´t come with a js-library and that the django-developers refused
> to agree on a js-framework.
> in the meantime, I totally understand t
I make extensive use of generic views in one of my apps. Now that the
app is nearly finished, I'm being asked to do change tracking/audit
trail on the objects managed in the generic views. Recognizing that I
could just create and save django.contrib.admin.models.LogEntry()
objects and possibly cre
Howdy folks,
This issue came up yet again on the IRC channel today, and myself,
jesusphreak and a couple of others did yet more brainstorming, partly
recycling earlier topics and partly moving things forward even more.
It started about here:
http://simon.bofh.ms/logger/django/2006/10/04/15/30
Hi,
I recently started using Django. I'm still getting a bit confused with
the interaction between the Views and the Template. I understand or
figure that pretty much all the data processing should be handled
within the View.
I'm using render_to_response sort of like this:
from django.sho
- I have django 0.95.tar.gz dowloaded.
- I got python 2.5 installed.
- I have django unzipped
- When i run setup.py in contacts internet in search of setuptools
- I do however not see the setuptools saved anywhere and nothing
happens
- I manually downloaded the setuptools and saved it to the sam
Hello django users,
Bit of a newbie question.
For model like this:
class X(models.Model):
name = models.CharField(maxlength=20)
class Y(models.Model):
name = models.CharField(maxlength=20)
x = models.ForeignKey(X)
class Z(models.Model):
name = models.CharField(
In templates that use generic view - "
django.views.generic.list_detail.object_list" I have "pages" variable.
But how can I display in a for/loop links for each page (loop that will
display from 1 to "pages") ?
--~--~-~--~~~---~--~~
You received this message becau
Hi all,
The admin interface is very useful, but I would like to make a
suggestion to make it better.
It could have a tabbed interface to make it easier to switch between
apps and models.
The first line/group of tabs should have all the apps in the current
project.
The second should have the mode
Hi All,
For those interested... Just wanted to post that I've recently covered
a little how-to on configuring pydev to work with django
http://pydev.blogspot.com/2006/09/configuring-pydev-to-work-with-django.html
Cheers,
Fabio
--~--~-~--~~~---~--~~
You received
RajeshD wrote:
> Firstly, the statement "user = User.objects.get(id=request.user.id)" is
> redundant -- you could directly use request.user instead of that query
> with the same effect.
>
> As far as the actual problem is concerned, your Queryset is returning
> multiple rows because request.user.
Waylan Limberg wrote:
>> Do any of you know if there's a way to tell Django to specify "on
> cascade delete" for foreign key references, when it creates DB tables?
>
> I don't believe you can. However, you can use sql or sqlall [1] to
> output the table creation sql to a file for editing. For ex
On 10/4/06, Greg Plesur <[EMAIL PROTECTED]> wrote:
>
> All,
>
> Do any of you know if there's a way to tell Django to specify "on
cascade delete" for foreign key references, when it creates DB tables?
I don't believe you can. However, you can use sql or sqlall [1] to
output the table creation sql
Use exclude instead of filter:
http://www.djangoproject.com/documentation/db_api/#exclude-kwargs
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-user
Firstly, the statement "user = User.objects.get(id=request.user.id)" is
redundant -- you could directly use request.user instead of that query
with the same effect.
As far as the actual problem is concerned, your Queryset is returning
multiple rows because request.user.id probably resolves to Non
hi,
in the docs I found a method to
run a query like this:
MyObj.objects.filter(id__in=[1, 3, 4]).
My question is if there is a "negative"
to this like the following raw sql
"SELECT xxx FROM mytable WHERE xxx NOT IN (1, 2 ,4);"
Is there any hint in the docs that I missed?
Thanks
uli
_
[EMAIL PROTECTED] wrote:
> I
> need a clean separation between the data that is changed by
> interacting with apps and data that isn't.
You can store your data in the form of templates and use
'direct_to_template' to bind it to certain urls:
http://www.djangoproject.com/documentation/generic_vi
All,
Do any of you know if there's a way to tell Django to specify "on
cascade delete" for foreign key references, when it creates DB tables?
I'm developing an application that is mostly using Django to touch my
DB, but that defines some SQL stored-procedures for manipulation of some
of its d
RajeshD wrote:
> You could use:
>
> 1. a regular tag or
> 2. an inclusion tag with takes_context=True
> (See:
> http://www.djangoproject.com/documentation/templates_python/#inclusion-tags)
>
> In both cases, your render or tag function will get called with a
> context object from which you can
Every once in a while, we get a stack trace from our production Django
servers with this error:
...
File "/apps/mine/views/mine.py", line 481, in my_view
params = request.REQUEST
File "/site-packages/django/core/handlers/modpython.py", line 38, in _get_request
self._request = da
On 15-Sep-06, at 12:39 PM, mrstone wrote:
> I'm fiddling around with MySQL fulltext search and run into a problem.
>
> Using the below code works:
>
> match_expr = "MATCH(name) AGAINST (%s IN BOOLEAN MODE)"
> qs =
> Place.objects.all().filter(name__search=query).extra(select=
> {'relevance':
> m
> Django's database-centric approach seems to make certain kinds
> of mostly-static sites harder to build.
[cut]
> Yes, Django is a framework, so I could build components that
> make this possible, but it seems to me that it should be a
> fundamental, built-in part of the system. Has anyone alrea
In case anyone replies, or to document my own progress incase helpful
to someone else..a little more info:
I found filter_specs.py which appears to define the filter types which
are presumably applied by field introspection to come up with either
pre-defined choices, as in the datefield filter, o
Django's database-centric approach seems to make certain kinds of
mostly-static sites harder to build. For example, most of what I want
to put on my site is probably going to come from RestructuredText
source, but that source isn't going to change in response to user
interaction. Yes, I could s
On 10/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Is there some straightforward way to plug my own template system into
> Django?
>
> Thanks in advance,
>
Short answer: Don't use the render_to_response() shortcut (it uses
Django's template system), but just import and use your templat
Is there some straightforward way to plug my own template system into
Django?
Thanks in advance,
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
Sorry to be a pest folks.
I had forgotten that the {{object}} was still accessible.
So to get what I want I just had to do this:
{% for part in object.part.all %}
{{part}}
{% endfor %}
--~--~-~--~~~---~--~~
You received this message because you are subscrib
that works (to my surprise). thanks a lot.
Am 04.10.2006 um 18:49 schrieb DavidA:
>
>
> va:patrick.kranzlmueller wrote:
>> I have a model with blog-postings, assigned to a specific user - the
>> user is stored in the table "posting" via foreignkey.
>>
>> the user is part of a grade, part of a sc
You could use:
1. a regular tag or
2. an inclusion tag with takes_context=True
(See:
http://www.djangoproject.com/documentation/templates_python/#inclusion-tags)
In both cases, your render or tag function will get called with a
context object from which you can obtain the request instance like
Waylan Limberg wrote:
> On 10/4/06, Patrick J. Anderson <[EMAIL PROTECTED]> wrote:
>> Hi, everyone!
>>
>> I have a question I've been trying to find answers to in the docs, but
>> perhaps I'm not looking in the right places, because I can't find it.
>>
>> I'm wondering about the use of templatetag
Unless I didn't read closely enough, this sounds to me like you could
use inclusion tags:
http://www.djangoproject.com/documentation/templates_python/#inclusion-tags
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"
va:patrick.kranzlmueller wrote:
> I have a model with blog-postings, assigned to a specific user - the
> user is stored in the table "posting" via foreignkey.
>
> the user is part of a grade, part of a school and part of a state -
> all of which have overview-pages.
> so, to get all the postings
Malcolm Tredinnick pointy-stick.com> writes:
>
> documentation). As you have noted, you also then have to do something
> with limit_choices_to and possibly a validator to enforce this at the
> Python and form validation level, but it's shouldn't be too bad.
Does limit_choices_to work outside of
On 10/4/06, Tom Smith <[EMAIL PROTECTED]> wrote:
>
> If I am looking for titles like "Anal Sex" or "Being Anal" then how
> do I construct this, ahem, query... to not return "Analysis" or
> "Analog"?
Two options: If your database supports it, try a full-text search:
object_list = Products.objects
Hello Malcolm Tredinnick!
On Wed, 04 Oct 2006 11:27:31 +1000 you wrote:
>
> On Tue, 2006-10-03 at 18:21 +0400, Grigory Fateyev wrote:
> > Hello James Bennett!
> > On Tue, 3 Oct 2006 08:28:02 -0500 you wrote:
> >
> > >
> > > On 10/3/06, Grigory Fateyev <[EMAIL PROTECTED]> wrote:
> > > > I have
heh. so do we get to guess what your django-based site is about?
Tom Smith wrote:
> If I am looking for titles like "Anal Sex" or "Being Anal" then how
> do I construct this, ahem, query... to not return "Analysis" or
> "Analog"?
>
> I tried adding spaces to the end of the word but it doesn
If I am looking for titles like "Anal Sex" or "Being Anal" then how
do I construct this, ahem, query... to not return "Analysis" or
"Analog"?
I tried adding spaces to the end of the word but it doesn't seem to
help...
object_list = Product.objects.filter( Q(title__contains=word + " ")| Q
HI !
I need to see how to make work form whit string whit django url
Sombody can post a sample or a link to a sample
Thanks
Marco
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to t
Thanks Malcolm that's a nice approach.
--~--~-~--~~~---~--~~
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 em
> so, to get all the postings for a state I have to do the following:
>
> 1. search for schools in that state
> 2. search for grades in that school
> 3. search for users within that grade
> 4. and finally, get all the postings for that user
>
> seems a little complicated.
Actually, this is what
1. I am not sure about this one.
2. You will also need blank=True in addition to null=True in those
nullable fields.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
Forgot to say, the model I'm trying to create an object to has the user as a OneToOne relationship, which apparently MySQL does not like very much. Why? Because phpMyAdmin, when accessing the homepage for the model's datatable, says this:
PRIMARY and INDEX keys should not both be set for column `u
Hello guys,I'm experiencing a weird thing. On my production setup, an OperationalError exception is being triggered while trying to invoke an AddManipulator.I've zeroed in down to this (excerpt of my view follows)
def userprofile_add(request): """ Handle adding new userprofiles (one2one rel to U
On 10/4/06, Patrick J. Anderson <[EMAIL PROTECTED]> wrote:
>
> Hi, everyone!
>
> I have a question I've been trying to find answers to in the docs, but
> perhaps I'm not looking in the right places, because I can't find it.
>
> I'm wondering about the use of templatetags in project instead of
> ap
I have a Many-to-Many relationship between two models, Action and Part
(see below).
Part has thousands of records so I am using "raw_id_admin=True". This
works great in the admin.
I am using a generic view to create an update form for an Action. This
works fine but it only displays the part ids
1. I've changed the TIME_ZONE in settings.py to 'Europe/Moscow'. Time
values saved in the database are 3 hours lesser than the times of
writing (now should be 4 hours of difference). When I open records in
the admin I see the same values as in the database. Can I see the local
time values in the a
Hi, everyone!
I have a question I've been trying to find answers to in the docs, but
perhaps I'm not looking in the right places, because I can't find it.
I'm wondering about the use of templatetags in project instead of
application scope. I put my applications in 'apps' subdirectory and
unde
> some details
So, I looked at the admin code and noticed that in the absence of any ordering
it orders by PK DESC. I submitted a patch that would change the behavior to use
the ordering returned by a custom default manager.
http://code.djangoproject.com/ticket/2870
Peace,
David S.
--~--~--
Thanks Russell.
Although the patch for that ticket did not work in my particular case,
I was able to modify the patch slightly to solve my problem. For anyone
else with the same problem, here's my patch for
django/db/models/query.py:
643 if lookup_type == 'in':
644 #return '%
I have a model with blog-postings, assigned to a specific user - the
user is stored in the table "posting" via foreignkey.
the user is part of a grade, part of a school and part of a state -
all of which have overview-pages.
so, to get all the postings for a state I have to do the following:
Gábor Farkas schrieb:
> explicit is better than implicit :)
Oh come on, I can't hear that particular one any more. Why does
python have implicit storage handling with automatic reference
counting? We'd use C or Assembler if we really believed in that
Mantra.
But your advice is right, of cour
Don Arbow wrote:
> On Oct 3, 2006, at 9:30 PM, Patrick J. Anderson wrote:
>> def main(request):
>> posts = Post.objects.filter(is_approved =
>> True).order_by('-time_added')[:5]
>> t = loader.get_template('homepage.html')
>> c = RequestContext({
>> 'latest_posts': posts,
>>
Malcolm Tredinnick wrote:
> On Tue, 2006-10-03 at 22:26 -0700, Beau Hartshorne wrote:
>> On 3-Oct-06, at 7:36 PM, Malcolm Tredinnick wrote:
>>
>>> So this is the value that the string has right at the moment the
>>> exception occurs? Can you paste the traceback you see, please (and
>>> preferably
Marco Amato wrote:
> Hi !
>
> I am in the part 2 of the tutorial after add the class Admin in evere
> object and uncommenti in url.py the admin url
>
> I receive this error from the server :
>
> SuspiciousOperation at /admin/
> User tampered with session cookie.
> Request Method: GET
> Re
usually encode('utf-8') is needed only when printing the strings. You
can pass them aroung without problem.
BTW, unicode chars should appear like '\u0345' ... I'm not so sure
about that though.
--~--~-~--~~~---~--~~
You received this message because you are subsc
Hi !
I am in the part 2 of the tutorial after add the class Admin in evere
object and uncommenti in url.py the admin url
I receive this error from the server :
SuspiciousOperation at /admin/
User tampered with session cookie.
Request Method: GET
Request URL:http://127.0.0.1:8000/adm
list_filter ('field_names') works very well in the admin area. Is
there an easy way to use this same functionality to display information
to ordinary users visting the site?
Also, in the lists within admin you can sort each list by clicking on
the column header which is very useful. However, th
> I try to import like: "import myproject" and then
> myproject.auth.models.User but no luck, Django throws error,
> that auth has no models class. Is there a way to make this to
> work?
For this kind of problem it helps sometimes to use the "-v"
option to python, e.g.
python -v ./manage.py run
79 matches
Mail list logo