Re: How do I display image in admin list?

2013-04-15 Thread slim
in your model create a function *def admin_photo(self):* *return '' % self.photo.url* *admin_photo.allow_tags = True* then just add it in the display list : *class MymodelAdmin(admin.ModelAdmin):* *list_display = (...,'photo') * *admin.site.register(Mymodel, MymodelAdmin)* L

Re: django search

2013-04-15 Thread slim
add try and catch to your request Le samedi 13 avril 2013 15:59:49 UTC, Harjot Mann a écrit : > > hello friends > > i have made a project on studnt dmc records in django...in which i search > for student' s dmcs using roll number..it works fine > but the problem is that when i am typing a fake r

Django Inspector - Inspects and reports on Django sites

2013-04-15 Thread Daniele Procida
If like me you're responsible for a large and sprawling site, maintained by several dozen users, and you feel you don't know enough about what's going on in it you might find useful. I discovered a few interesting things the first time I ran it, incl

Re: Dynamic Models for CSV Importing

2013-04-15 Thread Max Demars
Hello André, I wonder if you successfuly found a way to achieve what you were talking in this post. Actually, I am looking for something similar. Instead of uploading .csv my app would allow users to upload shapefile. I am reading about dynamic models but the doc is scarce. If you can share a b

Re: django-social-auth problem with facebook

2013-04-15 Thread Brad Pitcher
In my experience, that particular error always means that the database doesn't match what you have in your models. Try a syncdb and/or check your south migrations to make sure your database is up to date. - Brad Pitcher Software Developer (702)723-8255 On Sun, Apr 14, 2013 at 11:01 PM, J

Re: django-social-auth problem with facebook

2013-04-15 Thread Jeff Hsu
Thanks for the reply. I did sync db before I run the code. I am actually on localhost when I test it. Do I have to be online to test it? But, I was successful on authenticating in the Login Dialog. This error happens during the code exchanging process for the access token I think. Thanks, Jef

Re: django-social-auth problem with facebook

2013-04-15 Thread Serdar Dalgic
Hi, On Mon, Apr 15, 2013 at 9:01 AM, Jeff Hsu wrote: > Hi, I just pip installed django-social-auth from omab today on > github(beginner here). I think I can almost get it to work with facebook > login, but I always have this "InternalError: Exception Value: current > transaction is aborted, com

Re: django-social-auth problem with facebook

2013-04-15 Thread Jeff Hsu
Hello Serdar, Thank you so much, I do use postgresql as my database. The problem might be what you listed above, I'll take deep look at it. If I have more questions, I'll post it in that group. Thank you! Jeff On Mon, Apr 15, 2013 at 1:36 AM, Serdar Dalgic wrote: > Hi, > > On Mon, A

Re: How do I display image in admin list?

2013-04-15 Thread Sam Solomon
One small correction, in 'list_display' it should be 'admin_photo' (or I'd probably put 'display_photo' (see #1 below)), not 'photo'. Some other tricks: 1) If you don't want to clog up your Model class, you can put the function in your ModelAdmin class. 2) If you add "readonly_fields = ('displa

Re: How do I display image in admin list?

2013-04-15 Thread Sam Solomon
Oh and I just noticed you added "Also, some images could be blank/None" Instead of 'if obj.id:' you can simply do 'if obj.id and obj.photo:' On Monday, April 15, 2013 10:52:11 AM UTC-7, Sam Solomon wrote: > > One small correction, in 'list_display' it should be 'admin_photo' (or I'd > probably p

"ImportError: No module named django"

2013-04-15 Thread Starboy
Hi all, Totally new to django and just trying to get it installed but I keep getting the "ImportError: No module named django" error. I've searched around quite a bit looking for the answer to my problem but nothing seems to work. I'm running python vers 2.7.2 and have dropped the Django dire

Re: "ImportError: No module named django"

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 12:40 PM, Starboy wrote: > Hi all, > > Totally new to django and just trying to get it installed but I keep getting > the "ImportError: No module named django" error. I've searched around quite > a bit looking for the answer to my problem but nothing seems to work. > > I'm

Re: "ImportError: No module named django"

2013-04-15 Thread Nikolas Stevenson-Molnar
This is likely the cause of the problem. You should always install packages with setup.py (as mentioned by the previous poster). I've found Mac OS X to have lots of "false" site-packages folders. setup.py will make sure it gets to the correct one. Also some packages may have extra installation step

subqueries

2013-04-15 Thread NiL
hi list, I'm willing to implement something exactly like what's described here let's say I have documents and keywords, join by a many to many relation when I display a document detail, I wish to also display other documents that have a maximum of common keyword. detailed use case here

Re: hstore support in postgis backend

2013-04-15 Thread Max Demars
Hi Matt Have you test this hstore branch? Does it combines well the postgis backend with hstore modified postgres backend? Have you found something better so far? Thank you, Max Demars On Wednesday, November 28, 2012 7:08:25 PM UTC-5, Matthew Cooper wrote: > > Hi Reiner > > Thanks for pointin

Re: "ImportError: No module named django"

2013-04-15 Thread Nathan Hall
Yep, I'm on 10.8.3. I tried sudo python setup.py install and it asked for a password. I assumed it was just looking for my system password but that didn't work. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and s

Re: "ImportError: No module named django"

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 2:02 PM, Nathan Hall wrote: > > Yep, I'm on 10.8.3. I tried sudo python setup.py install and it asked for > a password. I assumed it was just looking for my system password but that > didn't work. It's asking for your own password. -- You received this message because yo

Re: "ImportError: No module named django"

2013-04-15 Thread Nathan Hall
I tried my password, it doesn't work. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send emai

Re: "ImportError: No module named django"

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 2:24 PM, Nathan Hall wrote: > I tried my password, it doesn't work. Go to System Preferences, Users and Groups. Is your account an Admin account? If not, you can't sudo. You'll need someone with an admin account to install it for you. But if you don't have an admin account

Re: "ImportError: No module named django"

2013-04-15 Thread Nathan Hall
Yep, I've got admin access, it's my personal machine. Actually, I looked again and it may not have been a password issue, this was the message I received: "python: can't open file 'setup.py': [Errno 2] No such file or directory" On Mon, Apr 15, 2013 at 4:29 PM, Larry Martell wrote: > On Mon, Apr

Re: "ImportError: No module named django"

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 2:34 PM, Nathan Hall wrote: > Yep, I've got admin access, it's my personal machine. > > Actually, I looked again and it may not have been a password issue, this was > the message I received: "python: can't open file 'setup.py': [Errno 2] No > such file or directory" Then y

Re: "ImportError: No module named django"

2013-04-15 Thread Avraham Serour
doesn't pip and virtualenv work on mac? On Mon, Apr 15, 2013 at 11:37 PM, Larry Martell wrote: > On Mon, Apr 15, 2013 at 2:34 PM, Nathan Hall wrote: > > Yep, I've got admin access, it's my personal machine. > > > > Actually, I looked again and it may not have been a password issue, this > was >

Re: "ImportError: No module named django"

2013-04-15 Thread Nathan Hall
I've never used pip or virtualenv. When I did this: tar xzvf Django-1.5.1.tar.gz I got this: tar: Error opening archive: Failed to open 'Django-1.5.1.tar.gz' On Mon, Apr 15, 2013 at 4:40 PM, Avraham Serour wrote: > doesn't pip and virtualenv work on mac? > > > On Mon, Apr 15, 2013 at 11:37 P

Re: "ImportError: No module named django"

2013-04-15 Thread Larry Martell
On Mon, Apr 15, 2013 at 2:47 PM, Nathan Hall wrote: > I've never used pip or virtualenv. > > When I did this: tar xzvf Django-1.5.1.tar.gz > > I got this: > tar: Error opening archive: Failed to open 'Django-1.5.1.tar.gz' Then either you're not in the directory it was downloaded to (typically ~/D

Re: "ImportError: No module named django"

2013-04-15 Thread Nikolas Stevenson-Molnar
Are you in the same directory as Django-1.5.1.tar.gz? _Nik On 4/15/2013 1:47 PM, Nathan Hall wrote: > I've never used pip or virtualenv. > > When I did this: tar xzvf Django-1.5.1.tar.gz > > I got this: > tar: Error opening archive: Failed to open 'Django-1.5.1.tar.gz' > > > > On Mon, Apr 15, 201

Re: django-social-auth problem with facebook

2013-04-15 Thread Jeff Hsu
I solved the problem. The problem is that I set up my project with south. So, I have to use south migration to set up the proper database schema for social_auth. Thanks, Jeff On Mon, Apr 15, 2013 at 10:50 AM, Jeff Hsu wrote: > Hello Serdar, > >Thank you so much, I do use postgresql a

Re: Understanding users auth in Django

2013-04-15 Thread Russell Keith-Magee
On Mon, Apr 15, 2013 at 11:56 AM, Nora Olsen wrote: > > > On Monday, April 15, 2013 8:46:37 AM UTC+8, Russell Keith-Magee wrote: >> >> >>> Should I be using the Admin Site? But the organization admin is really >>> not a super user/staff member of the app. >>> >> >> This question is orthogonal to

Re: How do I display image in admin list?

2013-04-15 Thread frocco
Thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegro

Handling duplicate js/css in forms media with included templates

2013-04-15 Thread Nora Olsen
Hi, I have seen some discussion in this group on how to handle duplicate form.media in template includes. I have the following the following base.html with scripts at the end of the body. I am following h5bp convention: window.jQuery || document.write('