Re: comparing custom template tag within if tag

2012-03-30 Thread Tom Evans
On Thu, Mar 29, 2012 at 5:42 PM, Nikhil Verma wrote: > Hi All > > I am still not able to solve this problem .Any more suggestions ? > > Thanks > Because there is no solution. You must rewrite the custom tag to set a variable in the context, which you can then test in your 'if' tag. The link in m

Using the backend database to secure a page on the frontend

2012-03-30 Thread vanderkerkoff
Hello there I"m sure this question has been answered before but I just can't find it, apologies. We've got a django 1.1.2 site and I need to secure some sections of the frontend, and use the users and groups model in the backend as the database to provide authentication. I really don't know wher

Re: Using the backend database to secure a page on the frontend

2012-03-30 Thread Philip Mountifield
If you want to use the existing permission system, I think you'll find this is what you need: https://docs.djangoproject.com/en/1.4/topics/auth/#the-permission-required-decorator You could add some extra permissions to your models too if you need them: https://docs.djangoproject.com/en/1.4/ref

Tweepy Image and Link display

2012-03-30 Thread coded kid
Hi guys, how can I get users twitter handle with link and display their image in my django app. What I mean is this, I want the users username should be clickable (so that when I click on it it will direct me to the user profile), and display the user profile image by their update. I hope you get m

Re: Using the backend database to secure a page on the frontend

2012-03-30 Thread vanderkerkoff
Thanks for getting back to me Phillip. I'm using that page as a guide, and i've got a pages application that has a registration_required boolean field setup. In my urls file I've got this (r'^login/$', 'django.contrib.auth.views.login'), In my page view I'm doing this print pg.registration_req

Re: Template file not recognized for some strange reason

2012-03-30 Thread Juan Pablo Martínez
Try TEMPLATE_DIRS = ("*C:*/Users/Documents/Music\ App/redlab/ templates",) On Fri, Mar 30, 2012 at 12:58 AM, Mika wrote: > TEMPLATE_DIRS = ("/Users/Documents/Music\ App/redlab/ > templates",) > -- juanpex -- You received this message because you are subscribed to the Google Groups "Django

Doing something silly, I'm sure

2012-03-30 Thread vanderkerkoff
Sorry everyone, but this is driving me crazy https://docs.djangoproject.com/en/1.2/topics/auth/ urls.py (r'^accounts/login/$', 'django.contrib.auth.views.login'), view.py if pg.registration_required and not request.user.is_authenticated(): return HttpResponseRedirect('/accounts/login/?next=%s'

Re: svm python

2012-03-30 Thread Jeff Heard
Look in Orange. http://orange.biolab.si/ On Mar 30, 2012, at 2:23 AM, dummyman dummyman wrote: > Is any one aware of svm implementation using python ? > Apart from using weka tool ? > > > On Thu, Mar 29, 2012 at 9:21 AM, dummyman dummyman wrote: > Hi, > > I am looking for svm classifier i

Re: Doing something silly, I'm sure

2012-03-30 Thread Bill Freeman
Are you in debug mode so that the stack trace is displayed (on the development server)? Have you looked at the local variables in the trace to see what template it is trying to find? Are the permissions on the template such that django can read it? On the development server, pdb.set_trace() is y

Re: Doing something silly, I'm sure

2012-03-30 Thread Tom Evans
On Fri, Mar 30, 2012 at 1:11 PM, vanderkerkoff wrote: > Sorry everyone, but this is driving me crazy > > https://docs.djangoproject.com/en/1.2/topics/auth/ FYI to others, the stacktrace indicates OP is using 1.3 beta 1. > > urls.py > (r'^accounts/login/$', 'django.contrib.auth.views.login'), > >

Re: Template file not recognized for some strange reason

2012-03-30 Thread Tom Evans
2012/3/30 Juan Pablo Martínez : > Try > TEMPLATE_DIRS = ("C:/Users/Documents/Music\ App/redlab/ > templates",) > Unlikely to work on OS X. Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-

Re: Template file not recognized for some strange reason

2012-03-30 Thread Sandro Dutra
Try something like this: import os abspath = lambda *p: os.path.abspath(os.path.join(*p)) PROJECT_ROOT = abspath(os.path.dirname(__file__)) [...] TEMPLATE_DIRS = (abspath(PROJECT_ROOT, "templates"),) 2012/3/30 Tom Evans > 2012/3/30 Juan Pablo Martínez : > > Try > > TEMPLATE_DIRS = ("C:/Users/Do

Re: svm python

2012-03-30 Thread dummyman dummyman
Thanks a lot.Any other alternative ? On Fri, Mar 30, 2012 at 5:51 PM, Jeff Heard wrote: > Look in Orange. http://orange.biolab.si/ > > > > On Mar 30, 2012, at 2:23 AM, dummyman dummyman wrote: > > Is any one aware of svm implementation using python ? > Apart from using weka tool ? > > > On Thu,

Working with List in Tweepy

2012-03-30 Thread samuel ayo
Hello, how can I make users create their list in my django app automatically? Since the API.create_list() required parameters before it would work; * Creates a new list for the authenticated user. Accounts are limited to 20 lists. Parameters: name (Required), mode (public/private default: p

Re: Abridged summary of django-users@googlegroups.com - 38 Messages in 13 Topics

2012-03-30 Thread Peter F.
-- 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 group at

How to model postal address in django ???

2012-03-30 Thread Ariel Isaac Romero Cartaya
Hi everybody, is there any model in Django to represent postal address, I mean is there already models like Countries, provinces and cities with theirs relations to make this, and how to model the others attributes: streets, postal code, between streets and perhaps latitude and longitude to use go

How to debug transaction management errors?

2012-03-30 Thread Marcin Tustin
I have a view which is causing the error that follows. I understand what it means, but I am *certain* there is no way that my code should be causing this error (Every single return is prefaced with either transaction.commit() or transaction.rollback()). Is there a good way to debug this error? 20

Re: Http404 and process_exception

2012-03-30 Thread Justin Holmes
Russell, Yeah, I see the inconsistency there, and my first thought was that this is a bit backward.  However, the underlying distinction here is that it's not the 404 (ie, the resource gone missin') that is the exception but the Http404 object. It remains straightforward enough for a developer to

OT: just posting at djangojobs when suddenly...

2012-03-30 Thread Marc Aymerich
... something familiar comes up :) http://s18.postimage.org/j9dc6ufa1/Screenshot_5.png -- Marc -- 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,

Implementing Tagging with Django

2012-03-30 Thread puddy
Hello, I searched for tagging libraries for Django and found two (django- tagging and django-taggit) but both are fairly old and haven't been maintained. I'd like to implement some sort of tagging on my site - a bookmarking type service where each link has a set of tags. I know of how I would li

How can I best create a blog that works similarly to Tumblr?

2012-03-30 Thread Willy
I know the question is kind of poorly phrased. But here goes, I've been working on a blog software and I want to have five distinct post types (in the same way Tumblr does) but I'm having a hard time figuring out how to create my index view and detail views as they are currently five different

Re: Implementing Tagging with Django

2012-03-30 Thread Willy
Django-taggit works quite well, I would suggest trying it over django-tagging. Even if it hasn't been updated in a while it's still a good solution, and you could always make changes to it and fork your own version if it doesn't meet all your needs. On Friday, March 30, 2012 1:56:07 PM UTC-6,

changelist link in change_form.html

2012-03-30 Thread Lee
I know this has to be simple but I'm not finding it in the archives or google. I just want to include a link to the corresponding changelist in every add/edit form. I assume I need to update the change_form.html template, but what is the correct syntax to display the changelist URL? A 1.3-compatibl

Re: Implementing Tagging with Django

2012-03-30 Thread Javier Guerra Giraldez
On Fri, Mar 30, 2012 at 3:02 PM, Willy wrote: > Django-taggit works quite well, I would suggest trying it over > django-tagging can you elaborate on why do you find it better? i have only tried django-tagging some time ago, and maybe on a soon project would like to do better -- Javier -- You

Re: svm python

2012-03-30 Thread Leotis buchanan
Try shogun,it has python bindings Regards Leotis Buchanan Co-Founder Exterbox On Fri, Mar 30, 2012 at 8:24 AM, dummyman dummyman wrote: > Thanks a lot.Any other alternative ? > > > On Fri, Mar 30, 2012 at 5:51 PM, Jeff Heard > wrote: > >> Look in Orange. http://orange.biolab.si/ >> >> >> >> O

Re: svm python

2012-03-30 Thread william ratcliff
Libsvm or scikit-learn are light On Mar 30, 2012 6:19 PM, "Leotis buchanan" wrote: > Try shogun,it has python bindings > Regards > Leotis Buchanan > Co-Founder > Exterbox > > > > > On Fri, Mar 30, 2012 at 8:24 AM, dummyman dummyman wrote: > >> Thanks a lot.Any other alternative ? >> >> >> On Fri,

Questions about UnicodeDecodeError

2012-03-30 Thread Ali Mesdaq
I have a situation where I am reading data that I have no control over and inserting it into a db. The data is http headers. I am storing them in postgres db in a text field and the db encoding is SQL_ASCII. Since the data can be anything even non compliant http headers with anything for its values

dummyman dummyman wants to chat

2012-03-30 Thread dummyman dummyman
--- dummyman dummyman wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-39f62065b4-6ab0f5cba8-Hyccil_bE1jMXGxY1w4coCCKTtA You

Re: changelist link in change_form.html

2012-03-30 Thread dummyman dummyman
inside your folder template create admin directory all admin html files shud be placed here inside it create a dir for ur app inside ur app a dir for ur model so typically url will be http://localhost:8000/admin///add On Sat, Mar 31, 2012 at 2:22 AM, Lee wrote: > I know this has to be simple b

Re: django-admin change form page validation

2012-03-30 Thread dummyman dummyman
Hi unless u dont specify blank=True or null = True in modes for d corresponding fields, django will throw an errror if u don fill up the field On Sat, Mar 31, 2012 at 9:25 AM, Nikhil Verma wrote: > Hi All > > How can i apply validation in admin on various fields when they are > dependent on each

Re: django-admin change form page validation

2012-03-30 Thread Nikhil Verma
Hi I understand that but the problem is its a condition which i have to add if the revisit checkbox is selected and then in interview_type dropdown None option is selected ; after pressing save it should throw an error . None is an option in the dropdown . It is not blank=True and null =True INT

Re: django-admin change form page validation

2012-03-30 Thread dummyman dummyman
ok. in admin,.py file override the response_change method def response_change(self,request,obj) obj is the handler so u can check using obj.field_name and take approp action On Sat, Mar 31, 2012 at 10:34 AM, Nikhil Verma wrote: > Hi > > I understand that but the problem is its a condition wh

Re: How can I best create a blog that works similarly to Tumblr?

2012-03-30 Thread Russell Keith-Magee
On 31/03/2012, at 4:01 AM, Willy wrote: > I know the question is kind of poorly phrased. But here goes, I've been > working on a blog software and I want to have five distinct post types (in > the same way Tumblr does) but I'm having a hard time figuring out how to > create my index view and d