Re: Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread Kenneth Gonsalves
On Sat, 2011-06-04 at 01:29 -0400, AJ wrote: > I think I will go for VPS. I do agree that managing seems a little > work but > I guess eventually it will prove to be good. > > I have one more question: Is it easy to have the mail server setup on > a VPS? > My application does require emailing

Re: Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread AJ
I think I will go for VPS. I do agree that managing seems a little work but I guess eventually it will prove to be good. I have one more question: Is it easy to have the mail server setup on a VPS? My application does require emailing users and members of the website. This is mostly system mail

ORM Doubts

2011-06-03 Thread sushanth Reddy
Hi, below is model class Employee(models.Model): name = models.CharField(max_length=50, primary_key=True) dep = models.CharField(max_length=10) class Meta(object): db_table = u'employee' class EmpSal(models.Model): emp_name = models.ForeignKey(Employee, db_column='emp_name')

Re: Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread Kenneth Gonsalves
On Fri, 2011-06-03 at 14:12 -0400, AJ wrote: > To change the question or ask a new one too: what name do you suggest > as a > good, reliable yet economical hosting provider - Both for personal > static > website hosting and little Django web projects? webfaction -- regards KG

Opinion on static files and approaching hardcoding in a Django-like manner

2011-06-03 Thread xiao_haozi
Sorry if this might have been addressed before in a similar manner, but I was curious as to what some others' thoughts were or what their practices might be in this situation. I have some bookmarklets and other javascript files in a /static/ directory. This are then linked in a view so that a

Re: Why self-defined session_key got changed when save in DB?

2011-06-03 Thread Jimmy
I'm new to Django and not quite understand your explanation. How can I create a specific session_key, and access to the session by that key? Any risk that I have if I expose the session_key to the outside? Thank you. Best regards, Li Jiaming On May 31, 7:47 pm, Tom Evans

Re: Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread Dave Sayer
On 3 June 2011 19:48, Javier Guerra Giraldez wrote: > small VPSs tend to be the best answer if you don't mind adminstering > your own box.  both webfaction and linode have solid reputation and > support teams. > +1 for VPS. I had always used Dreamhost for hosting PHP & static

Re: Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread Oscar Carballal
I recently discovered AlienLayer, a VPS provider in las vegas, they hace a $19/year plan that is quite good for personal stuff. Take a look to it :) Enviado desde mi HTC El 03/06/2011 20:48, "Javier Guerra Giraldez" escribió: > On Fri, Jun 3, 2011 at 1:12 PM, AJ

Re: Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread Cal Leeming [Simplicity Media Ltd]
Oh also, if you want to run off dev.* / staging.* urls, but your code (for whatever reason) won't support those new urls, you can use middleware to trick the code into thinking the dev.*/staging.* hostnames are actually the prod hostnames, whilst still applying the correct environmental settings:

Re: Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread Cal Leeming [Simplicity Media Ltd]
Oh, sorry I thought you were asking how to stop people accessing your dev environment. There are multiple ways to handle dev/staging/prod separation, and they all depend on how mission critical your prod is. Personally, I have different sub domains for each one, place prod under git only release

Re: Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread Shawn Milochik
On 06/03/2011 04:50 PM, AJ wrote: Well even if I do my Python stuff in virtualenv for development on a linode box, I'd like to know how to separate development/test environment to live/production. Is the only solution "/...//IP whitelisting to block only those who you want to have

Re: Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread AJ
Well even if I do my Python stuff in virtualenv for development on a linode box, I'd like to know how to separate development/test environment to live/production. Is the only solution "*...**IP whitelisting to block only those who you want to have access...*"? Also, can I run multiple instances

Re: Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread Shawn Milochik
On 06/03/2011 04:16 PM, Amanjeev Sethi wrote: Linode looks nice plus it will teach me some administration side too. If I try using linode, what is the best setup (Linux Distro, web server support, modules like mod_wsgi? etc ) for Django websites on linode? Use whatever distro you like

Re: Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread Amanjeev Sethi
Linode looks nice plus it will teach me some administration side too. If I try using linode, what is the best setup (Linux Distro, web server support, modules like mod_wsgi? etc ) for Django websites on linode? On Fri, Jun 3, 2011 at 2:48 PM, Javier Guerra Giraldez wrote:

Re: Our new startup site build on Django and GAE is now live!

2011-06-03 Thread Anton de Winter
If you use something like Firebug you can remove the blur layer and have a look around (it's the actual site behind the blur). In Chrome it detected my location just fine and showed relevant content. It didn't appear to need any info from Facebook to function properly. On Fri, Jun 3, 2011 at

Re: Our new startup site build on Django and GAE is now live!

2011-06-03 Thread Doug Ballance
I actually authorized, but got a little creeped out by being asked for three cities in which I'd lived before being able to continue. I entered one, but it still wouldn't let me pass without another two. I couldn't conceived of ANY legitimate reason to need anything more than my current location

Re: Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread Javier Guerra Giraldez
On Fri, Jun 3, 2011 at 1:12 PM, AJ wrote: > To change the question or ask a new one too: what name do you suggest as a > good, reliable yet economical hosting provider - Both for personal static > website hosting and little Django web projects? small VPSs tend to be the

Re: Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread AJ
Thanks Cal. I have felt that myself. I have about half a dozen websites/domains (mostly personal and family) hosted with them. I have started Django as my main stack for web development and have realized that it is not extremely great as a Django hosting. Also, they do not have phone tech.

Fwd: Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread Cal Leeming [Simplicity Media Ltd]
Hi AJ, Just a heads up, I have had a few clients in the past who used Dreamhost (and I had to set it up for them). They are not exactly the worlds best provider, and you certainly wouldn't want to use them for any production (live) sites. But, to answer your original question, you can use IP

Setting up dev/test/production environments on the server (dreamhost)

2011-06-03 Thread AJ
Happy Friday to All: I have a project under way. All this time I have been developing on my personal Macbook with Django's dev server. I'd like to push this to the hosting service I have from Dreamhost and test, develop, fix it there. I'd like to know how can I avoid it being visible only to me

Re: Circular import on every backend except sqlite

2011-06-03 Thread Gloria W
I found it. Someone else on the machine had replaced mod_wsgi with a 2.6 variant they compiled. I am using one I compiled for 2.7.1. Nasty things happen when the mod_wsgi module doesn't match the python version one's running. What a P.I.T.A. to find. Gloria On Jun 2, 9:11 am, Tom Evans

Re: Seeking a Django 1.3 and syslog configuration example

2011-06-03 Thread Rob
Well that worked but I'm not happy about it. I have the following: from logging.handlers import SysLogHandler ... 'syslog':{ 'level':'DEBUG', 'class': 'logging.handlers.SysLogHandler', 'formatter': 'verbose',

Re: save out a test database?

2011-06-03 Thread Steve Bywater
What I've done to do this is insert a pdb.set_trace() right before the place your test fails, then in pdb do Ctrl+C to break out of the test. This leaves your test database intact at that state. Then you can change your settings to point to the test database instead of your regular one. Then you

Re: Seeking a Django 1.3 and syslog configuration example

2011-06-03 Thread Piotr Zalewa
In Add-ons Builder I've got something like this in log_settings.py https://github.com/mozilla/FlightDeck/blob/master/log_settings.py 'handlers': { 'syslog': { '()': logging.handlers.SysLogHandler, 'facility': logging.handlers.SysLogHandler.LOG_LOCAL7,

Re: Seeking a Django 1.3 and syslog configuration example

2011-06-03 Thread Rob
Thanks, but this doesn't help at all. I have no problem getting the RotatingFileHandler working, it is documented albeit poorly, but the SysLogHandler isn't documented at all and doesn't work the same way. The SysLogHandler actually has to connect to syslogd and log to a syslog facility (eg.

Re: Our new startup site build on Django and GAE is now live!

2011-06-03 Thread Piotr Zalewa
+1k - just wanted to write the same message On 06/03/11 14:39, Rob wrote: I spent a few seconds looking for the X to close the sign up panel before seeing this: "LOCQL is a social Q service, so we need you to sign in instead of browse anonymously." But I *always* browse anonymously first to

Re: Pre-deployment steps for Django apps?

2011-06-03 Thread i...@webbricks.co.uk
add the sitemap app in. add robots.txt line. then hook it up to google webmasters tools... would love to hear what others do... On Jun 3, 1:28 am, shantp wrote: > Hi all, > > I am almost ready to make my app live. I am curious what steps you all take > while getting your app

Re: Our new startup site build on Django and GAE is now live!

2011-06-03 Thread MAST3R
+1 On Jun 3, 12:06 am, CareerDhaba tech wrote: > Cool looking site, but it would be useful to allow people to browse the site > a bit before having to register. > > > > > > > > On Fri, Jun 3, 2011 at 9:45 AM, Gath wrote: > > Great stuff!! Thumbs up. > >

Re: Our new startup site build on Django and GAE is now live!

2011-06-03 Thread Rob
I spent a few seconds looking for the X to close the sign up panel before seeing this: "LOCQL is a social Q service, so we need you to sign in instead of browse anonymously." But I *always* browse anonymously first to see if a site is something I want to use and/or trust with any info about me;

Re: ImportError: No module named urls

2011-06-03 Thread Kann
Thanks, it works now. :D On Jun 3, 2:14 pm, Kenneth Gonsalves wrote: > On Fri, 2011-06-03 at 05:07 -0700, Kann wrote: > > > you have a file called mirnaweb.py - your path should contain only > > the > > > parent directory to your mirnaweb directory. Python is now looking

Re: Our new startup site build on Django and GAE is now live!

2011-06-03 Thread mad_casual
On Jun 2, 4:05 am, Tom Evans wrote: > options for people who don't want to share their life with Zuckerberg. Or for people who care about a location for the location's sake rather than their friends' opinions of it. Unless I'm travelling with or to friends or people I

Re: ImportError: No module named urls

2011-06-03 Thread Kenneth Gonsalves
On Fri, 2011-06-03 at 05:07 -0700, Kann wrote: > > you have a file called mirnaweb.py - your path should contain only > the > > parent directory to your mirnaweb directory. Python is now looking > for > > settings inside mirnaweb.py > > OK, now I changed the setting file into mirna_settings.py to

Re: ImportError: No module named urls

2011-06-03 Thread Kann
> you have a file called mirnaweb.py - your path should contain only the > parent directory to your mirnaweb directory. Python is now looking for > settings inside mirnaweb.py OK, now I changed the setting file into mirna_settings.py to avoid the confusion with the directory name. I also include

Re: ImportError: No module named urls

2011-06-03 Thread Kenneth Gonsalves
On Fri, 2011-06-03 at 04:44 -0700, Kann wrote: > Below is what I just did. Does this mean that I still have problem > with my pythonpath? yes > > [xxx@lagrange mirnaweb]$ python manage.py > Error: Can't find the file 'settings.py' in the directory containing > 'manage.py'. It appears you've

Re: ImportError: No module named urls

2011-06-03 Thread Kann
Hi Kenneth, Below is what I just did. Does this mean that I still have problem with my pythonpath? [xxx@lagrange mirnaweb]$ python manage.py Error: Can't find the file 'settings.py' in the directory containing 'manage.py'. It appears you've customized things. You'll have to run django-admin.py,

Re: ImportError: No module named urls

2011-06-03 Thread Kenneth Gonsalves
On Fri, 2011-06-03 at 04:11 -0700, Kann wrote: > [Fri Jun 03 13:04:32 2011] [error] [client 127.0.0.1] ImportError: No > module named urls no module named urls can also mean that urls.py has errors. From the shell try to import urls -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox

ImportError: No module named urls

2011-06-03 Thread Kann
Dear all, Thanks so much for help me with the $DJANGO_SETTINGS_MODULE issue. Now I just installed the wsgi module and try to use apache 2.2.17 to host the django project. However, the page always throws error. I checked the log file and it says there's no module named urls. Seems like python

Re: Confusion about DJANGO_SETTINGS_MODULE

2011-06-03 Thread Kann
Thanks all, that cleared up a lot of my confusions and gave me a really good lesson. Now I am facing a new problem and will post a new topic then. Kann On Jun 2, 2:41 pm, Kenneth Gonsalves wrote: > On Thu, 2011-06-02 at 05:29 -0700, Kann wrote: > > Thanks Oscar, I read

Re: Reasons to use managers

2011-06-03 Thread Marc Aymerich
On Fri, Jun 3, 2011 at 11:29 AM, Marc Aymerich wrote: > On Fri, Jun 3, 2011 at 8:30 AM, Amit Sethi wrote: >>> functionality to your models. (For "row-level" functionality -- i.e., >>> functions that act on a single instance of a model object -- use 

Announcing django-modeltranslation-0.3

2011-06-03 Thread Dirk Eschler
Hello, i'm pleased to announce the 0.3 release of django-modeltranslation, a Django app used to translate dynamic content of existing models to an arbitrary number of languages without having to change the original model classes. It uses a registration approach (comparable to Django’s admin

Re: Reasons to use managers

2011-06-03 Thread Marc Aymerich
On Fri, Jun 3, 2011 at 8:30 AM, Amit Sethi wrote: >> functionality to your models. (For "row-level" functionality -- i.e., >> functions that act on a single instance of a model object -- use Model >> methods, not custom Manager methods.) >> > > But what is the benefit

Re: Reasons to use managers

2011-06-03 Thread Mike
My take is that you can have record-centric logic that can either be put in one place (tucked away in the appropriate model) ... or spread out across the codebase. Sounds analogous to standard OOP concepts. -- You received this message because you are subscribed to the Google Groups "Django

Re: Reasons to use managers

2011-06-03 Thread Amit Sethi
> functionality to your models. (For "row-level" functionality -- i.e., > functions that act on a single instance of a model object -- use Model > methods, not custom Manager methods.) > But what is the benefit of model methods compared to adding an extra field and getting almost the same thing