Re: manage.py and django-admin.py help

2013-03-01 Thread Russell Keith-Magee
On Thu, Feb 28, 2013 at 8:48 AM, Clientkill wrote: > this is the most confusing process I've ever done. I wish the django IRC > channel was open > > Django's IRC channel *is* open. However, you have to use a registered nickname -- you can't just join the channel. Registering your nickname costs

how to tricking LogEntry model ?

2013-03-01 Thread Bino Oetomo
Dear All .. I Try to write a custom auth backend. It'll use external user model/table, let's call it 'myuser' With this scenario, the LogEntry will receive a user_id that not exist in default User model. So it will generate exception. I read that we can do a 'pre_save' signal receiver for LogEnt

Re: Converting Django app into a Desktop app

2013-03-01 Thread Kevin London
@Loai, how did Pyinstaller work out for you? Is that the route you took? On Thursday, December 20, 2012 10:20:31 PM UTC-8, Loai Ghoraba wrote: > > @Filib: thanks a lot, seems that is what I will need exactly :) > > On Fri, Dec 21, 2012 at 1:37 AM, Mike Dewhirst > > > wrote: > >> See also >> htt

os.system() is not working in django while working on server centos

2013-03-01 Thread JAI PRAKASH SINGH
import sys,os sys.stderr = open('/dev/null') import paramiko sys.stderr = sys.__stderr__ os.system("echo \'s3\' >> myfile.txt ") #debug first in ssh2 def ssh2_connect(host, user, pswd, port=22): try: ssh = paramiko.SSHClient() ssh.load_system_host_keys() ssh.set_missin

Ordering a QuerySet based on a latest child models field

2013-03-01 Thread Sven Grunewaldt
Lets assume I want to show a list of runners ordered by their latest sprint time. class Runner(models.Model): name = models.CharField(max_length=255) class Sprint(models.Model): runner = models.ForeignKey(Runner) time = models.PositiveIntegerField() created = models.DateTimeFie

Test database not auto-flushing

2013-03-01 Thread Matt
I have a bunch of unit test files, all of which consist of django.test.TestCase classes. Wrote myself a little shell script to uncomment/comment test file imports in my __init__.py file, so I can run tests from certain test files, based off the command line arguments I give it. I am also abl

how to create formset field but not used loop in template

2013-03-01 Thread Witold Greń
When i create formset in template i must used loop "for": {{ formset_create_company.management_form }} {% for form in formset_create_company.forms %} {{ form.postal_code.label }} {{ form.postal_code }} {{ form.city.label

Re: Problem UserAdmin with GenericStackedInline in Django 1.5c2

2013-03-01 Thread Witold Greń
Hm.. I am not extending User Model. I lost one class, this is real example: Create APPs: core SETTINGS: #Django 1.5 AUTH_USER_MODEL = 'core.Partners' MODELS: # -*- coding: utf-8 -*- from django.db import models from django.contrib.contenttypes.models import ContentType from django.contr

Re: how to create formset field but not used loop in template

2013-03-01 Thread Daniel Roseman
On Friday, 1 March 2013 11:43:22 UTC, Witold Greń wrote: > > When i create formset in template i must used loop "for": > > > > How to create field but not used loop "for"? eg. {{ > formset_create_company.form.no_house }}?? > Can you explain why you don't want to use for? Seems perfectly sensib

Re: os.system() is not working in django while working on server centos

2013-03-01 Thread Tom Evans
On Fri, Mar 1, 2013 at 11:29 AM, JAI PRAKASH SINGH wrote: > import sys,os > sys.stderr = open('/dev/null') > import paramiko > sys.stderr = sys.__stderr__ > > os.system("echo \'s3\' >> myfile.txt ") #debug first in ssh2 > def ssh2_connect(host, user, pswd, port=22): > try: > ssh = par

Re: password encryption

2013-03-01 Thread Tomas Neme
> We haven't used SHA-based or MD5-based hashing for some time. oh, I was convinced sha2 was being used. I probably just read the code a while ago and didn't notice it in the changelogs -- "The whole of Japan is pure invention. There is no such country, there are no such people" --Oscar Wilde

Re: os.system() is not working in django while working on server centos

2013-03-01 Thread JAI PRAKASH SINGH
No Tom it just a part of code from django views i just want to know .. is any another systemcall i should use to log a file ??? or if u have batter option to log a file please share ... i will thankfull to u .. till thenn i m posting it to python post also.. On Friday, March 1, 2013 6:33:05 P

Re: os.system() is not working in django while working on server centos

2013-03-01 Thread JAI PRAKASH SINGH
No Tom it just a part of code from django views i just want to know .. is any another systemcall i should use to log a file ??? or if u have batter option to log a file please share ... i will thankfull to u .. till thenn i m posting it to python post also.. On Fri, Mar 1, 2013 at 7:38 PM, JAI

Re: os.system() is not working in django while working on server centos

2013-03-01 Thread Sergiy Khohlov
take a look https://docs.djangoproject.com/en/dev/topics/logging/ using paramiko inside views ... I would like to say that you know a meaning of the sex :-) Many thanks, Serge +380 636150445 skype: skhohlov On Fri, Mar 1, 2013 at 4:26 PM, JAI PRAKASH SINGH < jaiprakashsingh...@gmail.com> w

Re: os.system() is not working in django while working on server centos

2013-03-01 Thread JAI PRAKASH SINGH
he he :) On Fri, Mar 1, 2013 at 7:59 PM, Sergiy Khohlov wrote: > take a look > https://docs.djangoproject.com/en/dev/topics/logging/ > > using paramiko inside views ... I would like to say that you know a > meaning of the sex :-) > > Many thanks, > > Serge > > > +380 636150445 > skype: skhohl

Django save method in infinite loop, code review?

2013-03-01 Thread sparky
Django newbie :) I'm wondering if you *kind people* could help me work out how to solve a little issue I'm having :) I'm using *S3 storage* via the package django-storages . The following code gets stuck in an endless loop. I know just enough t

Re: Django save method in infinite loop, code review?

2013-03-01 Thread sparky
I did actually try that but if I do this... # Resize if we have an image. > if self.image: > image_resize(self) > > super(Profile, self).save(*args, **kwargs) > then inside image_resize 'self' is the old image and I get a 404 error on the line... img_file = urllib.urlo

Re: how to create formset field but not used loop in template

2013-03-01 Thread C. Kirby
I do sometimes reference formset forms individually without the loop. Allows me to better create my layout. As for your question Witold, list items in a template can take an index to select a single item. This will only work if you know how many forms are in your formset: {{formset_create_compa

Experiences with A/B testing?

2013-03-01 Thread Tomás Solar Castro
Hi everyone I want to make some A/B testing. I've searched for how to do this with django, and I found some extensions: - django-lean https://github.com/suckaplease/django-lean (seems discontinued) - django-ab https://github.com/johnboxall/django-ab (seems discontinued) - waffle h

Re: error in filling data in database through admin page

2013-03-01 Thread C. Kirby
It would be helpful to see the model definition(s) and the admin.py if you wrote one On Friday, March 1, 2013 1:06:34 AM UTC-6, Avnesh Shakya wrote: > > hi, > i have got one error during adding data in database though admin > page, actually it was working fine, but i made some attributes o

Re: Django save method in infinite loop, code review?

2013-03-01 Thread sparky
right *OK* now I get it. see, just needed a little push in the right direction... so I moved super up I then changed to use resized_image = Image.open(self.image) I then changed *self.image.save('%s.jpg' % suf.name, suf, save=False) *and* BOOM! *all working!* Thanks so much, this is so fu

Re: Daemonize django server

2013-03-01 Thread Tom Evans
On Thu, Feb 28, 2013 at 6:23 PM, Tim Johnson wrote: > I'm having a hell of a time getting fastcgi to work on my mac, so > for the time being I'll just stick with using the django server. > > Is it possible to daemonize the server? I would prefer that in some > cases. > > From https://docs.djangopr

django-registration vs Django 1.5

2013-03-01 Thread Xavier Pegenaute
Hi, seems django-registration doesn't support properly the new user model from Django 1.5, any one know how to work around it, or at least some other application able to deal with Django 1.5? Thanks, Xavi -- You received this message because you are subscribed to the Google Groups "Django u

Django URLs with/without proxy server

2013-03-01 Thread Barun Saha
I have two Django apps (say, app1 and app2) hosted on the same machine using Apache mod_wsgi. These two apps are hosted on two different environments: 1. On a physical server where only these two apps are hosted. They are accessed as http://www.example.com/app1/app1/ and http://www.example.co

Django + Raspberry PI

2013-03-01 Thread Nicolas Emiliani
Hey guys! Has anyone tried to run django + sqlite on a raspberry pi ? Any performance issues ? I'm about to start an app that provides a restful api and has to run on RPI, it's going to manage an automation service, so load is going to be pretty low. Cheers. -- Nicolas Emiliani Lo unico insta

Re: Django + Raspberry PI

2013-03-01 Thread Shawn Milochik
Yep, I got my full development environment for one of my company's applications running on it with almost no problem. The one exception was MongoDB, which is for x86 only, so I had to compile a fork, which took about 10 hours on the Pi. It was definitely pretty slow, but it works. Our stack inclu

Re: django-registration vs Django 1.5

2013-03-01 Thread Johan Kock
Hi Xavi, I'm wrestling with the same problem right now. There are a couple of pull request to solve this but until they are accepted I'm using this fork: https://bitbucket.org/eire1130/django-registration pip install https://bitbucket.org/eire1130/django-registration/get/tip.tar.gz /Johan

Re: django-registration vs Django 1.5

2013-03-01 Thread william ratcliff
I believe that my patched version should also work: https://github.com/williamratcliff/django-registration Please let me know if there are problems--I should issue a pull request (the patch is minor) On Fri, Mar 1, 2013 at 11:07 AM, Johan Kock wrote: > Hi Xavi, > > I'm wrestling with the same

Re: Django IRC & sqlite3 .schema

2013-03-01 Thread Dorian Kiss
Cheers, I'm sorted on the IRC now. Before I asked I did look for the search button, everywhere except the huge search bar at the top. After I posted the question I found it, and found your previous answer about IRC, but unfortunately there was no option to delete or edit my topic. As for the sq

Re: Converting Django app into a Desktop app

2013-03-01 Thread Kevin London
Oh okay, interesting. Thank you for following up. I'm going down the Pyinstaller route, I think. Support for Django in Pyinstaller is so recent that I'm hitting a number of snags, so I might need to go py2app if it doesn't pan out yet. Thanks to everyone so far for their contributions, this has bee

Re: Django + Raspberry PI

2013-03-01 Thread Nicolas Emiliani
Shawn, It was definitely pretty slow, but it works. > > Our stack includes nginx, gunicorn, Redis, MongoDB, PostgreSQL, > supervisor, virtualenv, and probably other stuff I'm forgetting. > > Well you are running a pretty interesting and (heavy?) stack, I've read about DB engines being slow. Thanks

Getting only the models related to my queryset.

2013-03-01 Thread Gabriel Koscky
Hi, I've been having some trouble with filtering the related models of a queryset, and I'm not sure if I'm approaching this wrong or if Django can't actually do it. Basically I have some models with ManyToMany relationships, like: *class User(models.Model): name = models.CharField() class P

Request for comments on a new Open Source Paas platform for Django

2013-03-01 Thread Patrick
Hi, I'm building a Juju based Open Source Paas platform for Django and I need your help because it is a hard task to make a PAAS system that is flexible enough to deploy any projects and at the same time simple to use. For the ones that don't know Juju, it's a service orchestration software compa

Re: Daemonize django server

2013-03-01 Thread Tim Johnson
* Tom Evans [130301 06:44]: > On Thu, Feb 28, 2013 at 6:23 PM, Tim Johnson wrote: > > I'm having a hell of a time getting fastcgi to work on my mac, so <...> > > I didn't reply to your fastcgi posts yesterday, as you were attempting > to have everything spawned by the web server, which is not ho

Re: Django IRC & sqlite3 .schema

2013-03-01 Thread Dorian Kiss
I figured it out after some more abstract Google searching. I had to download the sqlite3.exe, as it did not come with django, and then add it to my path. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Converting Django app into a Desktop app

2013-03-01 Thread Czarek Tomczak
Hi Loai, Have a look at CEF Python that embeds Chrome browser: https://code.google.com/p/cefpython/ You will need to run a web server to convert it into a desktop application, have a look at CefBottleDesktop that embeds CEF and runs a python web s

Re: error in filling data in database through admin page

2013-03-01 Thread Avnesh Shakya
ya i m adding now please help me On Fri, Mar 1, 2013 at 8:43 PM, C. Kirby wrote: > It would be helpful to see the model definition(s) and the admin.py if you > wrote one > > On Friday, March 1, 2013 1:06:34 AM UTC-6, Avnesh Shakya wrote: >> >> hi, >> i have got one error during adding data