Re: Help me choose OS for django server

2012-10-30 Thread Chris Pagnutti
Yeah. Hosting the videos ourselves was one of the primary requirements for this project. On Tuesday, October 30, 2012 3:50:30 PM UTC-4, Chris Pagnutti wrote: > > Hi. I want to set up a production server for a django application. > constant.com offers Virtual Private Servers which should give

Re: Help me choose OS for django server

2012-10-30 Thread Lachlan Musicman
On Wed, Oct 31, 2012 at 2:04 PM, Chris Pagnutti wrote: > > @Nik: > Just following the django docs, it recommends Apache+mod_wsgi for the django > app, and either lighttpd or nginx to serve media. I liked the idea of > serving media separately because the app is heavy on video streaming. Is > you

Re: Help me choose OS for django server

2012-10-30 Thread Chris Pagnutti
Hi all. Thanks to everyone for their comments. If Debian is available, I think I like that idea for the OS. As for server security, I think I had the basics, but there are some great points in your replies. @Nik: Just following the django docs, it recommends Apache+mod_wsgi for the django

Re: Help me choose OS for django server

2012-10-30 Thread Fred Stluka
Chris, Yes, CentOS is a good choice. You can find all of the packages you need at the EPEL yum repo. Some brief articles I've written about security tools I always use: http://bristle.com/Tips/Unix.htm#logwatch http://bristle.com/Tips/Unix.htm#fail2ban http://bristle.com/Tips/Unix.h

Re: Help me choose OS for django server

2012-10-30 Thread John DeRosa
+2 for fail2ban. I love reviewing fail2ban's email, and seeing the script kiddies continuing to try to login to root. Which is login-disabled on all our servers. Keep trying, kids... John On Oct 30, 2012, at 4:38 PM, Fred Stluka wrote: > +1 for fail2ban > > It's surprising that a 3-year att

Re: Help me choose OS for django server

2012-10-30 Thread Fred Stluka
+1 for fail2ban It's surprising that a 3-year attack eventually succeeded if you had fail2ban installed, which should have blocked the attack after just a couple tries. Or had you not yet learned about fail2ban? I got hacked once too, before I learned about fail2ban. Never since. --Fred --

Re: Help me choose OS for django server

2012-10-30 Thread Trevor Joynson
I highly recommend fail2ban. And definitely use SSH key only auth (PasswordAuthentication no). I've had a box with a 32 char random password get brute forced. Took three years to do, but it happened. On Oct 30, 2012 4:08 PM, "Nikolas Stevenson-Molnar" wrote: > > > First, is this a good idea? D

Re: Custom Admin Panel

2012-10-30 Thread Some Developer
On 30/10/2012 12:06, Bill Freeman wrote: On Mon, Oct 29, 2012 at 12:13 PM, Some Developer wrote: Hi, I'm in the process of writing a Django site and one of the requirements is that it have a custom admin panel and a custom control panel but I am having some problems coming up with the best way

Re: Help me choose OS for django server

2012-10-30 Thread Some Developer
On 30/10/2012 19:50, Chris Pagnutti wrote: First, is this a good idea? Do you think I can do this securely using the django, apache, and lighttpd docs? or am I asking for trouble? What are the major security issues I need to be aware of when administering a server? Configure a firewall to b

Re: Joining querysets?

2012-10-30 Thread Lachlan Musicman
On Wed, Oct 31, 2012 at 1:26 AM, Bill Freeman wrote: >>> >>> All the ref's I've read online are quite old and recommend using | or >>> itertools.chain() >>> >>> Are these still the recommended method, or am I doing it wrong? > > This depends on what you mean by "join" (just in case you need it > a

Re: Help me choose OS for django server

2012-10-30 Thread Nikolas Stevenson-Molnar
> First, is this a good idea? Do you think I can do this securely using > the django, apache, and lighttpd docs? or am I asking for trouble? > What are the major security issues I need to be aware of when > administering a server? This depends on your specific security requirements. If you're ma

Help me choose OS for django server

2012-10-30 Thread Chris Pagnutti
Hi. I want to set up a production server for a django application. constant.com offers Virtual Private Servers which should give me virtually full control over the server, allowing me to install django and all the stuff I need for my app to run properly. First, is this a good idea? Do you th

Re: django-ajax giving 403

2012-10-30 Thread Nicolas Emiliani
On Tue, Oct 30, 2012 at 1:03 PM, Chris Pagnutti wrote: > Hi. I'm trying to make some AJAX calls using django-ajax > https://github.com/joestump/django-ajax > > But when I make the call, Chrome's console gives POST > http://127.0.0.1:8000/ajax/my_app/my_ajax_view.json

Re: ANN: Django REST framework 2 released.

2012-10-30 Thread Nikolas Stevenson-Molnar
+1 On 10/30/2012 9:55 AM, Mário Neto wrote: > Amazing! Good work! :) > > 2012/10/30 Tom Christie > > > Hi all, > > I'm incredibly pleased to announce the release of Django REST > framework 2. > > REST framework 2 is a comprehensive reworking of the o

Re: django-ajax giving 403

2012-10-30 Thread Tom Evans
On Tue, Oct 30, 2012 at 4:03 PM, Chris Pagnutti wrote: > Hi. I'm trying to make some AJAX calls using django-ajax > https://github.com/joestump/django-ajax > > But when I make the call, Chrome's console gives POST > http://127.0.0.1:8000/ajax/my_app/my_ajax_view.json 403 (FORBIDDEN) > If I visit

Re: How to implement clean() for a model with ManyToMany fields?

2012-10-30 Thread Carsten Fuchs
Hi Martin, thank you very much for your very clear and prompt help! :-) Best regards, Carsten Am 29.10.2012 20:15, schrieb Martin J. Laubach: Basically, you can't. M2m fields are saved after the model is saved, so you either get objects that are not yet ready for that check (as you experien

django-ajax giving 403

2012-10-30 Thread Chris Pagnutti
Hi. I'm trying to make some AJAX calls using django-ajax https://github.com/joestump/django-ajax But when I make the call, Chrome's console gives POST http://127.0.0.1:8000/ajax/my_app/my_ajax_view.json403 (FORBIDDEN) If I visit th

Re: Django free deployement help

2012-10-30 Thread Rahul Gaur
On Tue, Oct 30, 2012 at 8:16 PM, Alex Clark wrote: > ** > > On 2012-10-30 13:33:31 +, Amr Abdel-wahab said: > > > I have good experience with django developement but over local machines, I > have never built a project so can someone recommend me a free service to > deploy an experimental proj

Re: ANN: Django REST framework 2 released.

2012-10-30 Thread Mário Neto
Amazing! Good work! :) 2012/10/30 Tom Christie > Hi all, > > I'm incredibly pleased to announce the release of Django REST framework 2. > > REST framework 2 is a comprehensive reworking of the original project. > Because this is a major re-design, rather than an incremental release, > we've skip

ANN: Django REST framework 2 released.

2012-10-30 Thread Tom Christie
Hi all, I'm incredibly pleased to announce the release of Django REST framework 2. REST framework 2 is a comprehensive reworking of the original project. Because this is a major re-design, rather than an incremental release, we've skipped 1.x entirely, and called this version 2. Some of the thi

Re: Easy way to make all form fields read only?

2012-10-30 Thread Matt Woodward
On Tuesday, October 30, 2012 5:20:44 AM UTC-7, ke1g wrote: > Another protective hack would be to omit the > CSRF token when the form is read only. > Thanks -- interesting idea! Ultimate goal is for the user to be able to tell they can't edit the form via the fields being read only (which appli

Re: Easy way to make all form fields read only?

2012-10-30 Thread Matt Woodward
On Tuesday, October 30, 2012 7:09:05 AM UTC-7, JirkaV wrote: > On the UI side, you can set the "readonly" property on form fields. > This will prevent the field from being edited in a browser (I think so > - done that only once on a small internal project). > Thanks -- I probably should have e

Re: Easy way to make all form fields read only?

2012-10-30 Thread Matt Woodward
On Tuesday, October 30, 2012 1:36:19 AM UTC-7, elena wrote: > How are you rendering the form? Are you using `forms.Form`? > We're using a ModelForm specifically. > > Do you mean "user's credentials" from `django.contrib.auth`? > Actually this is a custom user object -- users authenticate agai

Re: Django free deployement help

2012-10-30 Thread Alex Clark
On 2012-10-30 13:33:31 +, Amr Abdel-wahab said: I have good experience with django developement but over local machines, I have never built a project so can someone recommend me a free service to deploy an experimental project on it along with easy tutorial to handle that. https://devcen

Re: Django setup with elsatic beanstalk

2012-10-30 Thread Stefano Tranquillini
Well i was able to play with it only right now. there's a thing i can't understand. what's the application.py? i've back this error 2012-10-30 14:28:42,890 [INFO] (26110 MainThread) [directoryHooksExecutor.py-28] [root directoryHooksExecutor info] Output from script: 2012-10-30 14:28:42,875 ERR

Re: Easy way to make all form fields read only?

2012-10-30 Thread Jirka Vejrazka
On the UI side, you can set the "readonly" property on form fields. This will prevent the field from being edited in a browser (I think so - done that only once on a small internal project). However, we warned - if *some* of your users can edit and submit the form, you should also introduce server

Django free deployement help

2012-10-30 Thread Amr Abdel-wahab
I have good experience with django developement but over local machines, I have never built a project so can someone recommend me a free service to deploy an experimental project on it along with easy tutorial to handle that. Many Thanks, Amr Abdelwahab -- You received this message because yo

Re: Easy way to make all form fields read only?

2012-10-30 Thread elena
Hiya Matt, As you already noticed yourself there are lots of different possible approaches to what you're talking about. But it depends on where/how the form is getting to the page. How are you rendering the form? Are you using `forms.Form`? Do you mean "user's credentials" from `django.contri

Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Cal Leeming [Simplicity Media Ltd]
Just to chime in on this.. In terms of commercial options, we have sometimes gone with ZXTM (now known as StingRay Traffic Manager) , it has some truly amazing features and you should definitely check it out. I believe that RiverBed have since started issuing free commercial licences for up to a c

Re: Template Inheriting in Apache server

2012-10-30 Thread Bill Freeman
On Tue, Oct 30, 2012 at 1:37 AM, Pervez Mulla wrote: > Hi, > > Sorry for this question in this group .I Just wanted to know is there any > way , I can Inherit different HTML templates from base.html as we do in > Django framework in Apache2 server? > > Thank You > Pervez It's a different style, a

Re: Joining querysets?

2012-10-30 Thread Bill Freeman
On Mon, Oct 29, 2012 at 9:46 PM, Lachlan Musicman wrote: > On Tue, Oct 30, 2012 at 1:35 PM, Lachlan Musicman wrote: >> Hola, >> >> So I've reached the point where I feel it necessary to join querysets. > > > Don't bother with this - I just wrote a better Query to solve this issue > > > L. > > >>

Re: Easy way to make all form fields read only?

2012-10-30 Thread Bill Freeman
On Mon, Oct 29, 2012 at 8:04 PM, Matthew Woodward wrote: > Semi-new to Django and working on my first "real" app, and I have a need > based on the user's credentials to display forms as either editable or > read-only. (Note this doesn't have anything to do with the Django admin in > case that has

Re: Custom Admin Panel

2012-10-30 Thread Bill Freeman
On Mon, Oct 29, 2012 at 12:13 PM, Some Developer wrote: > Hi, > > I'm in the process of writing a Django site and one of the requirements is > that it have a custom admin panel and a custom control panel but I am having > some problems coming up with the best way to organise my application. > > My

Re: psycopg2.DataError

2012-10-30 Thread Tom Evans
On Tue, Oct 30, 2012 at 6:06 AM, jondbaker wrote: > When I run 'python manage.py validate' the following error is returned: > > psycopg2.DataError: invalid value for parameter "TimeZone": "UTC" > > settings.py > TIME_ZONE = 'America/Denver' > USE_TZ = True > > I'm using Django 1.4.2 with Postgres

Re: Database setup

2012-10-30 Thread Jirka Vejrazka
Hi Markus, I don't think you mentioned what OS you use on your machine with Django. If it helps, I had this in my settings.py when connecting to MS SQL database from Linux 'mssql': { 'ENGINE': 'sql_server.pyodbc', 'NAME': 'mdb', 'USER': USERNAME, 'PASSWORD

Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Tom Evans
On Tue, Oct 30, 2012 at 7:35 AM, Isaac XXX wrote: > Hi Tom, > > you're right, I was not really explicit about what were my lacks of > information. Right now, the following points are the ones I can't found a > howto for the desired deployment: > > - Create a master-slave system on postgresql, main

Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Kurtis Mullins
The easiest thing I've found to use is simply uWSGI with Nginx. It's easy to just create new Django servers on the fly. You simply include the IPs in a list and it will use various algorithms (optional) to distribute the requests appropriately. As a lot of applications are IO bound, you could also

Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Isaac XXX
Hi there, maybe you're right, but I'm not really worried about RAM footprint, or resources consumption. I'm concerned now on architecture, setting a right scalable system, and a right cluster of systems, without lacks of communications between them. Underlaying technologies can be easily rep

Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Isaac XXX
Thank you so much for tips. I will keep them when I start to test environment for performance. Cheers Isaac On 10/29/2012 06:44 PM, Cal Leeming [Simplicity Media Ltd] wrote: Hi Isaac, If there is one thing I have learnt about scaling apps, it's about trying things out for yourself. Sure t

Re: Scaling django (nginx + apache + mod_wsgi + postgresql)

2012-10-30 Thread Isaac XXX
Hi Tom, you're right, I was not really explicit about what were my lacks of information. Right now, the following points are the ones I can't found a howto for the desired deployment: - Create a master-slave system on postgresql, maintaining all systems up to date, distributing reads, and ce

Re: Database setup

2012-10-30 Thread Markus Christen
> > What i know now: > > -- > > DATABASES = { > 'default': { > 'ENGINE': 'django.db.backends.mysql', > 'NAME': 'baan5c', > 'USER': '***', > 'PASSWORD': '*', > 'HOST': 'MAURITIUS', > 'PORT': '1433', >