Re: Best ways and common practices to lock the Database before a new deploy

2013-02-21 Thread Jani Tiainen
21.2.2013 18:02, Santiago Basulto kirjoitti: Hello guys, we've our app that's working awesome. We do a new release each week. We've set up a nice deployment process using fabric and everything works great. The problem is that, as the application grows, it takes some time to perform the deploy.

Re: ask : Make a second-level auth

2013-02-21 Thread Bino Oetomo
Respond to my own post Password encryption is fix, But authentication result different between sheel and we. I Post the problem at https://groups.google.com/group/django-users/browse_thread/thread/d3c508ce2a0f2dec -- You received this message because you are subscribed to the Google Groups

dual AUTHENTICATION_BACKENDS

2013-02-21 Thread Bino Oetomo
Dear All Background: at https://groups.google.com/group/django-users/browse_thread/thread/df70d373f3285e97# Now, the password encyption problem is fixed i put this line on my setting ---START-- AUTHENTICATION_BACKENDS = ('l2auth.backends.L2Backend',

Re: can someone rewrite this line please

2013-02-21 Thread Mark Furbee
No worries, Mike. Any time! On Thu, Feb 21, 2013 at 3:17 AM, MikeKJ wrote: > Thank you Mark spot on! > > Really appreciate it > > > > > > On Wednesday, February 20, 2013 3:58:28 PM UTC, Mark wrote: > >> Not sure if you need the json.large to be compiled or if that

Re: Easiest Way to Deploy Django?

2013-02-21 Thread Russell Keith-Magee
On Fri, Feb 22, 2013 at 5:58 AM, Peter wrote: > I've a new Django user who went through the tutorial and built a few very > simple apps (e.g. a Craigslist app) using SqlLite for my database. > > Can someone advise on what's the best way to deploy a simple Django app? >

Re: HTML5 Offline apps with Django 1.4

2013-02-21 Thread Russell Keith-Magee
On Thu, Feb 21, 2013 at 3:38 PM, Ranjith Chaz wrote: > Trying to implement *offline** *feature of *HTML5*. Deployed in * > apache2.2* with mod_wsgi plugin. > It works as expected (i.e., loads the cached page when offline) in chrome, > Opera (using window.openDatabase) and

Easiest Way to Deploy Django?

2013-02-21 Thread Peter
I've a new Django user who went through the tutorial and built a few very simple apps (e.g. a Craigslist app) using SqlLite for my database. Can someone advise on what's the best way to deploy a simple Django app? I'm aware of Heroku's Django tutorial but am not yet familiar with how to use

Re: Manually added foreign key not working.

2013-02-21 Thread Josh Cartmell
Can you look at the database in some way and see if FK_Formats_id actually exists in the table? If you added that to the model after you had already synced it then running another syncdb will not create the new field. I would suggest looking into South which will handle database migrations for

Re: url pattern correct but not working

2013-02-21 Thread Arnold Krille
On Thu, 21 Feb 2013 15:41:12 -0500 Bill Freeman wrote: > Not quite right either, even if it didn't have the non matched open > parenthesis after the carat, since it would match > "foo-bar--1234.html". > > Perhaps '^(?:[a-zA-Z0-9]+-)+(?P\d+).html$' > > (?:...) is a

Re: url pattern correct but not working

2013-02-21 Thread Bill Freeman
Not quite right either, even if it didn't have the non matched open parenthesis after the carat, since it would match "foo-bar--1234.html". Perhaps '^(?:[a-zA-Z0-9]+-)+(?P\d+).html$' (?:...) is a non-capturing group, if you're not familiar with it. Bill On Thu, Feb 21, 2013 at 3:05 PM, Arnold

Re: url pattern correct but not working

2013-02-21 Thread Arnold Krille
On Thu, 21 Feb 2013 10:46:05 -0800 (PST) Aswani Kumar wrote: > my url pattern > > [a-zA-Z0-9]-(?P\d+).html > > urls will be like > > news-in-finland-yesterday-festival-3456.html > > i want 3456 which is news id. > > the regex is correct but not working if i keep it in

Re: url pattern correct but not working

2013-02-21 Thread James Schneider
The regex you are using will only match a SINGLE letter or number, followed by a dash, and then the nid. I'm betting it will work if you have a url like a-2355.html. Check out this SO post, it's pretty much identical to what you are looking for:

Re: url pattern correct but not working

2013-02-21 Thread Joel Goldstick
On Thu, Feb 21, 2013 at 1:46 PM, Aswani Kumar wrote: > my url pattern > > [a-zA-Z0-9]-(?P\d+).html > > urls will be like > > news-in-finland-yesterday-festival-3456.html > > i want 3456 which is news id. > > the regex is correct but not working if i keep it in urls. >

url pattern correct but not working

2013-02-21 Thread Aswani Kumar
my url pattern [a-zA-Z0-9]-(?P\d+).html urls will be like news-in-finland-yesterday-festival-3456.html i want 3456 which is news id. the regex is correct but not working if i keep it in urls. url('^[a-zA-Z0-9]-(?P\d+).html$', 'tempa'), please help... -- You received this message because

Re: IRC freenode channel

2013-02-21 Thread yati sagade
Hi Ankit It looks like #django requires your nick to be identified with freenode. Type this command in your IRC client to get started: "/msg NickServ help register" (without the quotes, of course) Regards On Thu, Feb 21, 2013 at 5:57 PM, ANKIT BAGARIA wrote: > Why is

tornado server in production

2013-02-21 Thread kase
now whit django 1.4 is beary easy to run tornado server. import os import tornado.httpserver import tornado.ioloop import tornado.wsgi import sys import django.core.handlers.wsgi #sys.path.append('/home/lawgon/') # path to your project ( if you have it in another dir). def main():

Best ways and common practices to lock the Database before a new deploy

2013-02-21 Thread Santiago Basulto
Hello guys, we've our app that's working awesome. We do a new release each week. We've set up a nice deployment process using fabric and everything works great. The problem is that, as the application grows, it takes some time to perform the deploy. And we're using South, so sometimes we need to

Re: django 1.4.3 to 1.4.4 upgrade fails - Bad magic number Import Error

2013-02-21 Thread Martin J. Laubach
> > return getpass.getuser().decode(locale.getdefaultlocale()[1]) > TypeError: decode() argument 1 must be string, not None > It needs a valid locale to be set in the environment. Try setting LC_ALL=en_US before running syncdb. mjl -- You received this message because you are

Re: How to install Django 1.4.5 in python 3.2.3?

2013-02-21 Thread Karen Tracey
You don't. Python 3 support comes with Django 1.5, it's not available with 1.4.x. Karen -- 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 to

How to install Django 1.4.5 in python 3.2.3?

2013-02-21 Thread rilou007
-- 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 to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com.

Re: django 1.4.3 to 1.4.4 upgrade fails - Bad magic number Import Error

2013-02-21 Thread lucien
Hi, I have done that: python ./manage.py shell >>> from django.contrib.auth.models import User >>> user = User.objects.create_user(username='foo', email="", password="") >>> user.is_superuser=True >>> user.save >>> user.get_all_permissions() Thanks, Lucien Le

Re: session is not expiring

2013-02-21 Thread Jani Tiainen
I'm not sure but I think if you have background processes on and running in Chrome it doesn't actually ever close browser. Excerpt from : "Under advanced settings I unchecked 'Continue running background apps

Re: django 1.4.3 to 1.4.4 upgrade fails - Bad magic number Import Error

2013-02-21 Thread Bill Freeman
One workaround would be to forgo creation at syncdb time and use the manage.py shell to create a user, set its superuser boolean, and save it. On Thu, Feb 21, 2013 at 9:40 AM, lucien wrote: > Hi, > > Thanks for your quick answer, I removed the 1.4.4 version and it works

Re: django 1.4.3 to 1.4.4 upgrade fails - Bad magic number Import Error

2013-02-21 Thread lucien
Hi, Thanks for your quick answer, I removed the 1.4.4 version and it works but when I answer yes to define sperusers I got an error, is there any workaround to create a superuser ? You just installed Django's auth system, which means you don't have any superusers defined. Would you like to

Re: django 1.4.3 to 1.4.4 upgrade fails - Bad magic number Import Error

2013-02-21 Thread Karen Tracey
On Thu, Feb 21, 2013 at 9:09 AM, lucien wrote: > Hi, > > I tried the 1.4.5 because I got the same error with ubuntu and postgres > Do you have any idea? > Did you remove the 1.4.4 install before installing 1.4.5? -- You received this message because you are subscribed

Re: django 1.4.3 to 1.4.4 upgrade fails - Bad magic number Import Error

2013-02-21 Thread lucien
Hi, I tried the 1.4.5 because I got the same error with ubuntu and postgres Do you have any idea? Regards, Lucien python -c "import django; print(django.get_version())" 1.4.5 python manage.py syncdb Traceback (most recent call last): File "manage.py", line 10, in

session is not expiring

2013-02-21 Thread Aswani Kumar
i set file based sessions and the sessions are not expiring even after closing browser. its the issues in chrome but firefox is good. how can i fix it. here is my config MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware',

Re: understand the run_validators function.

2013-02-21 Thread Sergiy Khohlov
form is valid if all field pass validator Many thanks, Serge +380 636150445 skype: skhohlov On Thu, Feb 21, 2013 at 2:30 PM, ANKIT BAGARIA wrote: > i am not able to understand the code of run_validators() function in > fields.py file under forms folder. Someone

HTML5 Offline apps with Django 1.4

2013-02-21 Thread Ranjith Chaz
Trying to implement *offline** *feature of *HTML5*. Deployed in *apache2.2*with mod_wsgi plugin. It works as expected (i.e., loads the cached page when offline) in chrome, Opera (using window.openDatabase) and other desktop browsers. However it doesn't work in Android 2.x, iPhone default

understand the run_validators function.

2013-02-21 Thread ANKIT BAGARIA
i am not able to understand the code of run_validators() function in fields.py file under forms folder. Someone please help. -- 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

IRC freenode channel

2013-02-21 Thread ANKIT BAGARIA
Why is it that when ever I am not able to open django's channel on irc.freenode.net.. Please help. Thankyou. -- 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 to

Re: Defining a different name for the key field in ForeignKey

2013-02-21 Thread Daniel Roseman
On Thursday, 21 February 2013 10:20:01 UTC, Vittorio wrote: > I'm working on a legacy mysql db (under Mac OS X with Django 1.4.3) whose > structure I cannot modify because other applications are already happily > referring to it (FileMaker pro, PHP,etc.). > After issuing the 'python manage.py

Re: can someone rewrite this line please

2013-02-21 Thread MikeKJ
Thank you Mark spot on! Really appreciate it On Wednesday, February 20, 2013 3:58:28 PM UTC, Mark wrote: > > Not sure if you need the json.large to be compiled or if that should be > part of the string. The biggest issue was you had a single-quote before > onmouseover. After that, you have

Re: comment templates

2013-02-21 Thread Pankaj Singh
> > so this means enabling the comment app will not render comments > anywhere and developer needs to manually choose to include it in page > templates Yes. Sincerely, Pankaj Singh http://about.me/psjinx On Thu, Feb 21, 2013 at 3:38 PM, yakoub abaya wrote: > > thank

ask : Make a second-level auth

2013-02-21 Thread Bino Oetomo
Dear All. I try to write what I call as 'l2auth' or '2nd Level Auth' it's : 1. because my application will be co-use by some 'company' 2. because I want to delegate user administration to each company 3. I want user login with username format as user@company (it is not an email) 4. Basically a

Defining a different name for the key field in ForeignKey

2013-02-21 Thread Vittorio
I'm working on a legacy mysql db (under Mac OS X with Django 1.4.3) whose structure I cannot modify because other applications are already happily referring to it (FileMaker pro, PHP,etc.). After issuing the 'python manage.py inspectdb' I created the first tentative models.py that I'm now

Re: comment templates

2013-02-21 Thread yakoub abaya
thank you, so this means enabling the comment app will not render comments anywhere and developer needs to manually choose to include it in page templates On Thursday, February 21, 2013 11:54:34 AM UTC+2, psjinx wrote: > > Hey, > > From Django Docs ( >

Re: comment templates

2013-02-21 Thread Pankaj Singh
Hey, >From Django Docs ( https://docs.djangoproject.com/en/1.4/ref/contrib/comments/#quickly-rendering-a-comment-list ) The easiest way to display a list of comments for some object is by using

comment templates

2013-02-21 Thread yakoub abaya
can someone please explain where and how this template : django/contrib/comments/templates/comments/list.html gets rendered into the main page html template ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Re: django 1.4.3 to 1.4.4 upgrade fails - Bad magic number Import Error

2013-02-21 Thread Xavier Ordoquy
Hi, You should consider upgrading to 1.4.5 which fixes that issue. Best regards, Xavier Le 21 févr. 2013 à 09:00, Frank Bieniek a écrit : > Hi, > we are using jenkins to build our django stack, > we changed the django version from 1.4.3 to 1.4.4. > this

django 1.4.3 to 1.4.4 upgrade fails - Bad magic number Import Error

2013-02-21 Thread Frank Bieniek
Hi, we are using jenkins to build our django stack, we changed the django version from 1.4.3 to 1.4.4. this results in a ImportError: Bad magic number in /x86build/dpp/opt/django-auth-venv/lib/python2.5/site-packages/django/contrib/sessions/management/__init__.pyc Even deleting all pyc files