Re: Django Calendar App Just Like Google Calendar

2013-01-14 Thread Iñigo Medina
On Mon, Jan 14, 2013 at 09:41:47AM +1100, Mario Gudelj wrote: > Defined my own. Actually, i have defined a single appointment/event model > and then i create an instance of it with different dates and different slug > for the range specified. > > Use rrlue - > http://labix.org/python-dateutil#head

Model object save gives Warning: Data truncated for column

2013-01-14 Thread Chen Xu
Hi Everyone, I am new to Django, I am currently converting my site from php to Django. I have already have my database (all the tables) setup when I wrote in php; now when I convert to Django, I am basically matching each column with the existing column. After I finished doing this, I try to create

Re: where the syntax error?

2013-01-14 Thread donarb
On Monday, January 14, 2013 12:39:08 PM UTC-8, Érico Oliveira wrote: > > class Imovel(models.Model): > disponivel = models.BooleanField(choices=DISPO) > data_venda = models.DateTimeField(auto_now_add=True, blank=True) > > def validaData(self): > if self.data_venda < datet

Re: django: creating tag groups

2013-01-14 Thread Amirouche
Why are you creating two groups of tags ? Why not use a specific widgets like a tree widget ? On Monday, January 14, 2013 12:02:59 PM UTC+1, Sammael wrote: > > *The models* > > class TagGroup(models.Model): > name = models.SlugField(max_length=50, unique=True, db_index=True) > > c

Re: Anyway to use innovaeditor in admin?

2013-01-14 Thread Amirouche
look at tutorials about other wysiwyg editors and django like the ck editor On Monday, January 14, 2013 3:39:36 PM UTC+1, frocco wrote: > > src='scripts/innovaeditor.js'> > > Initialize the Editor below any ** you’d like to replace. > > >

Re: Project Structure - Lots of scattered custom views

2013-01-14 Thread Amirouche
On Monday, January 14, 2013 3:46:54 PM UTC+1, chad petzoldt wrote: > > It had occurred to me that Django wasn't the right tool for this job - >> not everything is a nail :) > > > I am embedding these files within a template, so they are not direct > static serves. But the content must be inser

Any Django Developers in Santa Cruz, CA

2013-01-14 Thread vince
Looking to connect with individuals living "over the hill" who are interested in Django development. I have some opportunities that require local talent. Thanking you all in advance. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view th

Re: where the syntax error?

2013-01-14 Thread John
On 14/01/13 20:39, Érico Oliveira wrote: > class Imovel(models.Model): > disponivel = models.BooleanField(choices=DISPO) > data_venda = models.DateTimeField(auto_now_add=True, blank=True) > > def validaData(self): > if self.data_venda < datetime.now - timedelta(days=2) <- >

Re: Status of open sourced Django Book?

2013-01-14 Thread Lachlan Musicman
On Tue, Jan 15, 2013 at 5:55 AM, Skip Montanaro wrote: > book (or tutorials). I'm rummage through the release notes and see what I > come up with. > > Or are new useful features more likely to be found in contributed > apps/modules? If so, how do I browse that environment? Is there some sort >

Re: "Principle of least privilege" in accessing a DB from an app

2013-01-14 Thread John
Hi Isaac, I've thought about this but never implemented it... I don't think DB routers will really do what you want; you are making the assumption that your Django project is compromised and you need separation at the DB level, which means that every route is also compromised as all the access cr

where the syntax error?

2013-01-14 Thread Érico Oliveira
class Imovel(models.Model): disponivel = models.BooleanField(choices=DISPO) data_venda = models.DateTimeField(auto_now_add=True, blank=True) def validaData(self): if self.data_venda < datetime.now - timedelta(days=2) <- -- You received this message because you are subscr

Re: Django/Python vs Grails/Groovy

2013-01-14 Thread serek
Hi I have tried both and decided to stay with Django. Both frameworks are great, but it was annoying that Grails did some compilation every time I changed something. Sometimes it was fast, sometimes it was long enough to start to read blog articles and be distracted from main work. There was e

Re: Status of open sourced Django Book?

2013-01-14 Thread Skip Montanaro
> If you do go through the release notes for 1.1, 1.2, 1.3 and 1.4, you > shouldn't find *that* many backwards incompatibilities. > Thanks. I wasn't actually all that worried about incompatibilities. I was more worried about interesting new features in later versions which aren't discussed

CSRFmiddlewaretoken issue ?

2013-01-14 Thread Rahul Gaur
Hi, I am working on a Project which implements micro blogging(river flow) like twitter. I made a django app for this and here is the snippet of the models.py I registered the app with 'admin' class uPost(models.Model): body = models.TextField(max_length=150) author = models.ForeignKey

jquery multi file uploads in single post

2013-01-14 Thread Chad Vernon
I'm creating an asset management system with Django and I'm using this jquery multi-file uploader: http://blueimp.github.com/jQuery-File-Upload/ I want to be able to get all uploaded files in a single POST request instead of each file having it's own request so I can count all the files as a si

database query error:Subqueries are not supported (yet)

2013-01-14 Thread jianhui chen
Hi all, There is an Subqueries are not supported (yet) error when I use "filter" function in databade. First, I create a database based in models.py: class ImageItem(models.Model): name = models.CharField(max_length = 100) depthOffset = models.FloatField() depthResize = mode

Django Nested template block

2013-01-14 Thread Nikhil Verma
Hi All I am want some help in django nested template blocks How can i achieve this ? base.html {% block parent %} {% block child %} {% endblock child %} {% endblock parent %} blog.html {% extends "base.html" %} {% block child %} I am overriding child {% endblock child %} Thanks

Re: Project Structure - Lots of scattered custom views

2013-01-14 Thread chad petzoldt
> > It had occurred to me that Django wasn't the right tool for this job - > not everything is a nail :) I am embedding these files within a template, so they are not direct static serves. But the content must be inserted within the template "as-is" from the filesystem. I suck at Javascript

Re: Field pre-load hook?

2013-01-14 Thread Tom Evans
On Sun, Jan 13, 2013 at 8:00 PM, Matt Barry wrote: > Hi, > > I'm creating a model from an external database that has some encrypted > columns. Initially I was thinking of creating a custom field type: > > class EncryptedField(models.Field): > def db_type(self, connection): > return 'TEXT' >

Re: "Principle of least privilege" in accessing a DB from an app

2013-01-14 Thread Isaac Perez
Hi Tom, my main goal is to avoid that the access to the users table by anything else other than the authentication module. I understand that writing the app correctly and filtering the input, etc... will do the same, but it's just another layer of security. I'll take a look to the DB routers and

Anyway to use innovaeditor in admin?

2013-01-14 Thread frocco
Initialize the Editor below any ** you’d like to replace. var oEdit1 = new InnovaEditor("oEdit1"); oEdit1.width = 750; oEdit1.height = 530; oEdit1.groups = [ ["group1", "", ["Bold", "Italic", "Underline", "FontDi

Re: Field pre-load hook?

2013-01-14 Thread Derek
Maybe have a look at: * http://www.tylerlesmann.com/2008/dec/19/encrypting-database-data-django/ * https://github.com/svetlyak40wt/django-fields#readme On Sunday, 13 January 2013 22:00:24 UTC+2, Matt Barry wrote: > > Hi, > > I'm creating a model from an external database that has some encrypted

django: creating tag groups

2013-01-14 Thread Sammael
*The models* class TagGroup(models.Model): name = models.SlugField(max_length=50, unique=True, db_index=True) class Tag(models.Model): name = models.SlugField(max_length=50, unique=True, db_index=True) group = models.ForeignKey(TagGroup) def __unicode__(sel

creating tag groups

2013-01-14 Thread Sammael
*The models* class TagGroup(models.Model): name = models.SlugField(max_length=50, unique=True, db_index=True) class Tag(models.Model): name = models.SlugField(max_length=50, unique=True, db_index=True) group = models.ForeignKey(TagGroup) def __unicode__(s

Re: "Principle of least privilege" in accessing a DB from an app

2013-01-14 Thread Tom Evans
On Sun, Jan 13, 2013 at 5:05 PM, Isaac Perez wrote: > Hi guys, > > I'm creating a new app and I'd like to know how would be the best way to > implement the principle of least privilege. > At the moment the DB has 5 users: > > 1 is the root user for the DB (which I don't want it to be used by the >

Re: Newbie: problems searching a model's field from a template

2013-01-14 Thread Daniel Roseman
On Monday, 14 January 2013 10:44:06 UTC, joy wrote: > it's the first time i try using the model property so probably i'm doing > something wrong. > This is the model file: > > from django.db import models > > # Create your models here. > > class Pop(models.Model): > name = models.CharField(ma

Re: Best way to upload and resize image?

2013-01-14 Thread frocco
Thank you On Sunday, January 13, 2013 10:38:32 PM UTC-5, frocco wrote: > > Hi All, > In the admin, I am using imageField to upload an image. > I install PIL and am overriding the save to create a thumbnail. > The problem I am having is the original upload is resized. > I want to keep the original

Newbie: problems searching a model's field from a template

2013-01-14 Thread joy
it's the first time i try using the model property so probably i'm doing something wrong. This is the model file: from django.db import models # Create your models here. class Pop(models.Model): name = models.CharField(max_length=10) content = models.TextField(blank=True, null=True)

imagefield

2013-01-14 Thread Randa Hisham
how to hide tag change and currently from imagefield and show only fileinput and imageurl -- Randa Hesham Software Developer Twitter:@ro0oraa FaceBook:Randa Hisham ٍ -- You received this message because you are subscribed to

Re: Django/Python vs Grails/Groovy

2013-01-14 Thread Tom Christie
I'm not in a position to draw a comparison between the Grails and Django, but I would say that Django's package ecosystem, and in particular for your use case it's API frameworks, are really rather great. Again, I've no idea how Grails compares, but Django TastyPie and

Re: What's your opinion about nested apps?

2013-01-14 Thread David Medina
I suspect that too, but I don't know how and when. In fact, I prefer the simple approach of all apps in the same scope, but I'd to know how this "feature" works because it seems to work like usual top-apps, and why it isn't documented. I open this discussion because I want to know if there are

Re: "Principle of least privilege" in accessing a DB from an app

2013-01-14 Thread Isaac Perez
Hi Dennis, yes, we are going to filter the input and the parameterized queries. But I always prefer to have more than one layer of security. And users won't be using any sql queries, they will just input text. Does the django configuration always need to have full access to the DB? Thanks, Isaac

Re: [ANNOUNCE] Django 1.5 release candidate available

2013-01-14 Thread victoria
It took us a while in BitNami...but you can already find the installers, virtual appliances and cloud images for Django 1.5c1 in http://bitnami.org/stack/django. Also mention that the Cloud images for Django 1.4.3 are now also available for Microsoft Azure Cloud. You can learn more about how to lau

Re: ANN: Portable Python 2.7.3.2 released

2013-01-14 Thread Derek
Thanks Perica The download links on the page you refer to all point to ".exe" files. Where are the installers for Linux-based systems? (Python is a cross-platform tool). Thanks Derek On Saturday, 12 January 2013 15:25:43 UTC+2, Perica Zivkovic wrote: > > Dear people, > > I would like to ann