Re: Auth app in separate database

2012-03-28 Thread Amit
While running syncdb command django uses default database to create tables. You can do one thing, first create default database using syncdb then copy auth related tables to another database. Then define router for auth. You can get more ref form django documentatiion. Regards, Amit On Mar 29,

svm python

2012-03-28 Thread dummyman dummyman
Hi, I am looking for svm classifier implementation in python. My input is a set of feature vectors of the form [Feature1,Feature2,[Feature3],Feature4] =>This is for a user so the input is basically a multidimensional list in python I have a set of users . So we have of multidimensional lists.

Re: Django With Tweepy

2012-03-28 Thread Python_Junkie
I believe he means using the Object Relational Model ORM, which is an API abstraction for several frameworks. Whether you use sql or the ORM (you can learn more about the ORM on the django project tutorial) only clouds the issue that you are trying to answer SQL is SQL whether you make an

Cant get spatialite and pysqlite working

2012-03-28 Thread Jak
We have a Django aplication which depends on Spatialite and Pysqlite. It works well for testing under Ubuntu, but when we try to install it on the server, we are getting the following error after installing PySqlite. We did set it up with define=OMIT_SQLITE_LOAD_EXTENSION commented out:

Re: Tweepy Not Displaying

2012-03-28 Thread creecode
Hello coded kid, On Wednesday, March 28, 2012 3:56:12 PM UTC-7, coded kid wrote: > > Template: > > {% for status in status %} > That bit looks like it might cause trouble. You are assigning status to status. Normally you'd want something like... {% for status in statuses %} or {%

Auth app in separate database

2012-03-28 Thread Chris
Has anyone been successful in putting the auth application in a separate database so that users can be shared with different django projects? When I try to put the auth application in a different database I get an error with syncdb: django.db.utils.DatabaseError: relation "auth_permission" does

Re: Http404 and process_exception

2012-03-28 Thread Russell Keith-Magee
On 29/03/2012, at 12:10 AM, Justin Holmes wrote: > Russell, > > Thanks for the reply. > > Two reasons: > > 1) Up until now, I hadn't encountered a 404 that had triggered this > particular process_exception. It hadn't occurred to me that since > get_object_or_404 actually raises the

Re: Django With Tweepy

2012-03-28 Thread coded kid
Thanks guys! @Pachnis How do you mean by Django API queries? On Tuesday, 27 March 2012 08:59:28 UTC+1, coded kid wrote: > > Hi guys, I’m confused on how to make this work. I want to stream > user’s tweets in my django app using tweepy. I’ve written the > streaming code but the problem I’m

strange problem deleting objects

2012-03-28 Thread Marc Aymerich
Hi!, I've overrided the save() method of one of my ModelForms and I'm performing a delete of some related objects depending on some form fields values. The thing is I'm getting differents behaviours dependening on how the deletion is performed, consider: 1) self.instance.delete() 2)

Tweepy Not Displaying

2012-03-28 Thread coded kid
Hi guys, I want to display user’s timeline in my django app but it’s not working. It only display a white blank page! I’m using Tweepy. Below are my codes: Views.py import tweepy def tweetstream(request): consumer_key="" consumer_secret="XXX" access_token="XXX"

Re: Django With Tweepy

2012-03-28 Thread Python_Junkie
Interesting question. I would have to think about your larger question, but the smaller issue, is that you need to close the crsr and you need to commit, I would think that you would not want to make commit automatic, so that your code has a chance to do some error checking and perhaps roll

Re: IntegrityError at /register/ auth_user.username may not be NULL

2012-03-28 Thread laurence Turpin
On Mar 28, 9:38 pm, Daniel Roseman wrote: > On Wednesday, 28 March 2012 20:31:09 UTC+1, laurence Turpin wrote: > > > I'm getting the following error with my registration  section of my > > program. > > > IntegrityError at /register/ > > auth_user.username may not be NULL

Re: IntegrityError at /register/ auth_user.username may not be NULL

2012-03-28 Thread Daniel Roseman
On Wednesday, 28 March 2012 20:31:09 UTC+1, laurence Turpin wrote: > > I'm getting the following error with my registration section of my > program. > > IntegrityError at /register/ > auth_user.username may not be NULL > > I am using django 1.3.1 and python 2.7.2 and I'm using sqlite3 as the

IntegrityError at /register/ auth_user.username may not be NULL

2012-03-28 Thread laurence Turpin
I'm getting the following error with my registration section of my program. IntegrityError at /register/ auth_user.username may not be NULL I am using django 1.3.1 and python 2.7.2 and I'm using sqlite3 as the database. I am a newbie and I'm learning Djanogo from the book "Learning website

Re: Django With Tweepy

2012-03-28 Thread Konstantinos Pachnis
Hi, You could use celery (http://celeryproject.org/) and create a task (with your code) to run periodically. Oh, one more thing. I don't really understand why you don't use the Django API for your queries. Cheers, Konstantinos > coded kid > March 27, 2012 10:59

Re: Hosting tutorials

2012-03-28 Thread yati sagade
Hi I you just want to share your apps with the world, you do not need to pay for a complete server setup. I have been using OpenShift( https://openshift.redhat.com/app/) for long now, and it's quite easy to get up and running. Others are[not tried, but heard are great] Heroku(

Re: Hosting tutorials

2012-03-28 Thread NENAD CIKIC
Hi, i am also new to django. I have put alive my first django project on linode VPS. First I have created on my development machine the virtual box with last ubuntu. Then I have put alive the django project following instruction on https://code.djangoproject.com/wiki/DjangoAndNginx i.e. I have

django.contrib.auth.views.login no response

2012-03-28 Thread jondbaker
I'm trying to build a login form by following the instructions on this page https://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.views.login. The form is rendered in the template with a username and password field, but the hidden "next" field has no value, the form does not

Hosting tutorials

2012-03-28 Thread Jak
Hello All, I am new to programming, and I have spent the year learning HTML, CSS, Python, and now Django. I can build a basic dynamic site on the development server, but I have no idea how to share this site with the world. The Django deployment section in the Django book is difficult to

Re: Http404 and process_exception

2012-03-28 Thread Justin Holmes
Russell, Thanks for the reply. Two reasons: 1) Up until now, I hadn't encountered a 404 that had triggered this particular process_exception. It hadn't occurred to me that since get_object_or_404 actually raises the Http404 exception that the behavior was going to be different than, say, a try

Re: Sending data to the server

2012-03-28 Thread drk
It works if you apply the filer 'escapejs'. Thanks anyway. On 26 Mar, 16:29, drk wrote: > Just to rephrase it, I'm setting the data through a variable in a django > template, maybe that's not the best way to do it, I guess. > > Segunda-feira, 26 de Março de 2012

comparing custom template tag within if tag

2012-03-28 Thread Nikhil Verma
Hi all i have a custom template tag that takes some argument and calculates the result. I want to compare that value obtained from that custom tag with another variable. Custom template tag {% price_for_pax service pax '' %} variable : {{service.price}} What i want is {% if service.price ==

Re: TestCase Client.login() fails

2012-03-28 Thread jondbaker
Thanks for all the responses. I actually solved the problem about 15 minutes after posting this question and indicated so in the first reply. Perhaps that reply did not go out in time? Anyway, thanks for the help! On Wednesday, March 28, 2012 1:28:56 AM UTC-6, rudyryk wrote: > > Hello,

Re: Need help creating model.

2012-03-28 Thread Psamathos
I would create a many-to-many relationship between Student and Class through a custom intermediate model called Grade. You can then add a date field to Grade and any other extra fields you want. Read up on m2m relationships here:

Re: Bug in BaseForm?

2012-03-28 Thread Marcin Tustin
Ah, no I hadn't, which is the problem here. Thanks for your help! On Wed, Mar 28, 2012 at 15:51, Xavier Ordoquy wrote: > Hi, > > Have you called is_valid() on the form before that ? > > Regards, > Xavier Ordoquy, > Linovia. > > Le 28 mars 2012 à 15:57, Marcin a écrit : > >

Re: Bug in BaseForm?

2012-03-28 Thread Xavier Ordoquy
Hi, Have you called is_valid() on the form before that ? Regards, Xavier Ordoquy, Linovia. Le 28 mars 2012 à 15:57, Marcin a écrit : > Consider the following stack trace (all relevant code is shown in the stack > trace): > > In [3]: f.clean() >

Re: Bug in BaseForm?

2012-03-28 Thread Marcin Tustin
It has been pointed out to me that this error does not occur if one calls is_valid(). On Wed, Mar 28, 2012 at 14:57, Marcin wrote: > Consider the following stack trace (all relevant code is shown in the > stack trace): > > In [3]: f.clean() >

Bug in BaseForm?

2012-03-28 Thread Marcin
Consider the following stack trace (all relevant code is shown in the stack trace): In [3]: f.clean() --- AttributeErrorTraceback (most recent call last)

Re: Looking for a developer who knows Django well

2012-03-28 Thread kenneth gonsalves
On Tue, 2012-03-27 at 05:53 -0700, Daniel Roseman wrote: > On Tuesday, 27 March 2012 12:34:46 UTC+1, MSSONI wrote: > > > > I have just started a company. The company is yet to be registered. > We > > have launched our product www.instashare.me. Our alpha has just > > launched. We are looking for

BitNami Django Stack with Django 1.4.0

2012-03-28 Thread victoria
Hi, I just wanted to let you know that BitNami installers, virtual machines and AMIs for Django 1.4.0 are already available. http://bitnami.org/stack/djangostack I hope you enjoy it and I'd love to hear ther comments and suggestions that you may have. Cheers, Victoria. -- You received this

Re: TestCase Client.login() fails

2012-03-28 Thread Reinout van Rees
On 28-03-12 11:17, Alexey Kinyov wrote: Yes: You have to call user.save() after creating it. Otherwise the user > object exists, but it isn't saved to the database yet. That' wrong. Documentation says: create_user(username, email=None, password=None) Creates, saves and returns

Re: TestCase Client.login() fails

2012-03-28 Thread Alexey Kinyov
Hello, Reinout! > Yes: You have to call user.save() after creating it. Otherwise the user > object exists, but it isn't saved to the database yet. That' wrong. Documentation says: create_user(username, email=None, password=None) Creates, saves and returns a User.

Re: TestCase Client.login() fails

2012-03-28 Thread Alexey Kinyov
Hello, Jonathan! I think issue is in the fragment 'password=user.password' in the line: >         response = self.client.login(username=user.username, > password=user.password) 'user.password' - is not plain text password, it's encrypted and it's not equal 't3stp@s$' ! Alexey rudyryk /// On

Re: IE9+Django,Don't respond or Socket error!!!

2012-03-28 Thread Andre Terra
On Mon, Mar 26, 2012 at 11:31 PM, br wrote: > 2) If you want to use the runserver that comes with django: > - to run runserver, use "manage.py runserver 0.0.0.0:8000" instead of > the default (which goes to localhost or 127.0.0.1) , and then figure > out your computer's IP

DjangoCon Europe Early Bird registration

2012-03-28 Thread Daniele Procida
Just a reminder - you only have a couple of days left to register at the Early Bird rate. Also, I challenge you to find cooler accommodation in Zürich than I have: Daniele -- You received this message because you are subscribed to

Re: TestCase Client.login() fails

2012-03-28 Thread jondbaker
Problem solved. I forgot that .create_user will create and return a hashed password, which obviously won't work if said returned object password property is entered into the password field of the login form. On Wednesday, March 28, 2012 12:05:49 AM UTC-6, jondbaker wrote: > > I'm trying to

Re: Looking for a developer who knows Django well

2012-03-28 Thread MSSONI
I am extremely sorry. This is a startup in Pune, India. We are looking for a Django developer in Pune itself. We are willing to pay 15-22k rupees per month. If anybody is interested please contact me on 00919922455685. Regards, Mayuresh S Soni On Mar 27, 5:53 pm, Daniel Roseman

Re: TestCase Client.login() fails

2012-03-28 Thread Reinout van Rees
On 28-03-12 08:05, jondbaker wrote: def test_login(self): user = User.objects.create_user('test', 't...@test.com', 't3stp@s$') response = self.client.login(username=user.username, password=user.password) self.assertTrue(response) After creating the user, I can verify that

Re: De-serialization of ManyToManyField

2012-03-28 Thread sk
Hi, I finally worked out where the problem was! I am posting the answer in case that someone else has a similar issue and stumbles upon this. So I have reverted to the original model, as defined in the first email here. The problem was with my definition of the natural keys, my function was not

Re: Need help creating model.

2012-03-28 Thread jondbaker
I think the Foreign Key route is the way to go. After setting up the fields on both the Student and Point models and establishing the FK relationship between the two, you could write a table-level method that returned the number of corresponding Points. On Tuesday, March 27, 2012 7:18:12 PM

TestCase Client.login() fails

2012-03-28 Thread jondbaker
I'm trying to write a unit test that will verify that the login form authenticates a user. Whenever I run 'manage.py test' the runner fails with this message: *AssertionError: False is not True* *tests.py* from django.test import TestCase from django.test.client import Client from