Re: Django app and Amazon AWS (beginner)

2011-03-16 Thread Venkatraman S
On Thu, Mar 17, 2011 at 12:21 AM, Nate Aune wrote: > > If you want to get your Django app deployed up on Amazon's infrastructure > and don't want to mess around with config files and servers, I invite you to > try out our DjangoZoom service which is built on top of Amazon's

Re: Django Deploy Updates App.

2011-03-16 Thread Mike Dewhirst
Matteius Check Ryan Kelly's esky - http://pypi.python.org/pypi/esky This is for "frozen" python apps but the principle you describe is central to esky. Mike On 17/03/2011 1:36pm, Matteius wrote: One of the things I've considered lately that I would like for my Django project is a Word

Django Deploy Updates App.

2011-03-16 Thread Matteius
One of the things I've considered lately that I would like for my Django project is a Word Press like internal update tool. Something that would tie into the contrib admin and work to update the app from either a repository or a deployment file. This tool app would need to add new files, update

About using Django Auth with my app, Auto saving the User

2011-03-16 Thread AJ
I have a model like this: class Post (models.Model): name = models.CharField(max_length=1000, help_text="required, name of the post") description = models.TextField(blank=True) custom_hashed_url = models.CharField(unique=True, max_length=1000, editable=False) def save(self, *args,

Re: Format DateTimeField of a model

2011-03-16 Thread Vinicius Massuchetto
2011/3/16 Daniel Roseman : > On Wednesday, March 16, 2011 5:37:23 PM UTC, Vinicius Massuchetto wrote: >> >> I want to customize the DateTimeField returned in an admin list >> column. I know there's the DATETIME_FORMAT setting, but I only want to >> change in one model. I'lm

Decoupling shopping cart from checkout

2011-03-16 Thread Micah Carrick
I have a Django app for a shopping cart, and another for checkout (checkout form, payment gateway, order processing). I would really like for these to be completely decoupled but am having a hard time coming up with a solution that gives me a warm fuzzy feeling. Here is a simplification:

Re: automatically create user profile on user creation

2011-03-16 Thread shantp
Check out this blog post for a one line solution to the same problem. http://www.turnkeylinux.org/blog/django-profile On Mar 16, 11:54 am, Ori Livneh wrote: > Hi guys, > > The Django docs explain that "the method get_profile() does not create the > profile, if it does not

Re: How to format the "value" attribute of an option in a Select List using the template language for loop

2011-03-16 Thread werefr0g
Well... here is the lin (right into the relevant section) : http://docs.djangoproject.com/en/dev/ref/templates/builtins/#for -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To

Re: How to format the "value" attribute of an option in a Select List using the template language for loop

2011-03-16 Thread werefr0g
Sorry again, Actually, the doc tell us the way [1]. Simply use {{ forloop.counter }} or {{ forloop.counter0 }}. Regards, -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To

Re: How to format the "value" attribute of an option in a Select List using the template language for loop

2011-03-16 Thread werefr0g
Hi, You'll probably need to prepare the "options" in your view; with enumerate(), for example (paginator may be a little too much, sorry). Regards, [1] http://docs.python.org/library/functions.html#enumerate Le 16/03/2011 04:18, Juan Gabriel Aldana Jaramillo a écrit : Hi, Check this

Re: Mingus vs Zinnia

2011-03-16 Thread Nate Aune
We're using Zinnia for http://djangozoom.com/blog and it's working pretty well. We wanted to embed Youtube videos and TinyMCE was stripping out the tags, so we had to override the .js to get TinyMCE to allow the iframe tags. Nate -- You received this message because you are subscribed to

natural keys for auth.user and group

2011-03-16 Thread Rainy
Hi, I know natural keys possibly will be added to auth.user and group in 1.4. I'm using 1.2 currently and I'm trying to add them dynamically: class UserManager(models.Manager): def get_by_natural_key(self, username, first_name): return self.get(username=username,

user confused with select_related and a one_to_one field

2011-03-16 Thread Sells, Fred
I'm using python 2.4 and django 1.2.4 with MySQL 5.0 FWIW I have the following models (code deleted to simplify) class Message(models.Model): facility= models.CharField(max_length=2, null=True, blank=True) msgtype = models.CharField(max_length=3) class Pv(models.Model):

RE: using Django from cron

2011-03-16 Thread Sells, Fred
Thanks to all who responded and especially Shawn who said much the same thing in a way I could grasp. ... import os os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' >From the docs: http://docs.djangoproject.com/en/dev/topics/settings/ Shawn -- You received this message because you

Re: permissions don't get added

2011-03-16 Thread tom
hey tom, thanks for pointing me to that error. Have looked at it for a while, but haven't recognized the obvious. it is working now, surprise. :) best regards, tom On 16 Mrz., 16:10, Daniel Roseman wrote: > On Wednesday, March 16, 2011 2:50:05 PM UTC, Tom Evans wrote: >

Re: How i can get username into the error mail?

2011-03-16 Thread emonk
thanks Margie, I already did with the info you gave me Tom. 2011/3/16 Margie Roginski > I found the basics for this by googling around, and I can't remember > where I got it, but thanks to whomever gave me the basics because it > is very useful. Put this in your

Re: How i can get username into the error mail?

2011-03-16 Thread emonk
The only one who respone me an good help is Tom Evans. The rest just repeats like a parrot what is in the documentation; please before you say "seach in google" say nothing is better. 2011/3/16 Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> > (last email, as i dont

Re: How i can get username into the error mail?

2011-03-16 Thread Margie Roginski
I found the basics for this by googling around, and I can't remember where I got it, but thanks to whomever gave me the basics because it is very useful. Put this in your middleware and it will make the mail that you receive have the name of the user and their email: class

Re: Help with Apache/Nginx combo

2011-03-16 Thread Nate Aune
You might want to try Nginx proxying to Gunicorn. This is what we use for DjangoZoom and it works really well. Pretty easy to set up as well. Here are a few resources that provide instructions for how to set it up: http://www.rkblog.rk.edu.pl/w/p/deploying-django-project-gunicorn-and-nginx/

Re: How i can get username into the error mail?

2011-03-16 Thread Cal Leeming [Simplicity Media Ltd]
(last email, as i dont want to drag this out any more) I don't mean it in a nasty way, but I'm so sick and tired of lazy developers. Solving problems should be one of the best percs of the job for a coder. If this was something really complex, then I'd understand, but it's not. This is a *very*

automatically create user profile on user creation

2011-03-16 Thread Ori Livneh
Hi guys, The Django docs explain that "the method get_profile() does not create the profile, if it does not exist. You need to register a handler for the signal django.db.models.signals.post_save on the User model, and, in the handler, if created=True, create the associated user profile."

Re: How i can get username into the error mail?

2011-03-16 Thread Shawn Milochik
On Wed, Mar 16, 2011 at 2:47 PM, emonk wrote: > I'm tired of searching and found many examples of middleware but not the one > I seek > You almost certainly will not find the exact code you need to cut & paste. You need to read the examples you did find and learn something.

Re: Django app and Amazon AWS (beginner)

2011-03-16 Thread Nate Aune
Hi Nai, It takes some tinkering to get a production deployment of a Django app working well. One of the founders of Django, Jacob Kaplan Moss, presented a Django deployment workshop at last year's PyCon. Video: http://pycon.blip.tv/file/3632436/ Code:

Re: How i can get username into the error mail?

2011-03-16 Thread emonk
aamh ok 2011/3/16 Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> > Then this isn't the job for you. Simple. > > On Wed, Mar 16, 2011 at 6:47 PM, emonk wrote: > >> I'm tired of searching and found many examples of middleware but not the >> one I

Re: How i can get username into the error mail?

2011-03-16 Thread Cal Leeming [Simplicity Media Ltd]
Then this isn't the job for you. Simple. On Wed, Mar 16, 2011 at 6:47 PM, emonk wrote: > I'm tired of searching and found many examples of middleware but not the > one I seek > > 2011/3/16 Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> > >

Re: How i can get username into the error mail?

2011-03-16 Thread emonk
Thanks for the answers. topic closed to me 2011/3/16 emonk > I'm tired of searching and found many examples of middleware but not the > one I seek > > 2011/3/16 Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> > > Actually, I've gotta side with

Re: How i can get username into the error mail?

2011-03-16 Thread emonk
I'm tired of searching and found many examples of middleware but not the one I seek 2011/3/16 Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> > Actually, I've gotta side with Shawn on this one. > > There are *TONS* of examples of how to do this, I know this because I >

Re: How i can get username into the error mail?

2011-03-16 Thread Cal Leeming [Simplicity Media Ltd]
Actually, I've gotta side with Shawn on this one. There are *TONS* of examples of how to do this, I know this because I created one and put it on djangosnippets. :S If two people are telling you there are answers on Google, then trust me, there are. If you can't find them, then perhaps this

Re: Problem with DECIMAL_SEPARATOR

2011-03-16 Thread emonk
I think DECIMAL_SEPARATOR = ',' wasnt neccesary when USE_L10N=True 2011/3/16 Siara > Thx for help, > DECIMAL_SEPARATOR = ',' wasnt neccesary when USE_L10N=False cause its > default delimeter > On 15 Mar, 20:07, emonk wrote: > > try this in

Re: How i can get username into the error mail?

2011-03-16 Thread emonk
I repeat, i dont have found (in all entire internet) midlleware classes about email error. Thanks, dont need to be a troll :) 2011/3/16 Shawn Milochik > On Wed, Mar 16, 2011 at 1:16 PM, emonk wrote: > > Yep, but i need an example and I have not found

Re: How i can get username into the error mail?

2011-03-16 Thread Shawn Milochik
On Wed, Mar 16, 2011 at 1:16 PM, emonk wrote: > Yep, but i need an example and I have not found any. > If you haven't found any then you haven't looked. Have you heard of Google? Here are the docs:

Re: Problem with DECIMAL_SEPARATOR

2011-03-16 Thread Siara
Thx for help, DECIMAL_SEPARATOR = ',' wasnt neccesary when USE_L10N=False cause its default delimeter On 15 Mar, 20:07, emonk wrote: > try this in settings.py > > USE_L10N = False > DECIMAL_SEPARATOR = ',' > > 2011/3/15 Siara > > > > > Hi > > I

Re: Django projects, apps, and git repos

2011-03-16 Thread br
Thanks for the feedback. I've looked at git submodules and think that will be a useful tool in django projects that share apps, once I'm comfortable with the submodule functionality & understand how it fits in with my prjoects. And once I get my apps so they actually are in fact "pluggable" (not

Re: Format DateTimeField of a model

2011-03-16 Thread Daniel Roseman
On Wednesday, March 16, 2011 5:37:23 PM UTC, Vinicius Massuchetto wrote: > > I want to customize the DateTimeField returned in an admin list > column. I know there's the DATETIME_FORMAT setting, but I only want to > change in one model. I'lm also using L10N, and couldn't figure out if > there's a

Format DateTimeField of a model

2011-03-16 Thread Vinicius Massuchetto
I want to customize the DateTimeField returned in an admin list column. I know there's the DATETIME_FORMAT setting, but I only want to change in one model. I'lm also using L10N, and couldn't figure out if there's a way to override what's in the default po file for my language. What's the right

Re: How to use extra to count based on the value of a field?

2011-03-16 Thread Jason Culverhouse
On Mar 16, 2011, at 8:49 AM, Margie Roginski wrote: > Hmmm ... so I just got back to trying this and I actually don't think > the annotate call as suggested does what I am looking for. Say I want > to annotate queues with the number of closed tasks. This call: > >

Re: How i can get username into the error mail?

2011-03-16 Thread emonk
Yep, but i need an example and I have not found any. 2011/3/16 Tom Evans > On Tue, Mar 15, 2011 at 6:32 PM, emonk wrote: > > Hi django-users. > > > > I have a django project running in apache2 with mod_wsgi and I need get > the > > username

Re: How to use extra to count based on the value of a field?

2011-03-16 Thread Margie Roginski
Right again! I agree what you are saying works. I tried to take it a step further and OR together two querysets. I was then looking at the results of that OR, and it was not what I expected. One qs had been annotated with num_tasks_open, the other had been annotated with num_tasks_closed. I

Re: file upload size problem

2011-03-16 Thread Michal Petrucha
> > I've set a custom error page for the 413 error when the upload file > > size exceeds the maximum set in apache LimitRequestBody directive (500 > > KB). > > This is working fine for all files upto 3 MB. However when the size > > exceeds this limit, the browser is showing the below message

Screen Fields Rendered Incorrectly

2011-03-16 Thread hank23
I have a new html screen which has fields on it which are not rendering properly as month, day and year fields like this: Month Day Year I have copied much of this code from anothe html screen on which these same fields do render properly. So what might cause them and all of the other

Re: How to use extra to count based on the value of a field?

2011-03-16 Thread Tom Evans
On Wed, Mar 16, 2011 at 3:49 PM, Margie Roginski wrote: > Hmmm ... so I just got back to trying this and I actually don't think > the annotate call as suggested does what I am looking for.  Say I want > to annotate queues with the number of closed tasks. This call: > >

Re: Best Way To Update Multiple Fields In Model

2011-03-16 Thread octopusgrabbus
This seems to fit the bill just fine. DrReadRange.objects.update(reading_width_days=read_range_in) On Mar 16, 9:28 am, octopusgrabbus wrote: > Django 1.2 > mod_wsgi > Python 2.6.6 > > When I create an object of a model of a table, what is the best way to > update two

Re: How to use extra to count based on the value of a field?

2011-03-16 Thread Margie Roginski
Hmmm ... so I just got back to trying this and I actually don't think the annotate call as suggested does what I am looking for. Say I want to annotate queues with the number of closed tasks. This call: Queue.objects.filter(task__status=Task.STATUS_CLOSED).annotate(num_tasks=Count('task'))

How to work with views like classes

2011-03-16 Thread Isaac XxX
Hi folks, Currently i'm getting trouble with a single feature in django. When i've some inheritance in templates, like the following TemplateA TemplateB inherits A TemplateC inherits B TemplateD inherits B If I need to define something depending on provided data in TemplateA or TemplateB,

Re: permissions don't get added

2011-03-16 Thread Daniel Roseman
On Wednesday, March 16, 2011 2:50:05 PM UTC, Tom Evans wrote: > > On Wed, Mar 16, 2011 at 1:28 PM, tom wrote: > > Hello, > > > > I have a model, which was already created within the DB, and I added > > following permissions: > >class META: > > ^^ Django looks for an inner

Re: What do you use to build facebook applications with django?

2011-03-16 Thread OrazioPirataDelloSpazio (Lorenzo)
Hello, I was in your same situation some weeks ago. I checked almost all the django-facebook integration projects and each one of the uses old and not-documented api (facebook recently changed apis, and deprecated other stuff such as fbml in favor of the modern graph api). At the end I gave up.

Re: permissions don't get added

2011-03-16 Thread Tom Evans
On Wed, Mar 16, 2011 at 1:28 PM, tom wrote: > Hello, > > I have a model, which was already created within the DB, and I added > following permissions: >    class META: ^^ Django looks for an inner class named 'Meta', not 'META'. Cheers Tom -- You received this message

What do you use to build facebook applications with django?

2011-03-16 Thread mongoose
Hi, I've been struggling so much trying to get a Facebook app to work on the Django framework. Mostly battling with pyFacebook. For some particular reason the login just doesn't work for me. I've posted some help questions and still come up with nothing. Perhaps the pyFacebook is outdated? But

permissions don't get added

2011-03-16 Thread tom
Hello, I have a model, where I need to add some permissions to the Meta class. I've added the permissions, synched the database, but the permissions do not show up in the database. Therefore I wiped the DB and re-synced it. Still no custom permissions in the DB. This is the code I use: class

Re: Help with Apache/Nginx combo

2011-03-16 Thread maciekjbl
I'm still fighting with this configutarion. What I manage is that I don't have any error's in apache, but media still don't work. I try to use example from lincolnloop and it's fail for me completly. Any help ? On 11 Mar, 20:23, maciekjbl wrote: > Reload, restart and

Optimizing a Postgres query using custom operator classes

2011-03-16 Thread benbeec...@gmail.com
Hey! I'm having some trouble optimizing a query that uses a custom operator class. #Postgres has given me a solution for natural sort - http://www.rhodiumtoad.org.uk/junk/naturalsort.sql I'm trying to run it over a huge table - when running it on demand, the data needs to be dumped to memory and

aggregate produces incorrect sql statement

2011-03-16 Thread zeroos
Hi folks! I have following model: class Solution(models.Model): griddler = models.ForeignKey(Griddler) user = models.ForeignKey(User) user_time = models.IntegerField(null=True) date = models.DateTimeField(auto_now_add=True) class Griddler(models.Model): solved_by =

Best Way To Update Multiple Fields In Model

2011-03-16 Thread octopusgrabbus
Django 1.2 mod_wsgi Python 2.6.6 When I create an object of a model of a table, what is the best way to update two columns? I can update one easily, but not two of them. I also noted the model, does not list the third key, at least that I can recognize. What am I asking is what constructs should

permissions don't get added

2011-03-16 Thread tom
Hello, I have a model, which was already created within the DB, and I added following permissions: class META: permissions = ( ('view_all_projects', 'Can view all projects'), ) verbose_name = _("project") verbose_name_plural = _("projects") When I

Re: Help using internationalization feature

2011-03-16 Thread Andres Lucena
El lun, 14-03-2011 a las 11:45 -0500, Juan Gabriel Aldana Jaramillo escribió: > Thanks for your comprehensive reply. Now everything is clear to me. > Also you should check django-rosetta, it permits translating through an admin like interface, with google translate integration; very nice ;)

Re: Mingus vs Zinnia

2011-03-16 Thread Gabriel - Iulian Dumbrava
I believe, yes. From what I read about it, it's using other apps and it does not create any new models. So, as long as you can extend the other apps, you can extend it. Gabriel On 16 mar., 13:45, Venkatraman S wrote: > On Wed, Mar 16, 2011 at 4:28 PM, Gabriel - Iulian

Re: Fwd: [OT] Django Sprint Weekend

2011-03-16 Thread Kenneth Gonsalves
On Wed, 2011-03-16 at 17:41 +0530, Venkatraman S wrote: > Posting this in django-user - I am from India and would be great if we > have > some local talent in this group who can jam up for a sprint. > Otherwise, if remote members want to help, its *always* possible. it would be a good idea to

Fwd: [OT] Django Sprint Weekend

2011-03-16 Thread Venkatraman S
Posting this in django-user - I am from India and would be great if we have some local talent in this group who can jam up for a sprint. Otherwise, if remote members want to help, its *always* possible. Contact me offline if interested. -- Forwarded message -- From: Venkatraman S

Re: search in docs seem to have some problem

2011-03-16 Thread Kenneth Gonsalves
On Wed, 2011-03-16 at 11:45 +, Tom Evans wrote: > > I am probably mistaken but from the thread I get a feeling that > there is > > not much urgency about it (maybe because of the pending release). > But > > people like me with poor memory *really* need it ;-) > > > > > > It's not like that is

Re: search in docs seem to have some problem

2011-03-16 Thread Tom Evans
On Wed, Mar 16, 2011 at 11:37 AM, Kenneth Gonsalves wrote: > On Wed, 2011-03-16 at 07:21 -0400, Karen Tracey wrote: >> Yes, it's been noted on django-developers: >> >> http://groups.google.com/group/django-developers/browse_thread/thread/41ee450a4687e1d8 >> >> I don't know

Re: Mingus vs Zinnia

2011-03-16 Thread Venkatraman S
On Wed, Mar 16, 2011 at 4:28 PM, Gabriel - Iulian Dumbrava < gabriel.dumbr...@gmail.com> wrote: > I have no experience with Mingus, but from I've seen on their web > site, it is much simpler. > Does 'simpler' also mean 'easy to extend'? -- You received this message because you are subscribed

Re: search in docs seem to have some problem

2011-03-16 Thread Kenneth Gonsalves
On Wed, 2011-03-16 at 07:21 -0400, Karen Tracey wrote: > Yes, it's been noted on django-developers: > > http://groups.google.com/group/django-developers/browse_thread/thread/41ee450a4687e1d8 > > I don't know what the status of fixing it is. I am probably mistaken but from the thread I get a

Re: search in docs seem to have some problem

2011-03-16 Thread Karen Tracey
On Wed, Mar 16, 2011 at 5:13 AM, Kenneth Gonsalves wrote: > hi, > > of late I notice that search in docs using the search on the right hand > side is not getting results or is pointing to the wrong thing. For > example I tried to search for 'objects.create', which I am

Re: Mingus vs Zinnia

2011-03-16 Thread Gabriel - Iulian Dumbrava
Hi, I did work with Zinnia, and I'm very pleased with it. Some cool features: - It's easy to extend and it comes with useful template tags. - Integration with Django CMS - Automatic sitemaps - more, more I have no experience with Mingus, but from I've seen on their web site, it is much simpler.

Re: How i can get username into the error mail?

2011-03-16 Thread Tom Evans
On Tue, Mar 15, 2011 at 6:32 PM, emonk wrote: > Hi django-users. > > I have a django project running in apache2 with  mod_wsgi and I need get the > username logged into the mail error; the user is registered in the same data > base of the project, i mean in the auth_user

search in docs seem to have some problem

2011-03-16 Thread Kenneth Gonsalves
hi, of late I notice that search in docs using the search on the right hand side is not getting results or is pointing to the wrong thing. For example I tried to search for 'objects.create', which I am pretty sure is in the docs, but get 'No results found'. Same thing with 'set.all()' or even

Mingus vs Zinnia

2011-03-16 Thread Venkatraman S
Hi, I see both these projects being quiet noteworthy for their features. Any personal experiences using either of them in your projects that members can share -- mainly +/-'s w.r.t extensibility and maintainability. -Venkat -- You received this message because you are subscribed to the Google