Re: Trouble with VirtualEnv on Windows

2012-10-14 Thread Jani Tiainen
Because the setup procedure used there is faulty. This is what happens: When installing Python install package will bind .PY(C) file execution to use _always_ main installation. It won't follow any path settings which virtualenv relies on. I'm not sure can you even overcome that restriction

Heroku & Django: Database configuration issues with dj-database-url

2012-10-14 Thread Tuss4
I'm currently following Heroku's guide to Django on Heroku, but when it comes to configuring the database in settings.py I'm just at a lost. I tried copying and pasting the code provided: " import dj_database_url DATABASES =

Re: Trouble with VirtualEnv on Windows

2012-10-14 Thread Joshua Russo
I suppose I was a little light on the details of how I setup the environment. I don't often setup a new environment from scratch so I used this post as the basis: http://slacy.com/blog/2011/06/django-postgresql-virtualenv-development-setup-for-windows-7/ The versions of each program I used /

Re: Cleaning up redis connection after client disconnects from streaming response

2012-10-14 Thread Brent Tubbs
After a lot of banging on things and reading framework code, I've found what I think is the right answer to this question. 1. According to the WSGI PEP, if your application returns an iterator with a close() method, it should be called by the WSGI server once the response has finished. Django

Re: Most widely used documentation source for Django Projects?

2012-10-14 Thread Robert Steckroth
Ohh, hey, thanks. It was working this morning and performed flawlessly. I could not be more happy with the operational tools and overall design. On Sun, Oct 14, 2012 at 7:19 PM, Russell Keith-Magee wrote: > On Sun, Oct 14, 2012 at 11:54 AM, Robert Steckroth >

Re: Most widely used documentation source for Django Projects?

2012-10-14 Thread Russell Keith-Magee
On Sun, Oct 14, 2012 at 11:54 AM, Robert Steckroth wrote: > Hey Gang, is there a standard documentation page for new/existing > Django projects? > I was going to use https://read-the-docs.readthedocs.org/en but it > will not let me create an account (500 whale). It

Re: content_type in Client() post doesn't correctly encode

2012-10-14 Thread Russell Keith-Magee
On Sun, Oct 14, 2012 at 1:48 PM, Christopher Hartfield wrote: > I think I may have a bug in the client test class in the post method. > Normally you can call: > url_data = {'something': 'something'} > response = c.post(ip, url_data, content_type='application/xml') > >

Re: Best practices for open sourcing a Django project?

2012-10-14 Thread Mike Dewhirst
On 15/10/2012 6:47am, Joshua Russo wrote: I have project that I have been working and I was contemplating open sourcing it but I ran into a little hang up. How to handle the database authentication. The settings file obviously needs to be included but I don't want to advertise the production

Trouble with VirtualEnv on Windows

2012-10-14 Thread Joshua Russo
This is probably a VirturalEnv problem as opposed to a Django problem but I was wondering if someone here could point me in the right direction. I'm trying to setup clean environment for a demonstration of Django on Tuesday but I get the following when I try to setup the project within the

Re: Best practices for open sourcing a Django project?

2012-10-14 Thread Joshua Russo
Clifford, I have actually done this but the local settings files were merely used to override the production values. I think I like this way better for handling things like the database and the various path settings, though I'm not sure I will completely abandon the override mechanism either.

Re: Best practices for open sourcing a Django project?

2012-10-14 Thread Isuru 2eisuru
I think best option is project hosting system like github or bitbucket. Bitbucket allow private hosting too. And version control is attached to it. On Mon, Oct 15, 2012 at 1:29 AM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > You could just include the

Re: Best practices for open sourcing a Django project?

2012-10-14 Thread Cal Leeming [Simplicity Media Ltd]
Sorry, yes. Personally whenever I have taken code out of production, I've created a small example project and then placed the code within it, and created a scenario where the functionality can be used tested. This is why open source code sometimes isn't very good quality, it can be a huge time

Re: Best practices for open sourcing a Django project?

2012-10-14 Thread CLIFFORD ILKAY
On 10/14/2012 03:47 PM, Joshua Russo wrote: I have project that I have been working and I was contemplating open sourcing it but I ran into a little hang up. How to handle the database authentication. The settings file obviously needs to be included but I don't want to advertise the production

Re: Best practices for open sourcing a Django project?

2012-10-14 Thread Avraham Serour
I think you should include the config file, but with example parameters and comments, point out in the readme that there are some basic configuration to be done On Sun, Oct 14, 2012 at 9:59 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > You could just

Re: Best practices for open sourcing a Django project?

2012-10-14 Thread Joshua Russo
It sounds like you're saying that the open sourced project should be different from the production project. Am I reading that right? On Sunday, October 14, 2012 4:00:03 PM UTC-4, Cal Leeming [Simplicity Media Ltd] wrote: > > You could just include the necessary info in the README, or make a

Re: Best practices for open sourcing a Django project?

2012-10-14 Thread Cal Leeming [Simplicity Media Ltd]
You could just include the necessary info in the README, or make a wrapper script that does it for them - although I tend to stick with READMEs where possible as they consume less time. If the code is coming straight out of production, there's a few tips I'd recommended; * Ensure that you test

Best practices for open sourcing a Django project?

2012-10-14 Thread Joshua Russo
I have project that I have been working and I was contemplating open sourcing it but I ran into a little hang up. How to handle the database authentication. The settings file obviously needs to be included but I don't want to advertise the production database login. How is this generally

Re: Regarding the sub domains

2012-10-14 Thread creecode
These comments are for the OP, I'm just using Christopher's message to key off of... On Saturday, October 13, 2012 10:59:56 PM UTC-7, Christopher Hartfield wrote: You would have to yes first configure your name servers and allow your > website example.com to resolve each of those subdomains.

Re: Sub-arguments to arguments in management commands

2012-10-14 Thread Joel Goldstick
On Sun, Oct 14, 2012 at 12:12 PM, Robert Steckroth wrote: > Hey Gang, I have to Command class below which utilizes args from the > command line. > I would like to have sub-arguments to some of these, > e.g. python manage.py template3d -c --file some_template.html

Sub-arguments to arguments in management commands

2012-10-14 Thread Robert Steckroth
Hey Gang, I have to Command class below which utilizes args from the command line. I would like to have sub-arguments to some of these, e.g. python manage.py template3d -c --file some_template.html another.html This would execute the [-c] parameter and also pass those html names to a [--file]

Re: Global timeout for views

2012-10-14 Thread Karen Tracey
On Sat, Oct 13, 2012 at 10:43 AM, Sudhir Kumar wrote: > Is there a way to setup a global timeout for all views? > > Some of the requests are taking too long. I would like to log those and > send an error response back. If possible, I would NOT like to delegate > timeout to

Re: User can't edit model even after permissions are issued

2012-10-14 Thread Karen Tracey
On Fri, Oct 12, 2012 at 4:52 PM, Shawn H wrote: > I'm new to Django, and I'm using the admin site to manage my users. I > have one app installed, and it has one model. I created a new user, issued > that user add, change, and delete privileges (as app | model |

foreign key: need to instantiate a form with the initialized foreign key value

2012-10-14 Thread Malik Aqib
class HmsPatient(models.Model): id = models.IntegerField(primary_key=True) regdatetime = models.DateTimeField(default=datetime.datetime.now()) name = models.CharField(max_length=576) dob = models.DateField(default=datetime.datetime.now()) email =

Re: Regarding the sub domains

2012-10-14 Thread Christopher Hartfield
You would have to yes first configure your name servers and allow your website example.com to resolve each of those subdomains. So hopefully your number of users won't be too high :( If your allowed you might find it easier to do example.com/moris/, but I would assume you can't do that.