Up-to-date Pinax social network?

2013-03-22 Thread Christos Jonathan Hayward
I look at http://pinaxproject.com/ and see lots of Legos I could use to build a social network. Is there a current pre-built or HOWTO social network project that I could use to get a Pinax social network up and running in two hours or less, including stupid user mistakes on my part? I have a Pinax

models.DecimalField causing weird Attribute/Type errors

2013-03-22 Thread Tomas Pelka
Hi all I'm trying to make one of my first apps running but always getting weird errors Attribute/Type for models.DecimalField as well as for DateField. In case I want to store anything into sqlitedb I always get: TypeError: 'datetime.datetime' object is unsubscriptable, same for Decimal/int F

DB Weirdness

2013-03-22 Thread Tim Cook
HI All, Sorry I couldn't think of a better subject. :-) I am fairly new to Django. I have done most of the tutorial and started reading Two Scoops of Django (TSD). Of course being impatient I also started my project, in parallel. Danny made a good point in TSD about using the same database in

Are Generic Views limited to querysets that are fixed for any one view?

2013-03-22 Thread Doug S
I'm new to using generic views and the genericness is obviously powerful, but I'm wondering how far it goes. If I have a model and want to display it as a list, I can use a generic view and even specify the query set it displays for a given view, but what if I want to constrain the query set thro

Re: Are Generic Views limited to querysets that are fixed for any one view?

2013-03-22 Thread Doug S
Sorry, I guess I should have looked a bit harder before posting this question, I've figured it out. Hopefully this will be of help to someone else. the discussion here: http://stackoverflow.com/questions/8925434/django-class-based-generic-views-url-variable-passing answers my question. The URL par

Re: How to get ten random records

2013-03-22 Thread Peter of the Norse
Don’t listen to him. .order_by('?') is the right thing. If you’re not sure, install django-debug-toolbar. You’ll see that you get "ORDER BY random()". Also, while .get() will throw an exception if the QuerySet is empty, nothing else will. On Mar 18, 2013, at 10:46 PM, Mike Dewhirst wrote: > O

Re: DB Weirdness

2013-03-22 Thread Russell Keith-Magee
On Fri, Mar 22, 2013 at 7:46 PM, Tim Cook wrote: > HI All, > > Sorry I couldn't think of a better subject. :-) > > I am fairly new to Django. I have done most of the tutorial and > started reading Two Scoops of Django (TSD). > > Of course being impatient I also started my project, in parallel.

Re: Python problem

2013-03-22 Thread Bill Freeman
What O/S? What version of python? Can you get to python's prompt by just typing python at a command prompt? If so, is the version that it printed when it started the version that you expected? How about an actual cut and paste of the error that you are seeing? Bill On Thu, Mar 21, 2013 at 9:3

Re: Automated Django benchmarking with New Relic

2013-03-22 Thread Bill Freeman
What people do all the time is edit their settings file on their deployed box and simple restart django (say by touching the wsgi script, or restarting apache or nginx or whatever). On Thu, Mar 21, 2013 at 9:47 PM, Alan Johnson wrote: > I've got a Django web app with a complicated data model tha

Re: Im having trouble accessing irc.freenode.net

2013-03-22 Thread Bill Freeman
Do you have an IRC client, such as the chatzilla plug in for firefox? Your screenshot is unreadable to me, but if you're just going to irc.freenode.netin your browser, it's not likely to work, since HTTP and IRC are different protocols. On Fri, Mar 22, 2013 at 1:19 AM, Lightning wrote: > 'Where

field lookups problem

2013-03-22 Thread Roberto López López
Hi, I have a problem with my data model while doing field lookups. This is my models.py: from django.db import models, IntegrityError # Create your models here. class Model1(models.Model): title = models.CharField(max_length=15) models2 = models.ManyToManyField('Model2', through='Thro

Re: DB Weirdness

2013-03-22 Thread Tim Cook
Thanks for the reply, Russell. Responses inline: On Fri, Mar 22, 2013 at 10:10 AM, Russell Keith-Magee wrote: > However, I'm guessing that this *isn't* the name of the database that you've > got Django configured to use. If you're following the tutorial (and > following the same lessons for your

Re: Conditionally defined model field in abstract model

2013-03-22 Thread Bill Freeman
Wouldn't it be simpler to have two abstract classes, one, not having the field, and the other being a sub class of the first, and just adding the field? On Thu, Mar 21, 2013 at 5:05 PM, Alan Johnson wrote: > I've got an abstract model in my project that I want to use to define a > field by defau

Re: Django split setting and environment variables

2013-03-22 Thread Bill Freeman
Good point. Personally, I agree about keeping credentials out of version control, but I have had an employer who disagrees. Of course that's only suitable for a completely private repository. On Thu, Mar 21, 2013 at 4:58 PM, Alan Johnson wrote: > I think hardcoding local machine development pa

Re: Inspecting form errors in a view

2013-03-22 Thread Rainy
On Thursday, March 21, 2013 9:47:03 PM UTC-4, Aubrey Stark-Toller wrote: > > On Thu, Mar 21, 2013 at 03:40:39PM -0700, Rainy wrote: > > I believe you can just set self.my_flag = foo in clean method and then > > check for > > > Cheers for the reply. > > I suspect my original mail could have cl

Up-to-date Pinax Social Network *working*?

2013-03-22 Thread Christos Jonathan Hayward
I'vd found pinax-social-project but it's bleeding; it doesn't offer even a styled page, just a page that fails to load CSS and JavaScripts and comes out POSH bare as bare can be. I've put a tarball of my current version at http://JonathansCorner.com/project/stornge.tgz, was wondering if you could

Using HP Vertica: Cannot insert into or update IDENTITY/AUTO_INCREMENT column

2013-03-22 Thread Stan Hu
I'm been trying to get HP Vertica Community Edition working with Django by updating the django-vertica package. For the most part, it is working. Upon doing a manage.py syncdb, I enabled SQL debugging and get this error message: DEBUG (0.002) INSERT IN

Re: field lookups problem

2013-03-22 Thread akaariai
On 22 maalis, 15:44, Roberto López López wrote: > Hi, > > I have a problem with my data model while doing field lookups. This is > my models.py: > > from django.db import models, IntegrityError > > # Create your models here. > > class Model1(models.Model): >     title = models.CharField(max_length

Re: Django on Mediatemple DV (4.0) in Virtualenv

2013-03-22 Thread Tim Walzer
I have both mod_rewrite and mod_proxy available to me. Also, the server is running nginx which seems to be the preferred way of running gunicorn, but I am having trouble getting the nginx config to play nice. Would you be able to provide a sample of your reverse proxy config and maybe that wil

Re: Django on Mediatemple DV (4.0) in Virtualenv

2013-03-22 Thread Bill Freeman
The ones I've done were for a previous employer, so I don't have access, so the stuff below is from memory and untested, but here's a relevant documentation reference: http://httpd.apache.org/docs/current/rewrite/flags.html#flag_p See particularly the performance warning and maybe learn to use Pr

POSTing JSON to Tastypie from Android

2013-03-22 Thread Pratik Mandrekar
Hello, I'm unable to get the POST json to tastypie from an android http client to work. *I have tried with HttpURLConnection* urlConnection = (HttpURLConnection) url.openConnection(); urlConnection.setDoInput(true); urlConnection.setDoOutput(true); urlConnection.setRequestProperty("Content-

Re: POSTing JSON to Tastypie from Android

2013-03-22 Thread Bill Freeman
Have you tried a breakpoint in the view? Might it be a CSRF problem? On Fri, Mar 22, 2013 at 2:22 PM, Pratik Mandrekar wrote: > Hello, > > I'm unable to get the POST json to tastypie from an android http client to > work. > > *I have tried with HttpURLConnection* > > urlConnection = (HttpURLCon

Python path in new 1.4 project structure?

2013-03-22 Thread Carsten Fuchs
Hi all, I'm currently migrating my Django project that was still in the "old" project layout to the new default project layout as shown at My WSGI file was written as described at

RuntimeError: maximum recursion depth exceeded in cmp

2013-03-22 Thread tarik setia
I was following the very first tutorial on django website. When i started the server i got an error "RuntimeError: maximum recursion depth exceeded in cmp" as shown in image Please help. --

As posted on StackOverflow

2013-03-22 Thread Christos Jonathan Hayward
After a day or so of losing at trying to make pinax-social-network 1.0 have the merits of Pinax social-project 0.5 or .7, I'd like to ask how to cut with the grain instead of against it. The earlier version came as a fully functional site: you could override and customize if you want, but it came

Re: Python path in new 1.4 project structure?

2013-03-22 Thread Bill Freeman
!!! PONTIFICATION ALERT !!! Don't do that. I believe that it has always been a goal of project structure that the directories on the python path be either in the default python places (/something/something/lib/python2.X/site-packages/ unless you're using a Debian provided python) or in a directo

Re: field lookups problem

2013-03-22 Thread Roberto López López
Hi Anssi, thanks for your answer. I already thought about that, but checking the code from django.db.models.base.Model#__eq__() is not telling me the same: def __eq__(self, other): return isinstance(other, self.__class__) and self._get_pk_val() == other._get_pk_val() On 03/22/2013

Andrew Godwin to add native migrations to Django's core

2013-03-22 Thread Shawn Milochik
http://www.kickstarter.com/projects/andrewgodwin/schema-migrations-for-django I've been using South for a long time and have met Andrew a few times. He's a genuinely nice guy and has put years of free work into open-source software. I encourage anyone who appreciates his work to throw in a few po

[django-users] Error when registering a new user - Django 1.5

2013-03-22 Thread Leonardo S
Hi, I am getting an error when registering a new user in a Django 1.5 app. It is the postgres' log: *BRT ERROR: relation "auth_user" does not exist at character 280* *BRT COMMAND: SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user".

Re: Im having trouble accessing irc.freenode.net

2013-03-22 Thread hugh Manchu
geez Im not sure if I have an IRC Client.. its absense would explain this ... thanks alot Bill will look into this. will let you know as soo as I can Hugh On Fri, Mar 22, 2013 at 6:40 AM, Bill Freeman wrote: > Do you have an IRC client, such as the chatzilla plug in for firefox? > Your screens

Re: [django-users] Error when registering a new user - Django 1.5

2013-03-22 Thread Leonardo S
I did it and aparently it worked: *# forms.py* *class UserCreateForm(UserCreationForm):* * * * def clean_username(self): username = self.cleaned_data["username"] try: self._meta.model._default_manager.get(username=username) except self._meta.model.DoesNotExi