Re: Can't get Web font loader in django

2012-11-21 Thread Chris Pagnutti
b page. > > In your head section template all you need to do is something of this kind : > > {% for jsscript in jsscript_list %} > > {{ jsscript }} > > > {% endfor %} > > assuming that jsscript is the text jsscript that you want to add to your web > page.

Can't get Web font loader in django

2012-11-20 Thread Chris Pagnutti
Hi. I'm trying to get the Google Web Font loader via http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js";> in my section. But when I load the page I get (in Chromium's console) this message: GET https://www.googleapis.com/webfonts/v1/webfonts 403 (Forbidden) HOWEVER, if I call the webf

Using South with Custom User Model

2012-11-20 Thread Chris Pagnutti
I'm wondering if anyone has ever had success with using South when you have AUTH_USER_MODEL set to a custom User model. I've made various attempts, which are basically all the same steps but in different orders. Basically, my problems is related to this ticket http://south.aeracode.org/ticket/1

Re: Django in virtualenv + nginx + uwsgi set up guide

2012-11-16 Thread Chris Pagnutti
ric-part-5/<http://www.abidibo.net/blog/2012/06/29/deploy-django-applications-nginx-uwsgi-virtualenv-south-git-and-fabric-part-5/> >> >> It helped me a lot, and it's very complete, covering also fabric tool. >> >> Enjoy it, and good luck! >> >> >>

Re: index_together...shouldn't indexes be created AFTER populating the table?

2012-11-14 Thread Chris Pagnutti
On Wed, Nov 14, 2012 at 3:49 PM, Chris Pagnutti > > wrote: > > Thanks for your reply. The tables I'm dealing with are entirely static, > but > > some have many millions of records, which is why I want my indexes to > work > > as good as possible.

Re: How to configure nginx to serve mail for django

2012-11-14 Thread Chris Pagnutti
n Wed, Nov 14, 2012 at 4:37 PM, Dennis Lee Bieber wrote: > On Wed, 14 Nov 2012 11:41:11 -0800 (PST), Chris Pagnutti > declaimed the following in > gmane.comp.python.django.user: > > > Good point. At the moment, sending mail is my priority, but eventually > > I'll wan

Re: index_together...shouldn't indexes be created AFTER populating the table?

2012-11-14 Thread Chris Pagnutti
s use those indexes properly? I'm thinking the answer is yes, since the use of the indexes happens at the mysql level, and django just has to issue the select statement. On Wed, Nov 14, 2012 at 3:42 PM, Javier Guerra Giraldez wrote: > On Wed, Nov 14, 2012 at 3:14 PM, Chris Pagnutti > wr

index_together...shouldn't indexes be created AFTER populating the table?

2012-11-14 Thread Chris Pagnutti
Hi. The new index_together feature is great, but I think it's best to create an index on a table AFTER the table is filled, and assuming there won't be many new inserts. But in django, syncdb creates the index at the same time the table is created, and of course, the table is initially empty.

Re: How to configure nginx to serve mail for django

2012-11-14 Thread Chris Pagnutti
ennis Lee Bieber wrote: > > On Mon, 12 Nov 2012 20:48:04 -0500, Chris Pagnutti > > declaimed the following in > gmane.comp.python.django.user: > > > Not sure. It's VPS and I was handed a Debian install with practically > > nothing on it. I even had to

Re: How to configure nginx to serve mail for django

2012-11-12 Thread Chris Pagnutti
, 12 Nov 2012 12:51:57 -0800 (PST), Chris Pagnutti > declaimed the following in > gmane.comp.python.django.user: > > > Yeah. Makes good sense. I guess that Postfix is one of the more popular > > options. Is there any reason why I should NOT use postfix. > > >

Re: How to configure nginx to serve mail for django

2012-11-12 Thread Chris Pagnutti
you use GMail, you can > configure Django to use GMail's mail servers to send email). > > _Nik > > On 11/12/2012 10:22 AM, Chris Pagnutti wrote: > > Hi. I'm using nginx+uwsgi to serve a django app. I'd like to configure > it to be able to send mail wi

How to configure nginx to serve mail for django

2012-11-12 Thread Chris Pagnutti
Hi. I'm using nginx+uwsgi to serve a django app. I'd like to configure it to be able to send mail with django's send_mail() and send_mass_mail() functions. I've played with the nginx configuration files using the examples here http://wiki.nginx.org/Configuration#Mail_examples I have a very s

Django in virtualenv + nginx + uwsgi set up guide

2012-11-08 Thread Chris Pagnutti
Hi. I'm looking for a recent guide for setting up nginx to serve django projects in a virtualenv via uwsgi. I can find a whole pile of them, but they're all so different, and some are dated. I'm looking for something complete and recent that actually works. Ideally, I'd like it to be for a

Re: Help with Custom model field and Custom validation for EmailField().

2012-11-03 Thread Chris Pagnutti
y? Any simple examples > would be of great help! > > Many thanks...Dilip > > > > On Fri, Nov 2, 2012 at 8:12 PM, Chris Pagnutti > wrote: > >> Ahh. Just saw your link to overriding the clean() method. So you could >> put all the same logic above into the clean(

Re: Help with Custom model field and Custom validation for EmailField().

2012-11-02 Thread Chris Pagnutti
Ahh. Just saw your link to overriding the clean() method. So you could put all the same logic above into the clean() method instead. On Friday, November 2, 2012 4:36:20 AM UTC-4, Dilip M wrote: > > Hi, > > I am new to Django. Went through docs before posting this.. I have a model > and form li

Re: Help with Custom model field and Custom validation for EmailField().

2012-11-02 Thread Chris Pagnutti
Again, I'm not sure, but I think to do it at Model validation level you'd have to modify some of the django core files themselve. I think what you're looking for is in django.core.validators (in my install this file is at /lib/python2.7/site-packages/django/core/validators.py, or you can just

Re: Help with Custom model field and Custom validation for EmailField().

2012-11-02 Thread Chris Pagnutti
Hi. I'm pretty new to Django too, so someone else probably has a better idea. But I think that on the server side, you can handle additional validation in the view that handles the form submission (i.e. the view that the "action" attribute in your form points to). You can probably attach err

Re: Help me choose OS for django server

2012-11-01 Thread Chris Pagnutti
So by "another server entirely" you mean to actually subscribe to another hosting service (or a second account on my current service)? I'm sure it's in the docs if I look, but how would I deal with media uploads that way? On Tuesday, October 30, 2012 3:50:30 PM UTC-4,

Re: Help me choose OS for django server

2012-10-31 Thread Chris Pagnutti
Hi Waitman, Do you mean that if I stream mp4 videos from my site, I have to pay someone royalties? 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 Serv

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 sh

Re: Help me choose OS for django server

2012-10-30 Thread Chris Pagnutti
explain how to set up nginx for django? Will google it in the meantime. Thanks a whole bunch. 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 whi

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

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 in Eclipse+PyDev, lot's of functions and imports are undefined/unresolved

2012-10-26 Thread Chris Pagnutti
witching branches > outside the IDE. > > On Fri, Oct 26, 2012 at 5:05 PM, Chris Pagnutti > > > wrote: > >> It turns out that, although eclipse is complaining a lot, the site runs >> just fine. I guess I'll just have to get used to ignoring eclipse >> compl

Re: How to reference model instance fields dynamically

2012-10-26 Thread Chris Pagnutti
Indeed. Was trying that, but wasn't working on account of me forgetting to save inst first. It's all good now. Thanks a mil Brad. All the best. On Friday, October 26, 2012 11:37:36 AM UTC-4, Chris Pagnutti wrote: > > Say I have a model like > class MyModel(mode

Re: How to reference model instance fields dynamically

2012-10-26 Thread Chris Pagnutti
Awesome. Thanks Brad. Now the question is, what if the attribute is a ManyToManyField. e.g. inst.k.add(relatedObject) How to reference k properly if k is a string containing the name of a ManyToManyField of inst? On Friday, October 26, 2012 11:37:36 AM UTC-4, Chris Pagnutti wrote: > >

Re: Django in Eclipse+PyDev, lot's of functions and imports are undefined/unresolved

2012-10-26 Thread Chris Pagnutti
It turns out that, although eclipse is complaining a lot, the site runs just fine. I guess I'll just have to get used to ignoring eclipse complaints when working with django. Thanks. On Friday, October 26, 2012 12:48:35 PM UTC-4, Chris Pagnutti wrote: > > Hi. I created a django pr

Django in Eclipse+PyDev, lot's of functions and imports are undefined/unresolved

2012-10-26 Thread Chris Pagnutti
Hi. I created a django project using the eric4 IDE. I'm just trying to transfer everything over to Eclipse+PyDev. I basically just rebuilt the whole project from scratch by copying and pasting all the source code. I'm pretty sure I set up my python interpreter fine. I'm using django-trunk i

How to reference model instance fields dynamically

2012-10-26 Thread Chris Pagnutti
Say I have a model like class MyModel(models.Model) name = models.CharField(max_length=100) number = models.IntegerField() In a script, I want to have something like fields = {"name":"Joe", "number":5} And I want to update a MyModel instance using the fields dictionary, something like this

Re: Custom User class -> createsuperuser asks for Username twice

2012-10-19 Thread Chris Pagnutti
Right on. Thanks Russ. On Thursday, October 18, 2012 3:38:05 PM UTC-4, Chris Pagnutti wrote: > > Hi. I'm just trying out the new way to create a custom User class by > extending the AbstractBaseUser class. I essentially just copied the > AbstractUser and UserManager classes

Re: Custom User class -> createsuperuser asks for Username twice

2012-10-18 Thread Chris Pagnutti
re carefully "REQUIRED_FIELDS must contain all required fields on your User model, but should *not* contain theUSERNAME_FIELD." On Thursday, October 18, 2012 3:38:05 PM UTC-4, Chris Pagnutti wrote: > > Hi. I'm just trying out the new way to create a custom User clas

Custom User class -> createsuperuser asks for Username twice

2012-10-18 Thread Chris Pagnutti
Hi. I'm just trying out the new way to create a custom User class by extending the AbstractBaseUser class. I essentially just copied the AbstractUser and UserManager classes from auth.models and customized the fields the way I want 'em. I also set AUTH_USER_MODEL in settings appropriately.

Re: Virtualenvs and editing contrib stuff manually

2012-10-05 Thread Chris Pagnutti
bugs > that you might find difficult to trace and solve or that might change > some of the logic required to make django work. > > On 9/27/12, Chris Pagnutti > wrote: > > Hi. First-time poster here. Feel free to point out any rules I'm not > > following. &g

Re: Virtualenvs and editing contrib stuff manually

2012-10-05 Thread Chris Pagnutti
to make django work. > > On 9/27/12, Chris Pagnutti > wrote: > > Hi. First-time poster here. Feel free to point out any rules I'm not > > following. > > > > I've been looking around for how to make the django.contrib.auth User > > classe&

Re: Virtualenvs and editing contrib stuff manually

2012-10-04 Thread Chris Pagnutti
and solve or that might change > some of the logic required to make django work. > > On 9/27/12, Chris Pagnutti > wrote: > > Hi. First-time poster here. Feel free to point out any rules I'm not > > following. > > > > I've been looking around fo

Re: Virtualenvs and editing contrib stuff manually

2012-09-28 Thread Chris Pagnutti
t; Also, your edit might inadvertently break django or introduce bugs > that you might find difficult to trace and solve or that might change > some of the logic required to make django work. > > On 9/27/12, Chris Pagnutti > wrote: > > Hi. First-time poster here. Feel free to

Virtualenvs and editing contrib stuff manually

2012-09-27 Thread Chris Pagnutti
Hi. First-time poster here. Feel free to point out any rules I'm not following. I've been looking around for how to make the django.contrib.auth User classe's "email" field to be unique and required. There are bunches of ways to do it, but it's just s darn easy to go into the source and