Re: What to Django people have to say about Javascript frameworks to complement Django's philosophy on the front end

2013-04-18 Thread Doug Snyder
Another interesting library just launched is Webbot ( http://www.webbot.ws/Home ). This is actually a python lib intended for django and app engine that lets you write generalized front end UI's using python and has a GUI that helps you build them by generating python for the UI without writing any

Re: models.ManyToManyField

2013-04-18 Thread Federico Erbea
I think it is the first solution that you have proposed, but I can't figure out how to use it. Also, is there a way to make sure that the ID is automatically taken? With a proper publisher for loop I would like all the lists of movies for each actor. This is my urls.py from django.conf.urls.de

Re: models.ManyToManyField

2013-04-18 Thread Federico Erbea
I think it is the first solution that you have proposed, but I can't figure out how to use it. Also, is there a way to make sure that the ID is automatically taken? With a proper publisher for loop I would like all the lists of movies for each actor. This is my urls.py from django.conf.urls.de

Re: What to Django people have to say about Javascript frameworks to complement Django's philosophy on the front end

2013-04-18 Thread Doug Snyder
Sorry, looks like I was wrong about batman. It can work with django, I just forget sometimes that more people watch movies than write web apps. On Thu, Apr 18, 2013 at 3:34 AM, Doug Snyder wrote: > Another interesting library just launched is Webbot ( > http://www.webbot.ws/Home ). This is actu

Re: Help interpreting profiler results (or: why is my app so slow?)

2013-04-18 Thread Tom Evans
On Wed, Apr 17, 2013 at 11:18 PM, Matt Andrews wrote: > Hi all. > > Having performance problems with my Django app. I've posted here before > talking about this: one theory for my slowness woes was that I'm using raw > SQL for everything after getting sick of Django doing things weirdly > (duplica

Re: django-newsletter, cron job not working

2013-04-18 Thread Tom Evans
On Wed, Apr 17, 2013 at 7:38 PM, frocco wrote: > Hello, > > Can someone give me an example of running a cronjob hourly? > I am on webfaction and cannot get this working. > > I tried > > @hourly /usr/local/bin/python2.7 ~/webapps/ntw/myproject/manage.py runjob > submit > > I get no email > > If I S

Re: Help interpreting profiler results (or: why is my app so slow?)

2013-04-18 Thread Matt Andrews
On Thursday, 18 April 2013 10:45:40 UTC+1, Tom Evans wrote: > On Wed, Apr 17, 2013 at 11:18 PM, Matt Andrews > > > wrote: > > Hi all. > > > > Having performance problems with my Django app. I've posted here before > > talking about this: one theory for my slowness woes was that I'm using >

Inheritance question: Multiple roles for users

2013-04-18 Thread M Hill
I've searched this group for threads related to multitable inheritance. The one most similar to my query so far was titled "multiple children in multitable inheritance", from Apr. 2008. Like the original poster, I'd thought of Bar as a possible subclass of Place, which might share the same Pl

Re: models.ManyToManyField

2013-04-18 Thread Gabriel
The first solution works like this: If you create a foreign key from ModelA to ModelB, Django automatically create something like B.modela_set that works just like the objects attribute, but just for the A objects that are related to B, right? That's why you can du stuff like attore.film_set.all()

Re: Help interpreting profiler results (or: why is my app so slow?)

2013-04-18 Thread Shawn Milochik
Yes, it does look like template tags are taking some time. Is the page huge? Are you doing a ton of formatting? Is there something you could maybe move to server-side? Also, this might help with caching bits of your output: On Thu, Apr 18, 2013 at 6:17 AM, Matt Andrews wrote: > > On Thursday,

Re: Help interpreting profiler results (or: why is my app so slow?)

2013-04-18 Thread Shawn Milochik
Hit send too soon: https://docs.djangoproject.com/en/dev/topics/cache/#template-fragment-caching On Thu, Apr 18, 2013 at 8:39 AM, Shawn Milochik wrote: > Yes, it does look like template tags are taking some time. Is the page > huge? Are you doing a ton of formatting? Is there something you cou

Error "Table 'django_comments' doesn't exist" - only in apache2 not in dev-server

2013-04-18 Thread Michael Muster
Hi, a few days ago i decided to stop using the django-comments framework, i removed the entry from settings.py and deleted the tables in my database. Now if i want to delete an user via the admin interface i get an error in my apache/error log (see below) The strange thing is, if i'm using the

Re: Inheritance question: Multiple roles for users

2013-04-18 Thread Tom Evans
On Thu, Apr 18, 2013 at 5:11 AM, M Hill wrote: > I've searched this group for threads related to multitable inheritance. The > one most similar to my query so far was titled "multiple children in > multitable inheritance", from Apr. 2008. Like the original poster, I'd > thought of Bar as a possi

Re: django-newsletter, cron job not working

2013-04-18 Thread Shawn Milochik
Here's an example of something taken straight from my crontab from a WebFaction account: 44 * * * * cd ~/webapps/awstats_milocast;./update_awstats.sh This runs on minute 44 of every hour. There are five "time" parameters. The first one is "minute." If you set a number there, it'll run on that min

How to view your translated site?

2013-04-18 Thread Cody Scott
I am trying to view my site in japanese. I have create the translations and compiled them with compilemessages. In my urls.py I have urlpatterns = i18n_patterns('', #...) Settings.py LANGUAGE_CODE = 'en-us' #Used for translationsgettext = lambda s: sLANGUAGES = ( ('en', gettext('Eng

Re: How to view your translated site?

2013-04-18 Thread Tom Evans
On Thu, Apr 18, 2013 at 4:42 PM, Cody Scott wrote: > I am trying to view my site in japanese. I have create the translations and > compiled them with compilemessages. > > In my urls.py I have > > urlpatterns = i18n_patterns('', > #... > ) > > > Settings.py > > > LANGUAGE_CODE = 'en-us' > > #Us

Re: How to view your translated site?

2013-04-18 Thread Cody Scott
Thanks, I went here http://www.i18nguy.com/unicode/language-identifiers.html ctrl+ f "japanese" saw jp on the left hand side. I thought ja was a localization of jp so it would be jp-ja. On Thursday, 18 April 2013 11:42:37 UTC-4, Cody Scott wrote: > > I am trying to view my site in japanese. I h

Re: How to view your translated site?

2013-04-18 Thread Tom Evans
On Thu, Apr 18, 2013 at 5:23 PM, Cody Scott wrote: > Thanks, I went here http://www.i18nguy.com/unicode/language-identifiers.html > ctrl+ f "japanese" saw jp on the left hand side. I thought ja was a > localization of jp so it would be jp-ja. > The columns listed on that page are "region code", "

Re: How to view your translated site?

2013-04-18 Thread Cody Scott
I agree that link is much better, I got the other one from settings.py On Thu, Apr 18, 2013 at 12:41 PM, Tom Evans wrote: > On Thu, Apr 18, 2013 at 5:23 PM, Cody Scott > wrote: > > Thanks, I went here > http://www.i18nguy.com/unicode/language-identifiers.html > > ctrl+ f "japanese" saw jp on th

Re: Error "Table 'django_comments' doesn't exist" - only in apache2 not in dev-server

2013-04-18 Thread Richard Jelte
There are a lot of different places where that can be coming from (anywhere that's trying to import django_comments for example). Try doing an ack-grep in your repo for any mention of django_comments that you might have missed when you were removing the app. On Thursday, April 18, 2013 7:17:07

How to check for a specific field change in a model?

2013-04-18 Thread deepankar bajpeyi
I have my models.py : class Hotel(models.Model): name = models.CharField(max_length=20) currency = models.ForeignKey(Currency) class Currency(models.Mode): code = models.CharField(max_length=3) name = models.CharField(max_length=10) Whenever the currency field in hotel is chang

How to check for a specific field change in a model?

2013-04-18 Thread deepankar bajpeyi
> > I have my models.py : > > class Hotel(models.Model): > name = models.CharField(max_length=20) > currency = models.ForeignKey(Currency) > > class Currency(models.Mode): > code = models.CharField(max_length=3) > name = models.CharField(max_length=10) > > > Whenever the currency field in hotel

Random translation text showing up while the rest is not translated.

2013-04-18 Thread Cody Scott
I have marked text for translation, and also database content with the dbgettext mdoule. So I do: syncdb add some content dbgettext_export makemessages -l ja add all of the translations compilemessages Then I change the /en/ to /ja/ to see the page in Japanese, but only two things are transl

Re: Pickling of dinamically created models.Model subclasses: "attribute lookup failed", django 1.5

2013-04-18 Thread Greg H
Running into a similar issue on my own project, seems to be when you try an cache a model which has a related model which in turn has a many to many field. So for example, I have an instance of a Student, which has a ForeignKey to Book, which in turn has a ManyToMany to Author. If I try and cac

Re: Error "Table 'django_comments' doesn't exist" - only in apache2 not in dev-server

2013-04-18 Thread Michael Muster
On Thursday 18 April 2013 10:21:35 Richard Jelte wrote: > There are a lot of different places where that can be coming from (anywhere > that's trying to import django_comments for example). > > Try doing an ack-grep in your repo for any mention of django_comments that > you might have missed when

Re: Error "Table 'django_comments' doesn't exist" - only in apache2 not in dev-server

2013-04-18 Thread Michael Muster
On Thursday 18 April 2013 22:04:11 Michael Muster wrote: > Hi, > > I don`t know what ack-grep does, but i think > > find . -type f | grep django_comments > > should be something similar. Sorry, this should be: find . -type f -exec grep -l "django_comments" {} + I removed one

Re: Error "Table 'django_comments' doesn't exist" - only in apache2 not in dev-server

2013-04-18 Thread Michael Muster
Sorry for spamming, but after removing another entry from views.py and restarting apache it works, Thanks for your help! On Thursday 18 April 2013 22:26:10 Michael Muster wrote: > On Thursday 18 April 2013 22:04:11 Michael Muster wrote: > > Hi, > > > > I don`t know what ack-grep does, but i t

Re: Help interpreting profiler results (or: why is my app so slow?)

2013-04-18 Thread Matt Andrews
I wouldn't say huge (see the page/view in question at http://www.scenepointblank.com) -- I grab a bunch of things and then display them, mostly truncated (with HTML stripped out, usually for the homepage). The custom template tags take a bunch of arguments (say for a news post, it takes argumen

Re: Pickling of dinamically created models.Model subclasses: "attribute lookup failed", django 1.5

2013-04-18 Thread akaariai
On 18 huhti, 22:07, Greg H wrote: > Running into a similar issue on my own project, seems to be when you try an > cache a model which has a related model which in turn has a many to many > field. So for example, I have an instance of a Student, which has a > ForeignKey to Book, which in turn has a

Re: How to check for a specific field change in a model?

2013-04-18 Thread akaariai
On 18 huhti, 20:34, deepankar bajpeyi wrote: > I have my models.py : > > class Hotel(models.Model): >     name = models.CharField(max_length=20) >     currency = models.ForeignKey(Currency) > > class Currency(models.Mode): >     code = models.CharField(max_length=3) >     name = models.CharField(m

Re: How to check for a specific field change in a model?

2013-04-18 Thread Lachlan Musicman
There is actually, via a third party app that makes it all dead simple, it's called django-model-utils and is available here: https://github.com/carljm/django-model-utils Credit where it's due, I discovered this wonderful module via PyDanny and Audrey's Two Scoops book. Cheers L. On 19 April 20

Re: Inheritance question: Multiple roles for users

2013-04-18 Thread M Hill
> > Model inheritance is not the same as object inheritance. > > If you are doing non abstract inheritance, then there is no difference > between a derived model, and a model that has a foreign key to the > parent class. In a derived model, the foreign key is a OneToOneField, > with null=False

Fixtures and non-ascii data error reporting bug

2013-04-18 Thread Колпаков Евгений
Hi everybody. I have a UTF-8 encoded fixture (initial_data.yaml, but I think it's irrelevant) that contains some data to create auth.Group models. The names of models are non-ascii characters. Syncdb and loaddata works smoothly, so it's *not* a question "my non-ascii data is not loading". The

IDE to practice django template language

2013-04-18 Thread Srinivasa Rao
Hi, I am new to this djnago, can you suggest any development environment to practice template language. thanks,Srini -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: IDE to practice django template language

2013-04-18 Thread Apokalyptica Painkiller
Now i'm using this: http://ninja-ide.org/. I don't know if this is what you need, but why don't you try it. See you 2013/4/18 Srinivasa Rao > Hi, I am new to this djnago, can you suggest any > development environment to practice template language. thanks,Srini > > -- > You received this messag

Django + Bamboo

2013-04-18 Thread Daniel França
Anyone has any experience configuring Django with Bamboo for deployment and tests? I'm trying to setup an environment, but there's not much about how to make this work. What's is the best approach? cloud or local server? Is it better to work with simple bash scripts or you recommend some other too

Re: Django + Bamboo

2013-04-18 Thread Sultan Imanhodjaev
We had some experience of using Bamboo for deployment of our project. We didn't have rollback setup so once instead of deploying on staging server we accidentally deployed on production server, though we cancelled deployment process was not killed by Bamboo and been running in the background. Produ