Problem with order_by on one record only

2012-06-15 Thread Alex Umrysh
I'm having a strange error on an object query when I try to do negative order_by. This is on an Oracle 11 database with Django 1.4 it looks something like: MyModel.objects.filter(pk=N).order_by('-datetime')[:5] This gives me valid data for all values of N in the database except for one

Re: How to setup Python 2.7 and Virtualenv on a shared host with no root access?

2012-06-15 Thread Kurtis Mullins
Honestly, if your host doesn't provide those services out of the box -- you might have better luck going with a different hosting provider. I would choose a cheap VPS or Cloud Server if I were you. On Fri, Jun 15, 2012 at 4:18 PM, Dan Santos wrote: > Hi darwin, > > Sorry

Re: How to setup Python 2.7 and Virtualenv on a shared host with no root access?

2012-06-15 Thread Dan Santos
Hi darwin, Sorry for the late reply. Thanks for your new instructions. I'm currently stuck at step 1 because my wehost hasn't included important commands and packages such as: * uname * make * gcc (package) So I will try to discuss with my webhost this week to see if they can enable those

Re: dropping ForeignKey not reflected in admin

2012-06-15 Thread Larry Martell
On Fri, Jun 15, 2012 at 1:13 PM, vikalp sahni wrote: > strange, I hope you are checking the right model and right admin. > > Can you check you have traces for that field on your admin.py Turns out there are 2 tables with very similar names, and I was looking at the admin

Re: dropping ForeignKey not reflected in admin

2012-06-15 Thread vikalp sahni
strange, I hope you are checking the right model and right admin. Can you check you have traces for that field on your admin.py Regards, //Vikalp On Fri, Jun 15, 2012 at 11:37 PM, Larry Martell wrote: > I have a table that had a ForeignKey reference. In the admin

Re: Any clue why Facebook iframe would be blank?

2012-06-15 Thread Kurtis Mullins
Haha, no problem! Yep, it's in there (like you saw). I opened up a Stackoverflow post with the question here: http://facebook.stackoverflow.com/questions/11056283/iframe-showing-up-blank On Fri, Jun 15, 2012 at 1:58 PM, Rafał Stożek wrote: > Sorry, I didn't read the code. > >

dropping ForeignKey not reflected in admin

2012-06-15 Thread Larry Martell
I have a table that had a ForeignKey reference. In the admin screen for adding to this table there was a dropdown for that column. I want to get rid of that ForeignKey. I changed models.py and removed the ForeignKey column, bounced apache and altered the table and removed that column. In the admin

Re: Any clue why Facebook iframe would be blank?

2012-06-15 Thread Rafał Stożek
Sorry, I didn't read the code. On Friday, June 15, 2012 6:56:56 PM UTC+1, Rafał Stożek wrote: > > Does this view accept POST requests? Because facebook uses POST to send > you some data in signed_request param. > > On Friday, June 15, 2012 6:40:25 PM UTC+1, Kurtis wrote: >> >> I've created a

Re: Any clue why Facebook iframe would be blank?

2012-06-15 Thread Rafał Stożek
Does this view accept POST requests? Because facebook uses POST to send you some data in signed_request param. On Friday, June 15, 2012 6:40:25 PM UTC+1, Kurtis wrote: > > I've created a very simple page. It pretty much just dumps out some html > with the text "Hello, Facebook". This view can

Progromatically creating Images using Django-Cumulus?

2012-06-15 Thread Kurtis Mullins
Hey guys/girls, I've ran into a problem which I'm not quite sure how to tackle. We use Django-cumulus for handling our user's media. I need to programatically create an image and save it as a ImageField. I want to avoid any "hackish" ways of doing it and try to keep it consistent with the way

DjangoCon US CfP Closes Tomorrow

2012-06-15 Thread Sean O'Connor
Hey Everybody, Just a quick heads up that the call for talk and tutorial proposals for DjangoCon US 2012 closes tomorrow. You can find all of the details on this year's conference along with the form to submit a proposal at http://www.djangocon.us/. If you have any questions or feedback

Re: How postgres data type "real" is represented in Django?

2012-06-15 Thread IgorS
Thanks a lot, Anssi! This is very helpful. Just in case someone else is interested in "Writing custom model fields", here is a link to Django's docs: https://docs.djangoproject.com/en/dev/howto/custom-model-fields/ Thank you once again, -igor On Thursday, 14 June 2012 05:18:40 UTC-4,

Re: trailing slash defeats get_absolute_url

2012-06-15 Thread Mike Dewhirst
Thanks Bruno. I haven't looked closely at that yet. I'll see if i can do some reading this weekend. Cheers Mike Connected by MOTOBLUR™ -Original message- From: bruno desthuilliers To: django-users@googlegroups.com Sent: Fri, 15 Jun 2012, 18:48:24 AEST

Re: trailing slash defeats get_absolute_url

2012-06-15 Thread bruno desthuilliers
On Friday, June 15, 2012 9:42:33 AM UTC+2, Mike Dewhirst wrote: > > On 15/06/2012 5:11pm, bruno desthuilliers wrote: > > You have to end your url patterns with a slash, ie r'^search/'. > > Ok. I added a trailing slash to the get_absolute_url method like so ... > return 'xitem/%s/' % self.id

How to rework list of items (model instances page) in AdminSite?

2012-06-15 Thread Dominis
Hello. I try to make a simple structured model of data (categories for articles instances) and now cant find right way to reorder/rebuild list of elements, which rendering in admin site. Explain: It's easy to switch ordering by 'ordering = ['field_name']', but it's just an order. I need to

Re: trailing slash defeats get_absolute_url

2012-06-15 Thread Mike Dewhirst
On 15/06/2012 5:11pm, bruno desthuilliers wrote: You have to end your url patterns with a slash, ie r'^search/'. Ok. I added a trailing slash to the get_absolute_url method like so ... return 'xitem/%s/' % self.id ... and added an extra url pattern ... urlpatterns = patterns('item.views',

trailing slash defeats get_absolute_url

2012-06-15 Thread bruno desthuilliers
You have to end your url patterns with a slash, ie r'^search/'. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/JAbME4x4ZusJ. To post to this group, send

trailing slash defeats get_absolute_url

2012-06-15 Thread bruno desthuilliers
You have to end your url patterns with a slash, ie r'^search/'. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/iks8SsEo2v4J. To post to this group, send

Re: from future url -- argh

2012-06-15 Thread Benedict Verheyen
On 15/06/2012 1:55, Andre Terra wrote: > Ah, here it is: > > https://docs.djangoproject.com/en/dev/internals/deprecation/#id2 > > > Cheers, > AT Indeed, the first argument in the url tag used to be an implied string. In Django 1.5 it isn't anymore, so if the first argument to the url tag is

Re: How I use Django, Virtualenv and Buildout together

2012-06-15 Thread Benedict Verheyen
On 14/06/2012 15:53, Andrew Bialecki wrote: > Hey everyone, > > I wrote a quick blog post on how I use Django with virtualenv and Buildout. > Hope it's helpful: > http://www.sophomoredev.com/2012/06/how-i-use-django-virtualenv-and-buildout-together/. > Nice article. However, I do concur with

Re: 'ascii' codec can't encode character u'\xe4' [solved]

2012-06-15 Thread kenneth gonsalves
On Thu, 2012-06-14 at 08:26 -0700, bruno desthuilliers wrote: > > apache + wsgi > > > > > Ok, so that's the same setup we use... Are you/they using the > WSGIDaemonProcess and WSGIProcessGroup directives ? (I bet they do if > it's > shared hosting and they know what's good for them). yes >