Re: Inspecting objects

2011-07-12 Thread Jonas Geiregat
Op 13-jul-2011, om 08:25 heeft Jirka Vejrazka het volgende geschreven: >> Thank you all for your help!!! > > I know I'm a bit late to the party (blame timezones :), but thought > I'd put my 2 cents worth in :) > > For inspecting models from command lines (usually when working with > models from

Re: Inspecting objects

2011-07-12 Thread Jonas Geiregat
I like to add: import pdb; pdb.set_trace(); To my code. Reload the page. Go to the development server instance. You'll see that the page hangs forever ,since we started the python debugger. Now you can easily inspect all variables, classes and functions from PDB. Of course you're not limited

AW: Trouble overriding registration templates

2011-07-12 Thread Szabo, Patrick (LNG-VIE)
Did you write your own view for that purpose ?! In that view you could use render_to_response and pass you own template to that. Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Joshua Russo Gesendet: Mittwoch, 13. Juli 2011 04:24 An: django-users@google

Re: get all objects that are related to current, reverse look up

2011-07-12 Thread Jonas Geiregat
Op 12-jul-2011, om 09:18 heeft bruno desthuilliers het volgende geschreven: > On Jul 12, 4:32 am, garagefan wrote: >> simply put, here's my code >> >> class ContentBlock(Orderable, Displayable): >> location = models.ManyToManyField(ContentBlockLocation, blank=True, >> null=True, help_text="li

Re: Inspecting objects

2011-07-12 Thread Jirka Vejrazka
> Thank you all for your help!!! I know I'm a bit late to the party (blame timezones :), but thought I'd put my 2 cents worth in :) For inspecting models from command lines (usually when working with models from legacy databases) I often use model_to_dict which is "hidden" in django.forms.models.

Re: problem submitting form data to database (django)

2011-07-12 Thread Venkatraman S
Can you paste the following database settings from your settings.py? Is it something like this... DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'dbDev.db', 'USER': '', # Not used with sqlite3. 'PASSWORD': '',

Re: Simple example of custom user profile fields?

2011-07-12 Thread Brent
I'm using python manage.py runserver, and I have restarted it dozens of times. On Jul 12, 8:58 pm, Micky Hulse wrote: > On Tue, Jul 12, 2011 at 7:57 PM, Brent wrote: > > Unfortunately, no matter what kind of path I put for > > AUTH_PROFILE_MODULE, the same error appears. > > I don't know your se

Re: Simple example of custom user profile fields?

2011-07-12 Thread Micky Hulse
On Tue, Jul 12, 2011 at 7:57 PM, Brent wrote: > Unfortunately, no matter what kind of path I put for > AUTH_PROFILE_MODULE, the same error appears. I don't know your setup, but have your tried restating Apache? That's probably a stupid question/suggestion, but maybe worth a shot? -- You receive

Re: Simple example of custom user profile fields?

2011-07-12 Thread Brent
Unfortunately, no matter what kind of path I put for AUTH_PROFILE_MODULE, the same error appears. On Jul 12, 5:51 pm, Andre Terra wrote: > As the traceback helpfully states, > > Exception Type: SiteProfileNotAvailable at /profile/Exception Value: > Unable to load the profile model, check AUTH_PRO

Re: Form wizard get_template_names()

2011-07-12 Thread Dario Vergara
Here is the solution: def get_template_names(self): next_step = int(self.steps.current) return 'step_%s.html' % next_step Simple solution. What is confusing is that the documentation says that get_template_names() should return a list. -- You received this message because y

Trouble overriding registration templates

2011-07-12 Thread Joshua Russo
I want to use my own logout template but it doesn't want to pick it up. The login template worked just fine, but for anything that's already in the admin's template/registration folder, it only wants to use those. I tried putting my templates folder before the admin templates folder in the list

Re: something about django mysql database long connection

2011-07-12 Thread Kejun He
hi, I am sorry. My English is very bad. Yes, i want to make persistent databases connection on each session. and yesterday i try to modify the code on "site-packages\django\db\__init__.py" def close_connection(**kw

Re: Duplicate Key Error in Cache

2011-07-12 Thread Issac Kelly
I would guess your quickest way forward is to change backends, as it appears that this is a larger issue with database transactions between threads, which is a couple of years old. I've been tinkering with LocalMemCache for a really small site, and django-redis-cache as a toy, I know that some hav

Re: problem submitting form data to database (django)

2011-07-12 Thread Andre Terra
Also try different ports and opening the server for external IPs to make sure this isn't a network issue C:\>manage.py runserver 0.0.0.0:11010 and then http://localhost:11010 Cheers, André Terra On Tue, Jul 12, 2011 at 10:16 PM, Issac Kelly wrote: > A few things to check: > > Is runserver

Re: problem submitting form data to database (django)

2011-07-12 Thread Issac Kelly
A few things to check: Is runserver (python manage.py runserver) running? does it crash when you try to submit your form? Have you done a syncdb successfully? If so, then django can connect to your database, and that's probably not the problem. I would guess it's something in your view (or maybe

problem submitting form data to database (django)

2011-07-12 Thread sq1020
I'm pretty new to Django and web development in general so the answer to this question may be rather obvious. I've created a ModelForm in Django so that the data submitted by a user is saved in a database. When the user submits the form, I believe the data validates but it can't connect to the data

Re: Simple example of custom user profile fields?

2011-07-12 Thread Andre Terra
As the traceback helpfully states, Exception Type: SiteProfileNotAvailable at /profile/Exception Value: Unable to load the profile model, check AUTH_PROFILE_MODULE in your project settings http://www.google.com/search?&q=django+Unable+to+load+the+profile+model%2C+check+AUTH_PROFILE_MODULE+in+your

Re: Inspecting objects

2011-07-12 Thread Lukich
Thank you all for your help!!! -- 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 django-users+unsubscr...@googlegroups.com. For more

Re: Simple example of custom user profile fields?

2011-07-12 Thread Brent
Good idea. Unfortunately, I tried that, but it results in a SiteProfileNotAvailable error: http://dpaste.com/567421/ On Jul 12, 3:15 pm, Andre Terra wrote: > Instead of using get or create, why not setting up a post_save signal > for the User model so that users always have a profile associated

Looking for Django Developers in the Region of Vienna Austria

2011-07-12 Thread Robert Boulanger
Hi Guys, we are looking for a Django Developer in the Region of Vienna, Austria. Starting with the end of August 2011, we need a freelancer Django/Python Developer for an international Company, in Vienna/Austria. The work will be on-site at the customers place, about 40 hours a week. We will pay

Re: Simple example of custom user profile fields?

2011-07-12 Thread Andre Terra
Instead of using get or create, why not setting up a post_save signal for the User model so that users always have a profile associated with them? Cheers, Andre On 7/12/11, Brent wrote: > Thanks for the help guys. > > Micky, that tutorial looks very good. I think I almost have it > working. Just

Re: Simple example of custom user profile fields?

2011-07-12 Thread Brent
Running syncdb again didn't seem to fix it. I tried deleting the database entirely, and starting from a new database, but that also didn't work. On Jul 12, 2:28 pm, Shawn Milochik wrote: > On Tue, Jul 12, 2011 at 5:26 PM, Brent wrote: > > Thanks for the help guys. > > > Micky, that tutorial look

Re: Simple example of custom user profile fields?

2011-07-12 Thread Shawn Milochik
On Tue, Jul 12, 2011 at 5:26 PM, Brent wrote: > Thanks for the help guys. > > Micky, that tutorial looks very good. I think I almost have it > working. Just one more error: > > http://dpaste.com/567361/ > Looks like maybe you didn't run syncdb after adding something to INSTALLED_APPS. -- You r

Re: Simple example of custom user profile fields?

2011-07-12 Thread Brent
Thanks for the help guys. Micky, that tutorial looks very good. I think I almost have it working. Just one more error: http://dpaste.com/567361/ Andre, thanks for mentioning Pinax. I'll give it a shot if this doesn't work out. I have a year of python experience, but I haven't written anything we

Re: Inspecting objects

2011-07-12 Thread Andre Terra
You should actually use dir() or vars() rather than __dict__. Here's a thorough explanation, along with an example serializer which might need to access an object's attributes: http://blog.enterthefoo.com/2008/08/pythons-vars.html Regards, André Terra On Tue, Jul 12, 2011 at 4:52 PM, Marc Aym

Re: Inspecting objects

2011-07-12 Thread Marc Aymerich
On Tue, Jul 12, 2011 at 7:25 PM, Lukich wrote: > Hi.  I have just started diving into Django and this question came up > - is there a way for me to examine all the attribute values of an > object?  In Rails there's such a thing as debug statement which spits > out all the details about the object.

Re: Simple example of custom user profile fields?

2011-07-12 Thread Micky Hulse
This tutorial helped me: http://www.turnkeylinux.org/blog/django-profile Note: The above tutorial uses an FK to User model... The Django docs suggest a OneToOne field. Hope that helps. Micky -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Inspecting objects

2011-07-12 Thread Andre Terra
Useful, if the code is well documented: http://www.java2s.com/Code/Python/Utility/CheapandsimpleAPIhelper.htm IIRC, use it like: from apihelper import info info(object, spacing=20) Cheers, André On Tue, Jul 12, 2011 at 2:44 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedial

Re: Simple example of custom user profile fields?

2011-07-12 Thread Andre Terra
On Tue, Jul 12, 2011 at 2:51 PM, Brent wrote: > Hi, > > Does anyone know of a simple, working example of custom user profile > fields? > > I want to have a custom field, say, "favorite color," which is unique > to each user. Then I want users to be able to login, and be taken to a > page called "

Re: Simple example of custom user profile fields?

2011-07-12 Thread Shawn Milochik
https://docs.djangoproject.com/en/1.3/topics/auth/#storing-additional-information-about-users Everything you should need is in here. Once you have something started I can probably help out if you have any specific questions. Also, as long as you have a one-to-one field there's really no need to

Simple example of custom user profile fields?

2011-07-12 Thread Brent
Hi, Does anyone know of a simple, working example of custom user profile fields? I want to have a custom field, say, "favorite color," which is unique to each user. Then I want users to be able to login, and be taken to a page called "profile" that displays that custom field. So far, I have logg

Re: Inspecting objects

2011-07-12 Thread Cal Leeming [Simplicity Media Ltd]
In fact, if anyone wants to extend on this concept, I'd be more than happy to provide some assistance :) On Tue, Jul 12, 2011 at 6:39 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > > > On Tue, Jul 12, 2011 at 6:25 PM, Lukich wrote: > >> Hi. I have just s

Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-07-12 Thread Cal Leeming [Simplicity Media Ltd]
Of course :) I'll make sure to take a high quality recording and stick it on YT. Cal On Tue, Jul 12, 2011 at 6:31 PM, Venkatraman S wrote: > Can you please ..please...please..please record this session!? > > -V > > -- > You received this message because you are subscribed to the Google Groups >

Re: Inspecting objects

2011-07-12 Thread Cal Leeming
On Tue, Jul 12, 2011 at 6:25 PM, Lukich wrote: > Hi. I have just started diving into Django and this question came up > - is there a way for me to examine all the attribute values of an > object? In Rails there's such a thing as debug statement which spits > out all the details about the object

Re: Inspecting objects

2011-07-12 Thread Cal Leeming [Simplicity Media Ltd]
On Tue, Jul 12, 2011 at 6:25 PM, Lukich wrote: > Hi. I have just started diving into Django and this question came up > - is there a way for me to examine all the attribute values of an > object? In Rails there's such a thing as debug statement which spits > out all the details about the object

Re: Django form validation.. does anyone else find it awkward??

2011-07-12 Thread Andre Terra
On Tue, Jul 12, 2011 at 2:25 PM, Venkatraman S wrote: > > > On Tue, Jul 12, 2011 at 9:12 PM, Andre Terra wrote: > >> May I ask if you are managing to do this (and, if so, how) without >>> writing duplicate logic? >>> >> >> This, to me, is a key area for improvement. Aside from the development >>

Re: Inspecting objects

2011-07-12 Thread Venkatraman S
On Tue, Jul 12, 2011 at 10:55 PM, Lukich wrote: > Hi. I have just started diving into Django and this question came up > - is there a way for me to examine all the attribute values of an > object? In Rails there's such a thing as debug statement which spits > out all the details about the objec

Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-07-12 Thread Venkatraman S
Can you please ..please...please..please record this session!? -V -- 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 django-users+un

Inspecting objects

2011-07-12 Thread Lukich
Hi. I have just started diving into Django and this question came up - is there a way for me to examine all the attribute values of an object? In Rails there's such a thing as debug statement which spits out all the details about the object. From what I have seen so far in Django, I can either d

Re: Django form validation.. does anyone else find it awkward??

2011-07-12 Thread Venkatraman S
On Tue, Jul 12, 2011 at 9:12 PM, Andre Terra wrote: > May I ask if you are managing to do this (and, if so, how) without >> writing duplicate logic? >> > > This, to me, is a key area for improvement. Aside from the development > challenge the idea imposes, an extra issue with writing DRY validati

Re: Django form validation.. does anyone else find it awkward??

2011-07-12 Thread Cal Leeming [Simplicity Media Ltd]
Some interesting thoughts here. I once attempted to make a merge between Django validation and jQuery validation (spent several weeks on it), but my approach wasn't dynamic enough, and ended up not being used again. Personally, I'd like to see some sort of standardized JS library which works seaml

Duplicate Key Error in Cache

2011-07-12 Thread gamingdroid
I ran into this problem using django core's database cache: ERROR: duplicate key value violates unique constraint "cache_pkey" STATEMENT: INSERT INTO "cache" (cache_key, value, expires) VALUES (E': 1:cms-menu_nodes_en-us_1', E'gAJdcQEoY21lbnVzLmJhc2UKTmF2aW LOG: server process (PID 8453) was te

Re: Django form validation.. does anyone else find it awkward??

2011-07-12 Thread Andre Terra
> > May I ask if you are managing to do this (and, if so, how) without > writing duplicate logic? > This, to me, is a key area for improvement. Aside from the development challenge the idea imposes, an extra issue with writing DRY validation for django and javascript is that the project doesn't of

Re: speeding up iterating over query set

2011-07-12 Thread Andre Terra
Have you looked at haystack? http://haystacksearch.org/ Cheers, André On Tue, Jul 12, 2011 at 10:49 AM, Michel30 wrote: > I have tried and I think I have it mostly working: it returns ALL > unique docid's. > > What is left is that my code is part of a search function. Originally > I got norma

Re: speeding up iterating over query set

2011-07-12 Thread bruno desthuilliers
On Jul 12, 3:49 pm, Michel30 wrote: > I have tried and I think I have it mostly working: it returns ALL > unique docid's. > > What is left is that my code is part of a search function. Originally > I got normalized keywords from a user and used those Q-objects to look > for keywords in a selected

Re: Django form validation.. does anyone else find it awkward??

2011-07-12 Thread Derek
On Jul 12, 10:15 am, Venkatraman S wrote: > On Tue, Jul 12, 2011 at 1:23 PM, Cal Leeming [Simplicity Media Ltd] < > > > cal.leem...@simplicitymedialtd.co.uk> wrote: > > On 12 Jul 2011 08:13, "bruno desthuilliers" > > wrote: > > > > On Jul 12, 3:37 am, Venkatraman S wrote: > > > > > On the valid

Re: speeding up iterating over query set

2011-07-12 Thread Michel30
I have tried and I think I have it mostly working: it returns ALL unique docid's. What is left is that my code is part of a search function. Originally I got normalized keywords from a user and used those Q-objects to look for keywords in a selected set of columns. I still have to figure out how

Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-07-12 Thread Cal Leeming [Simplicity Media Ltd]
Hi all, Great response to this, 45 registered votes in total. The webcast will take place on Monday 29th August 2011 - (Minimum resolution 1920x1080) However, because the time zone results are almost split 50/50, I'm going to allow users to select from two time slots, if the results are still sp

Re: Problem with user.username

2011-07-12 Thread Tom Evans
On Tue, Jul 12, 2011 at 2:25 PM, bruno desthuilliers wrote: > On Jul 12, 3:07 pm, Tom Evans wrote: > (snip) >> Programming by permutation is never a good strategy. > > Indeed. Yet: > >> A typical view using RequestContext and render_to_response should look >> like this: >> >> def someview(request

Re: speeding up iterating over query set

2011-07-12 Thread bruno desthuilliers
On Jul 12, 12:26 pm, Michel30 wrote: > Hi guys, > > I've been trying your suggestions but I'm afraid I'm stretching the > limits of my Python/Django abilities ;-) > > Bruno got it right: what I want is a queryset of "model" with distinct > docid having the highest version number, sorted by revisio

Re: Problem with user.username

2011-07-12 Thread Tom Evans
On Tue, Jul 12, 2011 at 2:07 PM, Tom Evans wrote: > On Tue, Jul 12, 2011 at 1:41 PM, nicolas HERSOG wrote: >> Hi ! >> >> It's very strange, i just found a way to solve my probleme but i don't have >> 'django.core.context_processors.request' in my TEMPLATE_CONTEXT_PROCESSORS. >> >> For solve my pr

Re: Problem with user.username

2011-07-12 Thread bruno desthuilliers
On Jul 12, 3:07 pm, Tom Evans wrote: (snip) > Programming by permutation is never a good strategy. Indeed. Yet: > A typical view using RequestContext and render_to_response should look > like this: > > def someview(request): >   ctxt = RequestContext({ >     'hello': 'world', >   }) >   return r

Re: Problem with user.username

2011-07-12 Thread nicolas HERSOG
Thx ! I'll read this and try to implement the "right way" :) thx Tom On Tue, Jul 12, 2011 at 3:07 PM, Tom Evans wrote: > On Tue, Jul 12, 2011 at 1:41 PM, nicolas HERSOG > wrote: > > Hi ! > > > > It's very strange, i just found a way to solve my probleme but i don't > have > > 'django.core.con

Re: Problem with user.username

2011-07-12 Thread Tom Evans
On Tue, Jul 12, 2011 at 1:41 PM, nicolas HERSOG wrote: > Hi ! > > It's very strange, i just found a way to solve my probleme but i don't have > 'django.core.context_processors.request' in my TEMPLATE_CONTEXT_PROCESSORS. > > For solve my problem i added in my views.py : > from django.shortcuts impo

Re: Problem with user.username

2011-07-12 Thread nicolas HERSOG
Hi ! It's very strange, i just found a way to solve my probleme but i don't have 'django.core.context_processors.request' in my TEMPLATE_CONTEXT_PROCESSORS. For solve my problem i added in my views.py : from django.shortcuts import render_to_response this is my previous index views who didn t wo

Re: block bots and spiders

2011-07-12 Thread Phang Mulianto
yes Bruno, that's what i mean, so this is doable.. and also can prevent DDOS attack to your core web server... On Tue, Jul 12, 2011 at 6:28 PM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > On Jul 12, 11:57 am, Phang Mulianto wrote: > > hi.. > > > > why not block the spiders in t

Re: Django example for searching in address book with over 1000 entries

2011-07-12 Thread Venkatraman S
On Tue, Jul 12, 2011 at 4:23 PM, Gelonida N wrote: > > I'd like to implement a simple django address book Application with over > 1000 entries. > > I'm still struggling whether (and if yes how) to use Ajax or not > for searching a contact. > > Ideally I would start filtering the entries while typ

Django example for searching in address book with over 1000 entries

2011-07-12 Thread Gelonida N
Hi, I'd like to implement a simple django address book Application with over 1000 entries. I'm still struggling whether (and if yes how) to use Ajax or not for searching a contact. Ideally I would start filtering the entries while typing a name in the search field) I'd like to use the applica

Re: Problem with user.username

2011-07-12 Thread Kenneth Gonsalves
On Mon, 2011-07-11 at 23:31 -0700, Suprnaturall wrote: > The problem is : when i m in login.html i see my user.username, but > when i submit the login form and being redirect to index i don t > retrieve the user.username. do you have this in your settings.py: TEMPLATE_CONTEXT_PROCESSORS = (

Re: block bots and spiders

2011-07-12 Thread bruno desthuilliers
On Jul 12, 11:57 am, Phang Mulianto wrote: > hi.. > > why not block the spiders in the web server environtment . > i think it is better than has to put the code in the apps. > > is it possible ? because i had read that some web server can block > unnecesary request before reach the real web server

Re: speeding up iterating over query set

2011-07-12 Thread Michel30
Hi guys, I've been trying your suggestions but I'm afraid I'm stretching the limits of my Python/Django abilities ;-) Bruno got it right: what I want is a queryset of "model" with distinct docid having the highest version number, sorted by revisiondate. If have the following result of my found_e

Re: speeding up iterating over query set

2011-07-12 Thread Michel30
Hi guys, I've been trying your suggestions but I'm afraid I'm stretching the limits of my Python/Django abilities ;-) Bruno got it right: what I want is a queryset of "model" with distinct docid having the highest version number, sorted by revisiondate. If have the following result of my found_e

Re: speeding up iterating over query set

2011-07-12 Thread Michel30
Hi guys, I've been trying your suggestions but I'm afraid I'm stretching the limits of my Python/Django abilities ;-) Bruno got it right: what I want is a queryset of "model" with distinct docid having the highest version number, sorted by revisiondate. If have the following result of my found_e

Problem with user.username

2011-07-12 Thread Suprnaturall
Hi, First of all, apologize me for my poor, poor english. I m new with django and i m stuck with a odd thing. I created a login form and use the default django login handlet like this : base.html : (...) {% if user.is_authenticated %} {{user.use

Info Needed: Sprints at DjangoCon 2011

2011-07-12 Thread Shubhanan Bakre
Hi, This will be my first year at DjangoCon and I wanted to know regarding activities that happen during sprints. Thanks and Regards, Shubhanan Bakre -- 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

Re: Using the mailing list

2011-07-12 Thread Kenneth Gonsalves
On Tue, 2011-07-12 at 08:42 +0100, Cal Leeming [Simplicity Media Ltd] wrote: > Oh, that's a good idea. I can probably do a write up about CodeIgniter > and > PHP. Also, perhaps this deserves a wiki page of its own..? let's see how it goes - if it gets big enough we can separate it. -- regards K

Re: block bots and spiders

2011-07-12 Thread Phang Mulianto
hi.. why not block the spiders in the web server environtment . i think it is better than has to put the code in the apps. is it possible ? because i had read that some web server can block unnecesary request before reach the real web server..like nginx, lighttpd, etc.. On Tue, Jul 12, 2011 at

Re: request.method GET or POST

2011-07-12 Thread Masklinn
On 2011-07-12, at 07:04 , Venkatraman S wrote: > Comments? (note that i am not passing request object to individual doPOST or > doGET). You can trivially do that by using callable objects as views, with a common superclass for dispatching. class MethodView(object): def __call__(self, request,

Re: Django API

2011-07-12 Thread Tom Evans
On Tue, Jul 12, 2011 at 10:23 AM, Jonas Geiregat wrote: > Hello, > > I really love django's documentation. It covers a lot of ground and is really > well written. > I do have one problem with it. It might be best explained with an example. > > I want to see all methods and properties of the reque

Re: block bots and spiders

2011-07-12 Thread Jonas Geiregat
> Hi all, > > has someone an effective way to block away bots and spiders? > There are so many ignoring robots.txt - besides facebook and tons of > Java/xyz clients there are many more illegal spiders around. > > So does anyone have a performance effective way to block them out? > Or do you thi

Re: Django API

2011-07-12 Thread Thomas Guettler
On 12.07.2011 11:23, Jonas Geiregat wrote: > Hello, > > I really love django's documentation. It covers a lot of ground and is really > well written. > I do have one problem with it. It might be best explained with an example. > > I want to see all methods and properties of the request parame

Re: request.method GET or POST

2011-07-12 Thread Jonas Geiregat
Op 12-jul-2011, om 07:04 heeft Venkatraman S het volgende geschreven: > We have to check for request.method to suitably route the request to the > logic. > > Would it be nice if we have something like doGet or doPost(similar to java > servlets) that we have in our views, > so that the request

Django API

2011-07-12 Thread Jonas Geiregat
Hello, I really love django's documentation. It covers a lot of ground and is really well written. I do have one problem with it. It might be best explained with an example. I want to see all methods and properties of the request parameter in the view. Search the docs for "request" doesn't hel

Re: Django Knowledge Strorehouse

2011-07-12 Thread Derek
""" On Jul 10, 5:34 pm, "Cal Leeming [Simplicity Media Ltd]" wrote: Sadly, with all the extra projects I'm working on atm, it would just sit in my todo list for at least 3-6 months :( On Sun, Jul 10, 2011 at 3:59 PM, Jacob Kaplan-Moss wrote: [If you want to add search to the community aggrega

Re: Emailing submitted forms

2011-07-12 Thread Derek
> >     As the form is quite long I don't want to maintain a > >     field-after-field html template for the results. > > >     Is there any convenient way to do this? > > > Iterate over the fields in the form in an email template and send that > > template over? > > Hmm, yes, that'll do. I was hop

Re: get all objects that are related to current, reverse look up

2011-07-12 Thread Marc Aymerich
On Tue, Jul 12, 2011 at 4:32 AM, garagefan wrote: > simply put, here's my code > > class ContentBlock(Orderable, Displayable): >  location = models.ManyToManyField(ContentBlockLocation, blank=True, > null=True, help_text="list of locations to display content block") >  page = models.ManyToManyFiel

Re: django-variables

2011-07-12 Thread Derek
On Jul 9, 9:41 am, sandeep kaur wrote: > I want to make some of my data in django-templates, variable. And > separate single file to define the variables. How can I do this? This is a common occurrence for Django - start with the overview here: http://www.djangobook.com/en/2.0/chapter04/ -- You

Re: Django form validation.. does anyone else find it awkward??

2011-07-12 Thread Venkatraman S
On Tue, Jul 12, 2011 at 1:23 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > On 12 Jul 2011 08:13, "bruno desthuilliers" > wrote: > > > > On Jul 12, 3:37 am, Venkatraman S wrote: > > > > > > On the validation, yes, it is a little pesky. But, offlate, i am

block bots and spiders

2011-07-12 Thread Henrik Genssen
Hi all, has someone an effective way to block away bots and spiders? There are so many ignoring robots.txt - besides facebook and tons of Java/xyz clients there are many more illegal spiders around. So does anyone have a performance effective way to block them out? Or do you think - if performanc

Re: Django form validation.. does anyone else find it awkward??

2011-07-12 Thread Cal Leeming [Simplicity Media Ltd]
On 12 Jul 2011 08:13, "bruno desthuilliers" wrote: > > On Jul 12, 3:37 am, Venkatraman S wrote: > > > > On the validation, yes, it is a little pesky. But, offlate, i am trying to > > *understand* it better and trying to move the logic > > to the client. For eg. jquery-validate does bulk of the st

Re: Using the mailing list

2011-07-12 Thread Cal Leeming [Simplicity Media Ltd]
Oh, that's a good idea. I can probably do a write up about CodeIgniter and PHP. Also, perhaps this deserves a wiki page of its own..? On 12 Jul 2011 04:08, "Kenneth Gonsalves" wrote: > hi, > > I think this deserves a thread of it's own. I have started a section on > migrating from other frameworks

Re: get all objects that are related to current, reverse look up

2011-07-12 Thread bruno desthuilliers
On Jul 12, 4:32 am, garagefan wrote: > simply put, here's my code > > class ContentBlock(Orderable, Displayable): >   location = models.ManyToManyField(ContentBlockLocation, blank=True, > null=True, help_text="list of locations to display content block") >   page = models.ManyToManyField(Page, bla

Re: Django form validation.. does anyone else find it awkward??

2011-07-12 Thread bruno desthuilliers
On Jul 12, 3:37 am, Venkatraman S wrote: > > On the validation, yes, it is a little pesky. But, offlate, i am trying to > *understand* it better and trying to move the logic > to the client. For eg. jquery-validate does bulk of the stuff on client side > - atleast for required fields. So, moving >

Re: request.method GET or POST

2011-07-12 Thread bruno desthuilliers
On Jul 12, 7:04 am, Venkatraman S wrote: > We have to check for request.method to suitably route the request to the > logic. > > Would it be nice if we have something like doGet or doPost(similar to java > servlets) that we have in our views, > so that the request gets automatically routed , and t