Re: Blog Listing on Home Page

2011-02-22 Thread delegbede
Got the book. Thanks a million Karen. Sent from my BlackBerry wireless device from MTN -Original Message- From: Karen McNeil Sender: django-users@googlegroups.com Date: Tue, 22 Feb 2011 15:56:20 To: Django users Reply-To:

Re: Question(s) Concerning Securing Pages From Bots?

2011-02-22 Thread Mike Ramirez
On Tuesday, February 22, 2011 10:03:41 pm Kenneth Gonsalves wrote: > On Tue, 2011-02-22 at 18:23 +, Cal Leeming [Simplicity Media Ltd] > > wrote: > > > +captcha>Not > > busting your balls but, please at least make an effort to

Re: Question(s) Concerning Securing Pages From Bots?

2011-02-22 Thread Kenneth Gonsalves
On Tue, 2011-02-22 at 18:23 +, Cal Leeming [Simplicity Media Ltd] wrote: > +captcha>Not > busting your balls but, please at least make an effort to look on > Google > before posting questions to the list. this is even better:

RE: urls.py and views.generic issue

2011-02-22 Thread Chris Matthews
Hi Antti, 1) Your day match is for \w{1,2} which will match one or 2 digits but also word characters because \w is same as [a-zA-Z0-9_] (see re documentation). (r'(?P\d{4})/(?P[a-z]{3})/(?Pw{1,2})/(?P[-w]+)/$' Should be (r'(?P\d{4})/(?P[a-z]{3})/(?P\d{1,2})/(?P[-w]+)/$' 2) The slash

Re: Question(s) Concerning Securing Pages From Bots?

2011-02-22 Thread Kenneth Gonsalves
On Tue, 2011-02-22 at 10:09 -0800, hank23 wrote: > On some web pages the user is prompted to type in a series of randomly > generated characters which appear on the screen, in order to limit > access of those pages to real users instead of allowing bots to also > access them. Now my question is is

Re: ViewDoesNotExist Error

2011-02-22 Thread ravi krishna
Hi all, I got it solved. def employeeProfile(request): *emp_profile* = EmployeeDetails.objects.all() return render_to_response('employeeProfile.html',{'emp_profile':emp_profile}) Thanks & Regards, Ravi Krishna My profiles: [image: Facebook]

Re: urls.py and views.generic issue

2011-02-22 Thread Antti
Hello Chris, thanks for the response. I don't know where that space is coming from. When I type in http://127.0.0.1:8000/blog/ a page loads using the list.html template as it should. Would that mean that the space might be fine because the main urls.py is calling the blog urls.py? I have a main

Re: ViewDoesNotExist Error

2011-02-22 Thread Mike Ramirez
On Tuesday, February 22, 2011 08:24:43 pm ravi krishna wrote: > from task.employeeDetails import emp_profile I did see* not where emp_profile comes from. Mike (sorry). -- We are sorry. We cannot complete your call as dialed. Please check the number and dial again or ask your operator for

Re: urls.py and views.generic issue

2011-02-22 Thread Antti
Thanks jnns for the response. I tried adding the backslash but it still doesn't match. Would I need to put a different character after the other entries in the expression? What I mean would there be a different character used in "(?P\[a-z]{3})" ? Also one more note if I type in

Re: ViewDoesNotExist Error

2011-02-22 Thread Mike Ramirez
On Tuesday, February 22, 2011 08:24:43 pm ravi krishna wrote: > from task.employeeDetails import emp_profile I did not where emp_profile comes from. Mike -- We are sorry. We cannot complete your call as dialed. Please check the number and dial again or ask your operator for assistance.

ViewDoesNotExist Error

2011-02-22 Thread ravi krishna
Hi, i am trying to do a simple Django application where employee list is read from database and displayed. for that i defined the models and entered the values to database through Django admin. But while trying to display data from database i am stuck with an error, "ViewDoesNotExist at

Re:

2011-02-22 Thread Dana Woodman
Please don't click on that link, it appears someone got into my account... -- 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

[no subject]

2011-02-22 Thread Dana Woodman
http://europucier.com/cool01.11.php?ID=528 -- Cheers, Dana W. -- 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

Cross Site Request Forgery (csrf) via POST / JQuery

2011-02-22 Thread gorans
Hi I'm using Django's CSRFViewMiddleware and am making a POST request in a page (using JQuery) in the form of: $.post('{% url posted_to_wall %}', { network: 'FBK', action_type: 'feed',

Re: Blog Listing on Home Page

2011-02-22 Thread delegbede
Thanks Karen. I'd get the book and work through it. Regards. Sent from my BlackBerry wireless device from MTN -Original Message- From: Karen McNeil Sender: django-users@googlegroups.com Date: Tue, 22 Feb 2011 15:56:20 To: Django

innodb ibdata1 file grows irreversibly from testing

2011-02-22 Thread Cody Django
from what I understand, the ibdata1 file doesn't recover space from dropped tables. Since django testing creates a test database and then drops it, repeatedly, does this contribute to the ibdata1 file size? Thanks Cody -- You received this message because you are subscribed to the Google

Re: Blog Listing on Home Page

2011-02-22 Thread Karen McNeil
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 21, 4:33 pm,

Re: Problem with readonly_fields

2011-02-22 Thread Mario8k
The same occur when use "exclude = (att1,att2..)" because the fields are mandatory. I only need to update a model (not add, nor delete) whith a subset of editable fields, if i'm not superuser. On 22 feb, 19:10, Mario8k wrote: > Hi, > > Trying to make a custom model admin

How do I authenticate a urllib2 script in order to access HTTPS web services from a Django site?

2011-02-22 Thread carl
Hi, everyone. I've searched the group site and couldn't find anything with this specific problem. If I missed a good discussion on this, let me know. The following is my problem: I'm working on a django/mod_wsgi/apache2 website that serves sensitive information using https for all requests and

Problem with readonly_fields

2011-02-22 Thread Mario8k
Hi, Trying to make a custom model admin form for a staff user (not a superuser), I had to override ModelAdmin.get_readonly_fields() and ModelAdmin.get_fieldsets(). The problem arrives when i try to change the data of a model record, because the field is mandatory (blank=False, as default). When i

Re: Unexpected result from making single object query

2011-02-22 Thread Daniel Roseman
On Tuesday, February 22, 2011 9:35:18 PM UTC, mm wrote: > > the next field in the Entry table contain the name of the next entry > the prev field in the Entry table contain the name of the previous > entry. > > current_entry = Entry.objects.get(id=10) > > next_entry =

Re: Satchmo Error - Invalid block tag: 'thumbnail', expected 'else' or 'endif'

2011-02-22 Thread Bobby Roberts
Hey Daniel - we've got {% load thumbnail%} at the top of the template (a standard satchmo template anyway)... running version 3.2.5 for sorl. On Feb 22, 4:25 pm, Daniel Roseman wrote: > On Tuesday, February 22, 2011 6:22:16 PM UTC, Bobby Roberts wrote: > > > Hi group.  

Re: Unexpected result from making single object query

2011-02-22 Thread delegbede
First, confirm the relationship between those variables. current_entry = Entry.objects.get(id=10) next_entry = Entry.objects.get(current_entry.next) prev_entry = Entry.objects.get(current_entry.prev) By my estimation,next_entry should return Entry object with I'd of 11 while prev_entry returns

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread delegbede
The ssh thing, I agree. It works like magic. I'm however compelled to believe that the time you'd spend learning VI is enough to get you already developing django powered apps. My case study. Sent from my BlackBerry wireless device from MTN -Original Message- From: Brice Leroy

Re: Unexpected result from making single object query

2011-02-22 Thread mm
I see where my problem is. I should use the name field instead: next_entry = Entry.objects.get(name=current_entry.next) prev_entry = Entry.objects.get(name=current_entry.prev) thanks On Feb 22, 3:35 pm, mm wrote: > the next field in the Entry table contain the name of the

Re: Unexpected result from making single object query

2011-02-22 Thread mm
the next field in the Entry table contain the name of the next entry the prev field in the Entry table contain the name of the previous entry. current_entry = Entry.objects.get(id=10) next_entry = Entry.objects.get(next=current_entry.next) prev_entry = Entry.objects.get(prev=current_entry.prev)

Re: Satchmo Error - Invalid block tag: 'thumbnail', expected 'else' or 'endif'

2011-02-22 Thread Bobby Roberts
hey daniel - we've got {%load thumbnail%} at the top of the standard satchmo template. On Feb 22, 4:25 pm, Daniel Roseman wrote: > On Tuesday, February 22, 2011 6:22:16 PM UTC, Bobby Roberts wrote: > > > Hi group.  I've posted this in the satchmo group but am posting

Re: How to merge querysets and sort it?

2011-02-22 Thread delegbede
I'm not so sure if I'm answering your question but there's a way you can chain querysets. In your views.py file import Q from django.db.models. You could check django documentation. I think it works well. Sent from my BlackBerry wireless device from MTN -Original Message- From: Ryan

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread Daniel Roseman
On Tuesday, February 22, 2011 8:31:43 PM UTC, mongoose wrote: > > want to get vim working with omnicomplete then perhaps i'll get into > it more. > > I've added this to my vimrc file > > filetype plugin on > set ofu=syntaxcomplete#Complete > > when i try > :python print 'hello' > i get this

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread Brice Leroy
Might seam rude but you should try coding on linux. Some easy distribution like ubuntu. You can even install it in a virtual environment with virtual box. 2011/2/22 > You might want to try Activestate Komodo Edit. > That's what I use and it's such a wonderful experience.

Re: Satchmo Error - Invalid block tag: 'thumbnail', expected 'else' or 'endif'

2011-02-22 Thread Daniel Roseman
On Tuesday, February 22, 2011 6:22:16 PM UTC, Bobby Roberts wrote: > > Hi group. I've posted this in the satchmo group but am posting here > as well in hopes of getting some help. > > This error is caused by this code: > > {% if product.main_image %} > > {%

Re: Unexpected result from making single object query

2011-02-22 Thread Daniel Roseman
On Tuesday, February 22, 2011 8:30:27 PM UTC, mm wrote: > > I am not sure what I am doing wrong but there is my code: > > current_entry = Entry.objects.get(id=10) > > next_entry = Entry.objects.get(current_entry.next) > prev_entry = Entry.objects.get(current_entry.prev) > > where

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread delegbede
You might want to try Activestate Komodo Edit. That's what I use and it's such a wonderful experience. Regards. Sent from my BlackBerry wireless device from MTN -Original Message- From: mongoose Sender: django-users@googlegroups.com Date: Tue, 22 Feb 2011

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread Bill Freeman
what happens if you type: python at the Cygwin shell prompt? And what does it say if you type: which python On Tue, Feb 22, 2011 at 3:31 PM, mongoose wrote: > want to get vim working with omnicomplete then perhaps i'll get into > it more. > > I've added this to my

Re: Unexpected result from making single object query

2011-02-22 Thread Shawn Milochik
What do the 'next' and 'prev' methods of your Entry model do? Shawn -- 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

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread mongoose
want to get vim working with omnicomplete then perhaps i'll get into it more. I've added this to my vimrc file filetype plugin on set ofu=syntaxcomplete#Complete when i try :python print 'hello' i get this error "Could not load library python26.dll The python library could not be loaded."

Unexpected result from making single object query

2011-02-22 Thread mm
I am not sure what I am doing wrong but there is my code: current_entry = Entry.objects.get(id=10) next_entry = Entry.objects.get(current_entry.next) prev_entry = Entry.objects.get(current_entry.prev) where current_entry.next and current_entry.prev columns contained the name of the previous and

Re: How to reinstall Python Interpreters?

2011-02-22 Thread LJ
Yes. I used the apt-get install command to install dajaxice, but it installs an older version, and the installer for the newer version isn't done. The installer for the older version does not put anything in the dist- packages directory. I'm trying to figure out how to manually install it, but

database i18n

2011-02-22 Thread Federico Capoano
I'm quite surprised that django doesn't have a native i18n solution for models. I've been trying some apps but one doesn't work with latest versions, one is no longer developed, another one has no documentation, another one simply doesn't work. Tomorrow I'm going to try again and pheraps try

Re: Question(s) Concerning Securing Pages From Bots?

2011-02-22 Thread Casey S. Greene
The term that you are looking for is "captcha." If you google for: django captcha you will find a wealth of information. Hope this helps! Casey On 02/22/2011 01:09 PM, hank23 wrote: On some web pages the user is prompted to type in a series of randomly generated characters which appear on

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread Bill Freeman
Except beware of using vi/vim to edit .py files since they are normally configured to use tabs for indentation and to assume that a tab means 4 columns, whereas python (correct in the view of a really old timer) takes them to mean 8 columns. It is possible to configure at least vim to never

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread Brice Leroy
Learning VI is good for you and it makes you fast. Learning curve is steep, I agree, but the result is quite amazing. One other big advantage, you can easily work on any server through SSH. 2011/2/22 mongoose > I used vim for a while but the learning curve really is

Custom tag displayed in different tabs

2011-02-22 Thread Maverick
Hi, I am newbie for django frameworks. I have a one webpage which consists of different tabs. In each different tabs consist of different custom tag fields. But i want to show one custom tag field which is used in one or more tab. How to show this field in both the tabs.? For example: I have

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread mongoose
I used vim for a while but the learning curve really is steep. so steep that i'm more effecient with the old style editors. perhaps i'll just do what i do in notepad++ then format it in vim. i'll keep looking around for a nice formatter though. On Feb 22, 5:20 pm, Bill Freeman

Re: Askani

2011-02-22 Thread Cal Leeming [Simplicity Media Ltd]
(re-sent) I have to disagree. Although it would be interesting to hear other peoples thoughts on this as well. On Tue, Feb 22, 2011 at 6:45 PM, Brice Leroy wrote: > Actually it doesn't. You'll still have to design your data model and > interactions. Coding basic model,

Re: Cool and useful development commands :-)

2011-02-22 Thread Cal Leeming [Simplicity Media Ltd]
Haven't had chance to look at it properly yet, but looks like a useful set of tools. I'll download and have a tinker around later :) On Tue, Feb 22, 2011 at 4:46 PM, Simone Federici wrote: > http://www.os4d.org/djangodevtools > Your feedback is very welcome > > Simone > >

Re: Askani

2011-02-22 Thread Brice Leroy
Actually it doesn't. You'll still have to design your data model and interactions. Coding basic model, urls, forms etc... is definitely boring. This takes care of those repetitive tasks and let you the fun of customization 2011/2/22 Cal Leeming [Simplicity Media Ltd] <

ANN: Security release issued for the django CMS

2011-02-22 Thread Jonas Obrist
Today the Django CMS team is issuing a security release for the 2.1 series, version 2.1.3, to fix a serious security issue. All 2.1 releases as well as any git checkout newer than April 8th 2010 are affected and anyone using any of these versions is strongly urged to upgrade immediately. For

Satchmo Error - Invalid block tag: 'thumbnail', expected 'else' or 'endif'

2011-02-22 Thread Bobby Roberts
Hi group. I've posted this in the satchmo group but am posting here as well in hopes of getting some help. This error is caused by this code: {% if product.main_image %} {% thumbnail product.main_image.picture 85x85 as image %} {% endif

Re: Question(s) Concerning Securing Pages From Bots?

2011-02-22 Thread Cal Leeming [Simplicity Media Ltd]
http://www.google.co.uk/search?sourceid=chrome=UTF-8=django+captcha Not busting your balls but, please at least make an effort to look on Google before posting questions to the list. On Tue, Feb 22, 2011 at 6:09 PM, hank23

Re: Askani

2011-02-22 Thread Cal Leeming [Simplicity Media Ltd]
I'm sure these will be useful to someone, but it kinda takes the fun out of designing a structure from scratch :( On Tue, Feb 22, 2011 at 5:47 PM, Brice Leroy wrote: > You should try http://www.djangogenerator.com > > - Generate model > - Views > - Forms > - Urls > > and

Satchmo Error - Invalid block tag: 'thumbnail', expected 'else' or 'endif'

2011-02-22 Thread Bobby Roberts
Hi group. I've posted this in the satchmo group but am posting here as well in hopes of getting some help. This error is caused by this code: {% if product.main_image %} {% thumbnail product.main_image.picture 85x85 as image %} {% endif

Question(s) Concerning Securing Pages From Bots?

2011-02-22 Thread hank23
On some web pages the user is prompted to type in a series of randomly generated characters which appear on the screen, in order to limit access of those pages to real users instead of allowing bots to also access them. Now my question is is there a plug-in, sample code, or outright django

Re: Askani

2011-02-22 Thread Brice Leroy
You should try http://www.djangogenerator.com - Generate model - Views - Forms - Urls and manage User profile extesion Brice 2010/11/26 Wim Feijen > Nice! It definitely saves typing. Sounds like a right thing for > newbies, because when I was a newbie, I always had to

Cool and useful development commands :-)

2011-02-22 Thread Simone Federici
http://www.os4d.org/djangodevtools Your feedback is very welcome Simone -- 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

How to merge querysets and sort it?

2011-02-22 Thread Ryan Wijaya
For me it takes more than a week to solve it alone... So to the point, is it possible to merge two querysets and sort it as well? Recently I've used itertools, but it returns a table with duplicated value and requested objects not properly displayed (the get_full_name displayed separately with

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread Bill Freeman
You *could* use Tidy, then post process with a sed script to convert the '%20's to spaces. There may be comparable Windows tool, but if you want sed, you can install Cygwin. But if you install Cygwin, you could edit with vim. Since you're editing templates, you probably have python installed.

Re: How to format django template code nicely with notepad++?

2011-02-22 Thread Bill Freeman
And, certainly, replacing the %20 stuff is easy in python, should you be happy with Tidy plus a post processing step. There are probably even suitable functions in the http or urllib libraries that will catch more than the %20s. You could even have the python tool run Tidy for you, so that it

Problem using inheritance in third level: object has not attribute content_ptr_id

2011-02-22 Thread Ariel
Hi every body: I have a problem making a hierarchy of objects in my project. For example I have a class Thing in the first level that inherited from model, then I have a class Content who inherites from Thing in the second level, another class named Book inherited from Content. The problem is that

How to format django template code nicely with notepad++?

2011-02-22 Thread mongoose
hi all, I'm using notepad++ a lot and really missing a code formatter (vim would be = to format). Anyone know of anyway to format my html nicely? I've tried HTML Tidy but it keeps adding a 20% where I have a space for example "{{%20MEDIA_URL%20}}css/styles.css". -- You received this message

Re: Filtering List based on a custom dropdown

2011-02-22 Thread Andre Terra
Thank you, that looks great. I'll have a look at it later today. Sincerely, Andre Terra On Tue, Feb 22, 2011 at 3:59 AM, Derek wrote: > On Feb 21, 4:22 am, Andre Terra wrote: > > I'd also like some input on this, as I'm reaching a point of my project

Re: I'm having problem showing from the value a sub-sub model.

2011-02-22 Thread Chris
sorry your right, I didn't receive any notification so I thought it wasn't posted. I've answered in the original thread On Feb 21, 2:00 pm, Shawn Milochik wrote: > Why are you re-posting this? You posted it over the weekend. I > replied. If my reply didn't help, tell us the

Re: TemplateDoesNotExist error when running tests in django.contrib.sitemaps.tests.basic.SitemapTests

2011-02-22 Thread Karen Tracey
On Tue, Feb 22, 2011 at 4:18 AM, sajal wrote: > Installing django from the svn trunk no more fails the tests. Perhaps > the archives should not be skipping these files? > This problem was reported in the bug tracker and has already been fixed:

What's happen when using threadlocals with Apache/mod_wsgi?

2011-02-22 Thread Alisue
Hi, I have a question to using threadlocals trick on Apache/mod_wsgi. I built some SMS using threadlocals trick and FAILED. I was filtering blog post with current user, and blog post has publish policy like "public"(everyone can see) and "grouped"(user who joined in the group which author joined

Announce: Django REST framework

2011-02-22 Thread tom christie
Hey all, I'm superpleased to announce the release of Django REST framework 0.1. http://django-rest-framework.org/ The project is another mini-framework aimed at making it easy to build well-connected, self-describing RESTful web APIs, in the same vein as django-piston and django-tastypie.

Re: Django Form Validation

2011-02-22 Thread ju
Thank you -- 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 options, visit this

Handling readonly fields in the admin, which are provided by the form

2011-02-22 Thread Viktor Kojouharov
Hello, I'm having a bit of a problem providing a custom readonly field, which is defined in the form. The field is defined in the form, as such: class Form(forms.modelForm): field = myCustomField() The field is also associated with a custom widget, which is set in the form's __init__. it is

Re: Best way to deploy a project with custom compiled python 2.7 & virtualdev

2011-02-22 Thread Benedict Verheyen
On 21/02/2011 9:57, Benedict Verheyen wrote: > Hi, > > > i have a Django project in a virtualdev. > Because it was developed before Debian squeeze, i wanted a recent version of > python > and compiled my own 2.7 version, then installed that in my virtual dev. > > Now for deploying to the

TemplateDoesNotExist error when running tests in django.contrib.sitemaps.tests.basic.SitemapTests

2011-02-22 Thread sajal
when running python manage.py test i get the following output :- http://pastie.org/1592973 I am using django 1.3 beta 1 (the problem also occurred in alpha) Basically it complains about a missing file: custom_sitemap.xml After investigating, i realized that all the packaged archives from