Tutorial issue with admin

2012-04-10 Thread oneroler
I'm working on the tutorial and ran across an issue that I can't figure out. In the admin site in "Select Polls to Change" instead of displaying the question associated with the poll (e.g. "What's up") it displays "poll object" for all polls. I've attached a screen shot of the issue. Below

Re: Force logout a user in signed cookie mode

2012-04-10 Thread Cherian Thomas
Hi, all Can someone help? - Cherian On Tue, Apr 10, 2012 at 11:51 AM, Cherian wrote: > Hi all, > > In the signed cookie mode is it possible for me force logout an > account? > Say I login from two places, and I need to logout my account from the > one access I forgot to

Can't create a test suite for a Django app

2012-04-10 Thread Michael Parker
Hi all, I'm having trouble creating a test suite in Django 1.3. Say I have an installed app in a directory called app_name. One of the files in that directory is foo.py which defines a class named Foo. I want to test that, so I also have a file that directory called foo_test.py which defines a

Re: Is it a good practice to delegate views based on GET / POST?

2012-04-10 Thread andrea mucci
hi this is something personal choice i prefer to check GET and POST directly from the view method, but in some case is useful to part the GET and the POST view for readable and clean coding El 11/04/2012, a las 01:21, John Yeukhon Wong escribió: > 3/4 down the page >

Is it a good practice to delegate views based on GET / POST?

2012-04-10 Thread John Yeukhon Wong
3/4 down the page http://www.djangobook.com/en/2.0/chapter08/ urlpatterns = patterns('', # ... (r'^somepage/$', views.method_splitter, {'GET': views.some_page_get, 'POST': views.some_page_post}), # ... ) Is this a good practice at all? If I use the method splitter, my urls will look ugly. Or

Re: Template inheritance and passing variables

2012-04-10 Thread andrea mucci
Hi in django documentation https://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs Note The include tag should be considered as an implementation of "render this subtemplate and include the HTML", not as "parse this subtemplate and include its contents as if it were part of

Template inheritance and passing variables

2012-04-10 Thread bnkwsk
Hi, while writing my first website in Django I ran into troubles with passing variables in my inherited templates. Let me describe my templates' structure. I have a base template for all applications' templates which includes some parts - just to divide the code into smaller parts. My goal is to

Re: Django tutorial

2012-04-10 Thread andrea mucci
a good solution could be: SITE_ROOT = os.path.realpath(os.path.dirname(__file__)) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'NAME': os.path.join(SITE_ROOT,'sqlite.db'),

Re: Django tutorial

2012-04-10 Thread william ratcliff
If mysite is a directory, rather than a file, then Daniel is correct. On Apr 10, 2012 5:33 PM, "andrea mucci" wrote: > hi Ed > > you have configured the DB with the sqlite3 driver and you point the NAME > db to a mysql folder. > you need to put the folder for your sqlite

Re: Django tutorial

2012-04-10 Thread william ratcliff
Can you try creating a file in that directory at the top of your settings.py file? On Apr 10, 2012 5:15 PM, "Ed McLaughlin" wrote: > DATABASES = { >'default': { >'ENGINE': 'django.db.backends.sqlite3', # Add > 'postgresql_psycopg2', 'mysql', 'sqlite3' or

Re: [JOB] Urgent - PHP/Python Developer needed

2012-04-10 Thread Cal Leeming [Simplicity Media Ltd]
On Tue, Apr 10, 2012 at 10:26 PM, andrea mucci wrote: > hi cal > > ok, > so, you can re-write your offer asking for a junior dev, inexperienced or > less experienced and for example, if your customer offer courses, > certifications or something like this. > this make sense

Re: Django tutorial

2012-04-10 Thread andrea mucci
hi Ed you have configured the DB with the sqlite3 driver and you point the NAME db to a mysql folder. you need to put the folder for your sqlite database. cheers, El 10/04/2012, a las 23:15, Ed McLaughlin escribió: > DATABASES = { >'default': { >'ENGINE':

Re: Django tutorial

2012-04-10 Thread Daniel Roseman
On Tuesday, 10 April 2012 22:15:40 UTC+1, Ed McLaughlin wrote: > > DATABASES = { > 'default': { > 'ENGINE': 'django.db.backends.sqlite3', # Add > 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. > 'NAME': '/usr/local/mysql/data/mysite', # > Or

Re: [JOB] Urgent - PHP/Python Developer needed

2012-04-10 Thread andrea mucci
hi cal ok, so, you can re-write your offer asking for a junior dev, inexperienced or less experienced and for example, if your customer offer courses, certifications or something like this. this make sense and you will get more resumes and better answers. i restructure my last sentence >

Re: [JOB] Urgent - PHP/Python Developer needed

2012-04-10 Thread Cal Leeming [Simplicity Media Ltd]
On Tue, Apr 10, 2012 at 10:12 PM, andrea mucci wrote: > hi Cal > > Our solutions are high volume (peaking at around 5000 requests/minute), > with extremely large databases (400 million+ rows) and large content > servers (15TB+ of media files). > > > If you put in the hands

Re: Django tutorial

2012-04-10 Thread Ed McLaughlin
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': '/usr/local/mysql/data/mysite', # Or path to database file if using sqlite3. 'USER': '', #

Re: [JOB] Urgent - PHP/Python Developer needed

2012-04-10 Thread andrea mucci
hi Cal > Our solutions are high volume (peaking at around 5000 requests/minute), with > extremely large databases (400 million+ rows) and large content servers > (15TB+ of media files). If you put in the hands of a junior dev this, your customer has to pay more for damages over wage offered

Re: [JOB] Urgent - PHP/Python Developer needed

2012-04-10 Thread Marcin Tustin
I must say I'm surprised - the last time I had a job that paid at that level was my very first tech job, straight after A-levels. You don't need to apologise or explain to us - my post was more to observe that this doesn't seem like something that will get you CVs urgently. On Tue, Apr 10, 2012

Re: [JOB] Urgent - PHP/Python Developer needed

2012-04-10 Thread Cal Leeming [Simplicity Media Ltd]
Thanks for the feedback. Problem is - we do already have other full time developers on at 2000$/month (albeit for 130 hours, not 150), all of them with a varying skill set across both languages - and our clients also have in-house developers at roughly this same budget as well (both US and UK).

Re: [JOB] Urgent - PHP/Python Developer needed

2012-04-10 Thread Christophe Pettus
On Apr 10, 2012, at 1:31 PM, Cal Leeming [Simplicity Media Ltd] wrote: > * MUST be able to work 30+ hours a week. > [...] > The position is full time, offering around $2000/month (roughly £1200/month) > for the right candidate - price/hours are negotiable. Just to be clear, assuming that the

Re: Urgent - PHP/Python Developer needed

2012-04-10 Thread waax
I'd like to +1 Marcin Tustin post. Good luck with your search for right candidate. Monthly salary you are giving for such a skill-set is roughly, ridiculously small with best intentions. Regards, Nevio On Apr 10, 10:34 pm, Marcin Tustin wrote: > You're urgently seeking

Re: [JOB] Urgent - PHP/Python Developer needed

2012-04-10 Thread Marcin Tustin
You're urgently seeking a developer who will work fluently in two different (server side) languages, and you're offering 14400 pounds? I wish you luck. On Tue, Apr 10, 2012 at 21:31, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Hi all, > > Another urgent

Re: [JOB] Urgent - PHP/Python Developer needed

2012-04-10 Thread Cal Leeming [Simplicity Media Ltd]
Sorry, small mistake on the posting, Django should have obviously been under essential skills! Cal On Tue, Apr 10, 2012 at 9:31 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Hi all, > > Another urgent position has come up in our company, applicant needs

[JOB] Urgent - PHP/Python Developer needed

2012-04-10 Thread Cal Leeming [Simplicity Media Ltd]
Hi all, Another urgent position has come up in our company, applicant needs to have some experience with using Django but must also be comfortable with PHP (our clients are a 50/50 split between PHP and Django). -- Simplicity Media Ltd are an established UK company providing bespoke IT

Re: Django for Enterprise

2012-04-10 Thread Gabriel Gunderson
On Tue, Apr 10, 2012 at 1:50 PM, Ivo Marcelo Leonardi Zaniolo wrote: > Does anybody already worked on a really hudge project? > A really hudge. Perhaps you've heard of Instagram. You know, the scrappy little Django shop that just sold to Facebook for 1 *billion* dollars.

Re: Django for Enterprise

2012-04-10 Thread andrea mucci
hi ivo maybe this is a problem for a tons of projects. but you can solve putting your job request to: http://www.python.org/community/jobs/ offer a good salary ( if you want a ferrari you need to pay for that ) or, ask to this comity if have some experienced dev that want to work for you (

How to deal with multiple foreign keys in child tables

2012-04-10 Thread Carlos Quiros
Hi, I am new to DJango. I have a database with three tables: -CRP - SubComponents of a CRP - Objectives of a SubComponent of a CRP. For this tables I created the following models: -Model

Re: Django for Enterprise

2012-04-10 Thread Ivo Marcelo Leonardi Zaniolo
Tanks Andrea. Maybe my biggest problem is to find good developers. Att Ivo Marcelo Leonardi Zaniolo Sent from mobile On Apr 10, 2012 5:11 PM, "andrea mucci" wrote: > hi ivo > > the problem is not if Django is a good framework for huge project, but if > you or your devs

Re: Django for Enterprise

2012-04-10 Thread andrea mucci
hi ivo the problem is not if Django is a good framework for huge project, but if you or your devs have experience to design and maintain some "big" projects. with python and django have a lot of projects with huge traffic or huge database design, so i think is possible to create something very

Django for Enterprise

2012-04-10 Thread Ivo Marcelo Leonardi Zaniolo
Hi there, a got those questions annoying me... Is django ready to a hudge enterprise project? I'm not talking of a website, it's more like an Erp. Does anybody already worked on a really hudge project? A really hudge. Here in Brazil we have few python or django experts. Here in our local

Django 1.4: No wrapping of exceptions in TEMPLATE_DEBUG mode

2012-04-10 Thread h3
>From the doc: > In previous versions of Django, whenever the TEMPLATE_DEBUG setting was True, > any exception raised during template rendering (even exceptions unrelated to > template syntax) were wrapped in TemplateSyntaxError and re-raised. This was > done in order to provide detailed

Re: Hosting Django website

2012-04-10 Thread KasunLak
Thank you very much to all of you, this stuff helps me. :) On Apr 10, 4:25 pm, Tom Evans wrote: > On Sun, Apr 8, 2012 at 2:59 PM,KasunLak wrote: > > Hi all, > > > I have created a website using django. I want to host it now. Can you > >

Re: Migrating a database from Django 1.1/postgress to 1.3/MySQL

2012-04-10 Thread Marcin Tustin
syncdb has probably already created your content types. I strongly suggest that you use the option --exclude contenttypes (and any other app that is likely to create its own data during sync/migration). On Tue, Apr 10, 2012 at 17:59, Roy Smith wrote: > I've got an old site

Migrating a database from Django 1.1/postgress to 1.3/MySQL

2012-04-10 Thread Roy Smith
I've got an old site running Django 1.1 with a postgress backend. I'm moving it to Django 1.3, with MySQL. I dumped all the old data with: $ python manage.py dumpdata --indent 2 > materia-dump.2012-04-06.json I created a brand new MySQL database and ran syncdb, then tried to import the data

Maybe I'm thinking about this wrong

2012-04-10 Thread Dom Armstrong
Im not sure if I am going about this the wrong way. Trying to learn class based views *sigh* currently seeming more complicated and less human readable with no less code currently but I expect most people feel that at first. class HomePage(ListView, BaseFormView): template_name =

Dynamic forms with custom javascript

2012-04-10 Thread Pratik Mandrekar
I need to create a flow where the screen element transitions between several forms and video (Eg. Video - form - Video -form ...). So I don't render them as separate pages but rather as a single page with different visible and hidden elements that vary depending on the page state. The problem is

Re: Django admin - How to disable "Delete each record" option for all the models at once

2012-04-10 Thread creecode
Hello Girish, Would ModelAdmin.has_delete_permissiondo the trick? On Monday, April 9, 2012 10:27:40 PM UTC-7, girishms wrote: > > > Is there a way to remove "Delete each record"

Re: Best approach for multiple sites in a single deployment?

2012-04-10 Thread Juan Pablo Martínez
Apache VirtualHost do that. Listen 39986 NameVirtualHost *:39986 ServerLimit 2 ServerName domain1.com ServerAlias www.domain1.com WSGIProcessGroup django_group1 WSGIDaemonProcess django_group1 processes=2 threads=12 python-path=/home/user/djangosite:/home/user/path/python2.7

Re: Advice on installing Django in a fresh OSX Lion machine

2012-04-10 Thread Paulo
You're right it doesn't. What I meant was, that I installed pip and virtualenvwrapper and THEN followed the tutorial as he advised. But today I uninstalled virtualenv and virtualenvwrapper and following the tutorial [1] instructionsand everything seems to work now. Thanks for helping. [1] -

Re: Best approach for multiple sites in a single deployment?

2012-04-10 Thread Mario Gudelj
Hey man, See if this helps http://tidbids.posterous.com/saas-with-django-and-postgresql-schemas Cheers, -m On 10 April 2012 21:53, Bernardo wrote: > I would like to create a subdomain based authentication system, like the > one on 37signals, freshbooks, codebase, etc.

Django Fundamentals Bootcamp

2012-04-10 Thread Nicole Foster
Hello! I'm excited to announce that on June 9th and 10th, Caktus Group (www.caktusgroup.com) will be hosting our first Django bootcamp. It will be a two day intensive bootcamp session where you'll learn the basics of developing a web application using Django through constructing a crossword drill

Re: cache decorators in urls.py error

2012-04-10 Thread Tom Evans
On Sat, Apr 7, 2012 at 3:53 PM, Phang Mulianto wrote: > Hi, > > i have my apps and try to use cache decorator in url.py but got error. > > Here are the urls.py > > from django.views.decorators.cache import cache_page > > urlpatterns = patterns('article.views', >    

Re: Password_reset error

2012-04-10 Thread Святослав Б
Post full views.py file 2012/4/9 kapil Garg > Hi All, > > > I'm trying to implement *Forgot Password* in my django application and > have done the very basic as mentioned in the documentation with all the > default values but on clicking the Link, I get the error

get called, after logout completed

2012-04-10 Thread Daniel Marohn
Hi! logout method in contrib/auth/__init__ calls signal user_logged_out before creating the new session. I want to set a flag into the new session but do not see any way how to do this. Something like a post_user_logged_out signal. Any ideas for a workarround (I do not want to patch django)?

Re: Advice on installing Django in a fresh OSX Lion machine

2012-04-10 Thread Daniel Roseman
On Tuesday, 10 April 2012 00:00:32 UTC+1, Paulo wrote: > > So I follow your advice and did sudo easy_install pip and sudo pip install > virtualenvwrapper. > Then I instaled homebrew and wget as mentioned in the site. And then I hit > the wall. > When I tried to python setup.py install

Best approach for multiple sites in a single deployment?

2012-04-10 Thread Bernardo
I would like to create a subdomain based authentication system, like the one on 37signals, freshbooks, codebase, etc. The objective is to do something like smaller but in far smaller scale (I suppose a maximum of 100-1000 blogs). All other models (blog posts, comments, etc) already have a

Re: Hosting Django website

2012-04-10 Thread Tom Evans
On Sun, Apr 8, 2012 at 2:59 PM, KasunLak wrote: > Hi all, > > I have created a website using django. I want to host it now. Can you > suggest me a best way to host it? I have noticed it is possible to > host in tomcat on top of jython, is this recommended or have any >

reportlab.platypus - rendering template with a right aligned image in the template header as background

2012-04-10 Thread luke lukes
hi everyone. i'm tryng to use Reportlab to output an invoice on a simple Django app. it seems quite difficult to do simple things like this. here's my code: http://dpaste.de/mSXQm/ with this code, my header image is always rendered on page center. i want to insert it on the right (like that:

Re: ModelForm based on User allows any username without checking

2012-04-10 Thread Bastian
I assumed restrictions would apply at model level but it's not the case. About the ModelForm, isn't it the point of using a ModelForm? (with the User model as shown in the example of course) that it inherits from the model and automatically creates the right fields, widgets, and restrictions?

New release of Instant Django

2012-04-10 Thread Kevin
For the Windows users out there, or for those with friends who use Windows, this is for you. Some of you may recall Instant Django, there should be a post from the original author on this group about it. Basically Instant Django is a self contained Python+Django installation within a single

Re: Django 1.4: TypeError: get_db_prep_value() got an unexpected keyword argument 'connection'

2012-04-10 Thread Tom Evans
On Sun, Apr 8, 2012 at 4:25 PM, shacker wrote: > Russell's response is correct, but speaking of stale *.pyc files that > may occasionally bite you, try putting this in your bash aliases: > > alias delpyc='find . -name "*.pyc" -print0 | xargs -0 rm -rf' > > Then you safely

Re: HttpResponse_is_string is removed Django 1.4

2012-04-10 Thread Tom Evans
On Fri, Apr 6, 2012 at 3:56 PM, Ian Clelland wrote: > > > On Thu, Apr 5, 2012 at 6:07 PM, Rajat Jain wrote: >> >> Hi, >> >> I have noticed that the class variable HttpReponse._is_string (in >> django/http/__init__.py) is removed in Django 1.4. I was

Re: Password_reset error

2012-04-10 Thread Ejah
BTW, there is django-registration that takes care of all of this already. You can save yourself some time there. Hth On 9 apr, 19:29, kapil Garg wrote: > Hi All, > > I'm trying to implement  *Forgot Password* in my django application and > have  done the very basic as

Re: Password_reset error

2012-04-10 Thread Ejah
I assume App is the name of your application within your project, it might not be on the python path. Can you import it from a python/ django shell? On 9 apr, 19:29, kapil Garg wrote: > Hi All, > > I'm trying to implement  *Forgot Password* in my django application and >

Re: Django tutorial

2012-04-10 Thread Ejah
Can you post the db part of your settings file? On 10 apr, 06:05, Ed McLaughlin wrote: > _mysql.so is in there. When I try using sqlite I get this: > > Eds-MacBook-Air:mysite3 edmclaugh76$ python manage.py syncdb > Traceback (most recent call last): >   File "manage.py",

Should I always provide a return value when writing my test using mock library?

2012-04-10 Thread John Yeukhon Wong
I am Cc this to testing-in-python mailing list. Hope this makes sense. Suppose I have a function called "render_reverse" which takes two arguments: function name, and args list, and it returns "reverse(f, *args)" If I called render_reverse('happy_birthday', {'args': [username]}), I would get

Re: ModelForm based on User allows any username without checking

2012-04-10 Thread Pavan Verma
I went through django/contrib/auth/models.py to check the definition of the User model. I don't see this file defining any restrictions on what a username can be. So, I think the form is the place (and possibly the only place) which defines and enforces restrictions on what the username can be.

Force logout a user in signed cookie mode

2012-04-10 Thread Cherian
Hi all, In the signed cookie mode is it possible for me force logout an account? Say I login from two places, and I need to logout my account from the one access I forgot to logout in a public internet café. Can I do that from my current login? >From my testing I could not do this. But there