Re: django admin login

2012-03-15 Thread vikalp sahni
ITS in settigns.py file. if its not there just write. SESSION_COOKIE_DOMAIN = "localhost" and then try. Regards, //Vikalp On Wed, Mar 14, 2012 at 11:48 PM, dummyman dummyman wrote: > Wer is the SESSION_COOKIE_DOMAIN ? > > > On Wed, Mar 14, 2012 at 11:32 PM, dummyman dummyman wrote: > >> hi >>

Django application performance estimates?

2012-03-15 Thread Sithembewena Lloyd Dube
Hi Everyone, I am working on a client's project for a public-facing learning application in Django with various features (think of a platform with courses, tests etc). I am only finishing the models and the front-end is still undone. However, the client wants "...guidelines in terms of scalability

Re: Django application performance estimates?

2012-03-15 Thread kenneth gonsalves
On Thu, 2012-03-15 at 09:46 +0200, Sithembewena Lloyd Dube wrote: > - concurrent active users >- emails per day >- lessons uploaded on the system >- etc. > > > How do I address this sort of query? actually this has nothing to do with django. It depends on hardware. -- regards Kenne

Re: Django application performance estimates?

2012-03-15 Thread Xavier Ordoquy
Le 15 mars 2012 à 09:04, kenneth gonsalves a écrit : > On Thu, 2012-03-15 at 09:46 +0200, Sithembewena Lloyd Dube wrote: >> - concurrent active users >> - emails per day >> - lessons uploaded on the system >> - etc. >> >> >> How do I address this sort of query? > > actually this has not

Re: Django application performance estimates?

2012-03-15 Thread Sithembewena Lloyd Dube
Hi Kenneth, Thanks for the response. The project will be hosted at WebFaction (which I recommended, having used their services with great results in the past). It will start off on shared hosting and could end up in a dedicated server. The client wants some sort of "performance guarantee". I was t

Re: Django application performance estimates?

2012-03-15 Thread Sithembewena Lloyd Dube
Xavier, thanks for the link. I'm watching it and I reckon it could help address the query. On Thu, Mar 15, 2012 at 10:21 AM, Xavier Ordoquy wrote: > > Le 15 mars 2012 à 09:04, kenneth gonsalves a écrit : > > > On Thu, 2012-03-15 at 09:46 +0200, Sithembewena Lloyd Dube wrote: > >> - concurrent act

Re: Django application performance estimates?

2012-03-15 Thread Xavier Ordoquy
Le 15 mars 2012 à 09:34, Sithembewena Lloyd Dube a écrit : > Xavier, thanks for the link. I'm watching it and I reckon it could help > address the query. This being said, because it is technically possible doesn't mean it is easy or will not cost time/money to get there. One would argue that o

Re: Running manage.py commands in Windows Power Shell

2012-03-15 Thread Tom Evans
On Wed, Mar 14, 2012 at 6:53 PM, orschiro wrote: > Hello Tom, > > I'm aware of that. But do not get me wrong. I only use Power Shell to > run the commands, for nothing more. > > it is simply more comfortable for me than CMD. > > By running Python on Windows you mean the Python IDLE? > > Regards >

Re: Running manage.py commands in Windows Power Shell

2012-03-15 Thread Sam Lai
On 15 March 2012 04:35, orschiro wrote: > Hello, > > I have a question which is based on the discussion here: > > http://groups.google.com/group/django-users/browse_thread/thread/2333f5dc8d0674f0 > > I'm working on Windows 7 with the PowerShell. Python 2.7 and the path > to django-admin.py is stor

Re: Simplest way to get all models for which admin interface exists

2012-03-15 Thread Gelonida N
Thanks a lot Matt, On 03/15/2012 03:20 AM, Matt Schinckel wrote: > All installed ModelAdmin models: > from django.contrib.admin import site site._registry.keys() > > If you only got at this from `manage.py shell`, then you may need to > import your urls.py file first. > > Getting thos

tornadio2 cached results

2012-03-15 Thread dobrysmak
Hi, i'm running tornadio2 server with socket.io and i run into a problem, when i'm getting some data from db via django's orm the socket server doesn't want to get new fresh data from db, every time the event occurs. He's just keeping the same data from begging. Does anyone had same problem? B

Re: Django application performance estimates?

2012-03-15 Thread kenneth gonsalves
On Thu, 2012-03-15 at 10:22 +0200, Sithembewena Lloyd Dube wrote: > Thanks for the response. The project will be hosted at WebFaction > (which I > recommended, having used their services with great results in the > past). It > will start off on shared hosting and could end up in a dedicated > serve

Re: How can I print form errors from inside the test

2012-03-15 Thread Mario Gudelj
All I had to do is to change initial=base_data to data=base_data and the thing worked. is_valid() and is_bound now work. Cheers, -m On 15 March 2012 12:20, Daniel Roseman wrote: > On Wednesday, 14 March 2012 16:43:12 UTC-7, somecallitblues wrote: >> >> Thanks Daniel and Karen, >> >> Karen, I;'

Re: django admin login

2012-03-15 Thread dummyman dummyman
Hi Still its not working :( getting the same error On Thu, Mar 15, 2012 at 12:59 PM, vikalp sahni wrote: > ITS in settigns.py file. > > if its not there just write.g > > SESSION_COOKIE_DOMAIN = "localhost" and then try. > > Regards, > //Vikalp > > > On Wed, Mar 14, 2012 at 11:48 PM, dummyman dummy

Can't save user details when using RemoteUserMiddleware and Active Directory

2012-03-15 Thread honyczek
Hi, when you use RemoteUserMiddleware (and RemoteUserBackend) for authentication of users and authenticates against Active Directory (mod_auth_sspi on Apache or Directory security on IIS), user's name value is in format domain\username. It works good until you want to set some details in Django Ad

Re: Initial value in inline form depending on foreign key value

2012-03-15 Thread FraMazz
Well, I got it. In a very UGLY way, but it does its job. I modified the inline class so that it gets access to the request object by overriding the get_formset function class CheckupInLineAdmin(admin.StackedInline): model = Checkup * form =CheckupAdminForm* extra = 1 *def get_form

Problem with tuncated Admin pages in apache + mod_fcgid

2012-03-15 Thread Another Django Newbie
Hi, I've just started playing with django this week and was following the example in the Django Book. I created an example of my own, based on the models.py in the book and tested it with manage.py runserver. All worked OK, but when I try it in apache one of my admin pages is truncated - a number

Re: tornadio2 cached results

2012-03-15 Thread dobrysmak
Figured out that tornadio2 or tornado is somehow keepeing django's orm data in memory pulling that same data on each db request. When i'm reffering to mysql database via python MySQLdb, making connection each request. i'm getting updated results, that's ok. How to force tornadio2/tornado to ge

extends base.html error

2012-03-15 Thread dpbklyn
Hello and thank you in advance... In Django I have a child template that updates a base.html template. I keep getting an error: must be the first tag in the template. When the code in the child template looks like this: {% extends "simple/base.html" %} {% block picklist %}

Re: tornadio2 cached results

2012-03-15 Thread Tom Evans
On Thu, Mar 15, 2012 at 2:12 PM, dobrysmak wrote: > Figured out that tornadio2 or tornado is somehow keepeing django's orm data > in memory pulling that same data on each db request. > When i'm reffering to mysql database via  python MySQLdb, making connection > each request. i'm getting updated r

Re: urllib2

2012-03-15 Thread Bill Freeman
Are you using the development server? If so, how about sticking a pdb.set_trace() at line 510 of /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py to see what you're really getting? On 3/13/12, hack wrote: > Yes, I added @csrf_exempt and not I get a 500 error inst

show ldap attributes in django

2012-03-15 Thread Marc Patermann
Hi, I started to learn Django recently, read the tutorial and Django Book etc. My Goal is to make the functionality of a few system cli scripts for ldap and mail available in the web. I started with a simple existing ldap script that displays attributes of an object. Now I tried to integrate

Testing class based views

2012-03-15 Thread msbuck
I have used class based views in my latest project. Now I'm trying to write tests. I can write tests like the ones I wrote for function based views but these seem to me to be functional tests. Does anyone do unit testing on a class based view methods? I'm not sure how to go about instantiating a

Re: urllib2

2012-03-15 Thread Alec Taylor
Also, quick sort-of side-note: I recommend checking out the python-requests library as an alternative to urllib2 http://docs.python-requests.org -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@

Re: coping source code templates

2012-03-15 Thread Joel Goldstick
On Wed, Mar 14, 2012 at 6:38 AM, Yasmine El_Badry wrote: > Hi, > Please , I need to know full details about coping the baseline > template from the source code to my own templates folder so that i can > change the site name instead of "Django administration". > > i don't understand the meaning of

Re: extends base.html error

2012-03-15 Thread Joel Goldstick
On Thu, Mar 15, 2012 at 10:39 AM, dpbklyn wrote: > Hello and thank you in advance... > > In Django I have a child template that updates a base.html template. I > keep getting an error: > >     must be the first tag in the > template. > > When the code in the child template looks like this: > >    

Re: django admin login

2012-03-15 Thread Joel Goldstick
On Thu, Mar 15, 2012 at 7:40 AM, dummyman dummyman wrote: > Hi > Still its not working :( getting the same error > On Thu, Mar 15, 2012 at 12:59 PM, vikalp sahni > wrote: >> >> ITS in settigns.py file. >> >> if its not there just write.g >> >> SESSION_COOKIE_DOMAIN = "localhost" and then try. >>

Re: Testing class based views

2012-03-15 Thread Javier Guerra Giraldez
On Thu, Mar 15, 2012 at 10:47 AM, msbuck wrote: > I have used class based views in my latest project. Now I'm trying to write > tests. I can write tests like the ones I wrote for function based views but > these seem to me to be functional tests. Does anyone do unit testing on a > class based view

Re: django admin login

2012-03-15 Thread dummyman dummyman
yes its the same username and passwd for database are also same On Thu, Mar 15, 2012 at 10:10 PM, Joel Goldstick wrote: > On Thu, Mar 15, 2012 at 7:40 AM, dummyman dummyman > wrote: > > Hi > > Still its not working :( getting the same error > > On Thu, Mar 15, 2012 at 12:59 PM, vikalp sahni > >

Re: urllib2

2012-03-15 Thread Ovnicraft
On Tue, Mar 13, 2012 at 8:54 PM, hack wrote: > This stuff is killing me. LOL I think I just don't understand the > urllib2 yet. > > I'm trying something very simple, but am having a terrible time > figuring out how to get it to work in python and django. All I want > to do is post to my site w

Satchmo store as an app of a django project

2012-03-15 Thread kooliah
I'm trying to run a satchmo store as an app of a django project I create a django project myprj (django-admin.py startproject myprj) I create a satchmo store (clonesatchmo.py) I copied settings.py and local_settings.py from myprj/store I modify myprj/urls to have shop in the /store subfolder of s

In views.py snippet of Code

2012-03-15 Thread Django_for_SB
Hi All, I'm using render_to_response() in my views.py module. And of course, I've imported the method: "from django.shortcuts import render_to_response" # This is the code that's generating the error: def hours_ahead(request, offset): try: offset = int(offset) except ValueError:

Re: In views.py snippet of Code

2012-03-15 Thread Kevin Wetzels
On Thursday, March 15, 2012 7:32:53 PM UTC+1, Django_for_SB wrote: > > Hi All, > > I'm using render_to_response() in my views.py module. And of course, > I've imported the method: > > "from django.shortcuts import render_to_response" > > # This is the code that's generating the error: > def

Re: extends base.html error

2012-03-15 Thread dpbklyn
YES!!! This was it. I had the TAG further down the page, but it was commented out with an HTML comment. once I removed the tag altogether, the page renders fine. Is there a way to comment out the {% TAG %}s? On Mar 15, 2012, at 11:31 AM, Joel Goldstick wrote: > On Thu, Mar 15, 2012 at 10:3

Re: ANN: Django 1.4 release candidate 2 issued

2012-03-15 Thread victoria
On Thu, Mar 15, 2012 at 4:46 AM, James Bennett wrote: > Subject line says it all, and details, as always, are on the weblog: > > https://www.djangoproject.com/weblog/2012/mar/14/14rc2/ > We have also released a new version of BitNami DjangoStack 1.4c2 which bundles Django 1.4 Release Candidate 2.

Re: extends base.html error

2012-03-15 Thread Joel Goldstick
On Thu, Mar 15, 2012 at 2:52 PM, dpbklyn wrote: > YES!!! > > This was it.  I had the TAG further down the page, but it was commented out > with an HTML comment.  once I removed the tag altogether, the page renders > fine.  Is there a way to comment out the {% TAG %}s? > > > On Mar 15, 2012, at 1

Re: Satchmo store as an app of a django project

2012-03-15 Thread Joel Goldstick
On Thu, Mar 15, 2012 at 2:29 PM, kooliah wrote: > I’m trying to run a satchmo store as an app of a django project > I create a django project myprj (django-admin.py startproject myprj) > > I create a satchmo store (clonesatchmo.py) > I copied settings.py and local_settings.py from myprj/store > I

Re: sending django email via gmail

2012-03-15 Thread infinitylX
Thank guys. Finally i get why this does not work. On Thursday, March 15, 2012 5:22:17 AM UTC+2, Karen Tracey wrote: > > 2012/3/14 infinitylX : > > 465 is a port for gmail and code i provide is completely working... > > but question is why django is not working with same settings... > > Because, a

A little InlineModelAdmin help please?

2012-03-15 Thread Jeff Blaine
Easier for me to just draw you a picture: ++ | noodle | ++ | | | | +-+ ++ ||

Django breaks shelve?

2012-03-15 Thread Rainy
Hi, I have some shelved instances that were saved when a module was run from command line, but when it is run from inside django: from reminders import * Tasks() I get the standard shelve error: 'module' object has no attribute 'Task'. reminders module has classes Task and Tasks defined. If I c

Re: In views.py snippet of Code

2012-03-15 Thread Sami Balbaky
Thank you Kevin, problem solved. I'm actually reading the book from www.djangobook.com. I need to cross reference with the documentation on www.thedjangoproject.com. Best, SB On Thu, Mar 15, 2012 at 11:43 AM, Kevin Wetzels wrote: > > > On Thursday, March 15, 2012 7:32:53 PM UTC+1, Django_for_S

Re: A little InlineModelAdmin help please?

2012-03-15 Thread Marc Aymerich
On Thu, Mar 15, 2012 at 9:32 PM, Jeff Blaine wrote: > Easier for me to just draw you a picture: > >            ++ >            |   noodle               | >            ++ >                 |             | >                 |             | >          

Re: Satchmo store as an app of a django project

2012-03-15 Thread kooliah
On 03/15/2012 09:22 PM, Joel Goldstick wrote: I had problems similar to you with my static files. First, I am assuming you are using v1.3 of Django? V1.0 did this differently Below is a snippet from my settings.py: Django is doing some things I don't really understand, but in your case I think

Re: Django deployment practices -- do people use setup.py?

2012-03-15 Thread Tom Eastman
On 14/03/12 21:47, Thomas Guettler wrote: > Hey, > > I read your post some days ago and waited what other people say. But > nobody answered. > > I posted a related question some time ago: Staging (dev,test,prod) in > django. I explain > my setup there. > http://markmail.org/thread/wqwvordnlhyizwy

Re: Satchmo store as an app of a django project

2012-03-15 Thread Joel Goldstick
On Thu, Mar 15, 2012 at 4:59 PM, kooliah wrote: > On 03/15/2012 09:22 PM, Joel Goldstick wrote: >> >> I had problems similar to you with my static files. First, I am >> assuming you are using v1.3 of Django?  V1.0 did this differently >> >> Below is a snippet from my settings.py: >> >> Django is d

Re: Satchmo store as an app of a django project

2012-03-15 Thread kooliah
On 03/15/2012 10:41 PM, Joel Goldstick wrote: My settings won't work for you unless you put your files in the same directories as I do. I did, i change settings according to my strcture trying either relative than absolute path, but it does not solve the problem I think it's some prefix to p

Re: "Dynamyc" modells

2012-03-15 Thread Juergen Schackmann
hi guys, django-dynamo https://bitbucket.org/schacki/django-dynamo will let users create models dynamically on the fly through the admin. maybe this helps. regards, juergen Am Dienstag, 13. März 2012 08:48:03 UTC+1 schrieb airween: > > hi, > > On Mon, Mar 12, 2012 at 09:51:43PM -0400, Dennis Lee

Newbie Django queryset question

2012-03-15 Thread Murilo Vicentini
Hey guys, sorry if this is a newbie question, but I'm new at django and I'm having a real hard time trying to figure out how to solve this. So I have this model. class Run(models.Model): speccpus = models.ForeignKey('Speccpu') hosts = models.ForeignKey('Host') Task = models.IntegerFi

Re: Newbie Django queryset question

2012-03-15 Thread Shawn Milochik
If you don't know which fields your users will be searching on in advance, you'll have to create Q objects and dynamically build your query in your view. https://docs.djangoproject.com/en/1.3/topics/db/queries/#complex-lookups-with-q-objects -- You received this message because you are subscr

Re: Django application performance estimates?

2012-03-15 Thread Sithembewena Lloyd Dube
And this - over time? I can only think of one phrase now - premature optimisation? Think about it - to optimise an application, a developer needs measurable metrics to work with? So, surely, beyond "good" or "best practice" application architecture, the rest becomes a "wait and see" affair? I hav

Re: Django application performance estimates?

2012-03-15 Thread Kurtis Mullins
Sorry for the late chime-in. Here's the "budget scalability" route we at http://www.fireflie.com are taking for our rewrite in Django. We decided to go with AWS. Initial hosting costs are free for the server until we are ready to push to production and need a larger instance. We are using Nginx fo

Re: Django application performance estimates?

2012-03-15 Thread Kurtis Mullins
Just a quick correction on one of my last statements :) In my opinion, paying $1,000 for a web application, and therefore expecting > a large amount of traffic and probably income, is way too little to expect > any kind of a guarantee -- let alone a guarantee that it'll scale to > infinite and bey

django structure and basic flow

2012-03-15 Thread Lewis
I am confused that different tutorial gives different method of doing things. I want to know how to setup basic cms site, what folder should I create, sometime people create apps, sometimes they don't. How do I put this in order? 1.url 2. view 3.model 4. template 5. admin 6. settings from the tut

models and NULL in postgres

2012-03-15 Thread hack
Something is a little strange with my database. My models have fields where the value is set as blank=True to allow null values. My forms seem to be saving values to the database just fine, even if the are blank/null. However, when I look at my database in phppgadmin all the rows show they a

Re: models and NULL in postgres

2012-03-15 Thread Donald Stufft
Django uses an empty string instead of a NULL for an empty value for CharField and Charfield subclasses On Thursday, March 15, 2012 at 10:18 PM, hack wrote: > Something is a little strange with my database. My models have fields where > the value is set as blank=True to allow null values. M

Re: models and NULL in postgres

2012-03-15 Thread hack
Ahhh, that makes sense. Thanks. :) On Thursday, March 15, 2012 10:19:47 PM UTC-4, dstufft wrote: > > Django uses an empty string instead of a NULL for an empty value for > CharField and Charfield subclasses > > On Thursday, March 15, 2012 at 10:18 PM, hack wrote: > > Something is a little st

Re: Newbie Django queryset question

2012-03-15 Thread Murilo Vicentini
But if I got it correctly I can use Q objects to make complex filters but they only apply to one model, what I need is a combination of the models. And since the search can return more than one (or even zero) objects I can't use get() to see the related objects. On Thursday, March 15, 2012 9:5

Re: Newbie Django queryset question

2012-03-15 Thread Shawn Milochik
You can certainly use Q objects to query across models, just as you can in a normal QuerySet, by using the double-underscore notation. https://docs.djangoproject.com/en/1.3/topics/db/queries/#lookups-that-span-relationships -- You received this message because you are subscribed to the Google

Re: Newbie Django queryset question

2012-03-15 Thread Murilo Vicentini
Uhmmm, thank you a lot. That was what I was looking for! Sorry for wasting your time. One last question, does this double-underscore notation work at my html template? Because after filtering I will want to display the information of the different models at one row of my table. On Friday, March

Query Set to search for a combination of model fields?

2012-03-15 Thread Gchorn
Hello All, As a learning project, I am currently putting together a site to track all of the teams and players in the NBA along with their basic statistics and information. My two models so far are, as you might expect, players and teams. For the player model, I have separate database fields for

Re: Query Set to search for a combination of model fields?

2012-03-15 Thread Shawn Milochik
Look at how the Q objects are being used in the example and it's clear why that is. It's using the pipe (|) to do an "or" query. If you want to change how the search works you'll have to add more code: 1. Split the search parameters on whitespace. 2. Create Q objects for searching in either or

Re: Newbie Django queryset question

2012-03-15 Thread Shawn Milochik
On 03/15/2012 11:22 PM, Murilo Vicentini wrote: Uhmmm, thank you a lot. That was what I was looking for! Sorry for wasting your time. One last question, does this double-underscore notation work at my html template? Because after filtering I will want to display the information of the different