Re: Managing objects spred among several tables/databases.

2011-07-08 Thread Hummingbird
Although I have gone through the docs of Django ORM, let me re-read it. Then I will come back to this thread with specific question. Thanks for your reply. On Jul 8, 8:57 pm, Tom Evans wrote: > On Fri, Jul 8, 2011 at 4:01 PM, Hummingbird wrote: > > @Cal, > > My apologies if my post has hurted y

zyyzj想要聊天

2011-07-08 Thread zyyzj
--- zyyzj希望通过 Google 的一些最炫酷的新产品与您保持更密切的联系。 如果您已经拥有 Gmail 或 Google Talk,请访问: http://mail.google.com/mail/b-9f0e3fbec7-176c78f291-kEyz49ybPM7nlSfYFeoG2lxHo5o 您需要点击此链接才能与zyyzj聊天。 要获取 Gmail(Google 提供的免费电子邮件帐户,存储空间超过 2,800 MB)并与zyyzj

Re: Storing visitor information

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
On Sat, Jul 9, 2011 at 12:16 AM, Alexei wrote: > Hi, > > I have a Django website that basically just displays a bunch of items > from a database with searching, filtering, etc. The site is publicly > accessible, with no login or anything. What I want to do is the first > time a user visits the

Storing visitor information

2011-07-08 Thread Alexei
Hi, I have a Django website that basically just displays a bunch of items from a database with searching, filtering, etc. The site is publicly accessible, with no login or anything. What I want to do is the first time a user visits the site, prompt them for a filter choice, then save that filter

How to automatically add a url param to url tags (it is used ubiquitously throughout application)?

2011-07-08 Thread br
Here's a snippet from my base urls.py: (r'^(?P[\w-]+)/manager/mobile/', include('mobilepolls.manager.urls')), (r'^(?P[\w-]+)/manager/display/', include('screens.manager.urls')), (r'^(?P[\w-]+)/display/', include ('screens.urls')), Each of those apps then defines its o

Re: Serving static files weirdness

2011-07-08 Thread neridaj
Got it working by changing the following: STATIC_ROOT = '' STATIC_URL = '/static/' STATICFILES_DIRS = ( # Put strings here, like "/home/html/static" or "C:/www/django/ static". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths.

Re: Serving static files weirdness

2011-07-08 Thread neridaj
I'm using Django version 1.3 and the Django devserver. My admin media is the default: ADMIN_MEDIA_PREFIX = '/static/admin/' On Jul 8, 1:49 am, bruno desthuilliers wrote: > On Jul 8, 4:40 am, neridaj wrote: > > > > > > > > > > > I had mystaticfiles being served form media i.e., the tree looked >

Re: Limiting the address space of any other binary..?

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
Perfect, thank you! On Fri, Jul 8, 2011 at 9:46 PM, Roberto De Ioris wrote: > > > Hi Roberto, > > > > Wonder if you might be able to give me some advice.. > > > > Is there is a way to limit the address space of any other binary, > > without relying on /etc/security/limits.conf?? > > > > For exam

Re: Limiting the address space of any other binary..?

2011-07-08 Thread Roberto De Ioris
> Hi Roberto, > > Wonder if you might be able to give me some advice.. > > Is there is a way to limit the address space of any other binary, > without relying on /etc/security/limits.conf?? > > For example, is it possible to do something like this: > > ./magic-here --limit-as=256M -- /usr/sbin/som

Re: Can't get /admin/ or any page to load

2011-07-08 Thread Andre Terra
Hello, Brent As always, please post full the traceback and urls.py. Use dpaste.com. Cheers, André On Fri, Jul 8, 2011 at 4:33 PM, Brent wrote: > When I go to 127.0.0.1:8000/admin/ I receive this error: > > Caught ViewDoesNotExist while rendering: Tried base in module > django.views.generic.

Can't get /admin/ or any page to load

2011-07-08 Thread Brent
When I go to 127.0.0.1:8000/admin/ I receive this error: Caught ViewDoesNotExist while rendering: Tried base in module django.views.generic. Error was: 'django.views.generic.base' is not a callable. I followed the django tutorial here: https://docs.djangoproject.com/en/dev/intro/tutorial01/ and

Re: Model translation

2011-07-08 Thread Tomáš Ehrlich
Yes, transmeta is straightforward and simple. This is the main advantage, but also the biggest disadvantage. Moreover, i'm scared of altering big tables with lots of columns every time I want to add another language. On 8 čnc, 21:06, smac...@flagstonesoftware.com wrote: > +1 for transmeta but I on

Re: Model translation

2011-07-08 Thread smackay
+1 for transmeta but I only use it for short text fields which contain user supplied data which translated in the admin and or reference data or other fields which are constant. It quickly gets unmanagable as you add fields. From what you describe multilingual is probably better suited sinc

Re: Confusion about the new staticfiles contrib app

2011-07-08 Thread Gour-Gadadhara Dasa
On Tue, 25 Jan 2011 21:46:39 -0800 (PST) Brian Neal wrote: Hiya, > I'm trying to cut over my project to use the new staticfiles > application. I'm using the dev server with DEBUG = True on a recent > SVN trunk checkout. My STATIC_URL is '/static/' and my MEDIA_URL is > 'http://localhost:8000/med

Re: User based objects

2011-07-08 Thread Praveen Krishna R
*Shawn, Once again **thank you very much for your help, * *here is my code, if anybody could make use of it (I have changed my actual model/form names)! * * * * class SampleForm(forms.Form): head = forms.CharField() body = forms.CharField(widget = forms.Textarea) def __init__(self, *arg

Re: anybody using PhoneGap with Django

2011-07-08 Thread John Fabiani
On Friday, July 08, 2011 10:41:02 am br wrote: > I am currently in the middle of a project where we are planning on > using Django with PhoneGap . . . Haven't completed yet, or gotten to > the PhoneGap part of it, so can't report its success or not yet. > > Basically, we are using jQuery Mobile to

Re: RegistrationForm subclass not showing up

2011-07-08 Thread CareerDhaba tech
I believe you are using an older version of django_registration, since there is no reference to the backend in your code. The backend is an addition in the latest (0.8) version of django_registration. Did you download the code from here? http://readthedocs.org/docs/django-registration/en/latest/in

Re: Getting a subclass from an abstract Model

2011-07-08 Thread Micky Hulse
Try adding the below to your base class: objects = models.Manager() # Admin uses this manager. Sent from my iPhone -- 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 unsu

Re: anybody using PhoneGap with Django

2011-07-08 Thread br
I am currently in the middle of a project where we are planning on using Django with PhoneGap . . . Haven't completed yet, or gotten to the PhoneGap part of it, so can't report its success or not yet. Basically, we are using jQuery Mobile to develop a complete mobile application that operates on a

Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
On Fri, Jul 8, 2011 at 5:37 PM, Brian Bouterse wrote: > I'm going to try to get a pypy installation built from source that has > nginx/gunicorn/django. I will share back what I can come up with. If anyone > else is doing similar things share back your findings please. I'm going to try do the s

Re: Model translation

2011-07-08 Thread urukay
Hi Tomas, i'm using transmeta in my project. But in the way you are/want. Just using it to translate some short strings (and longer in FAQ). And there's no problem to add another language inproduction server (see manage.py help for more info) Radovan http://www.yau.sk On 8. Júl, 18:56 h., Tomáš

Re: throttling login attempts to avoid brute force attacks

2011-07-08 Thread Shawn Milochik
On 07/08/2011 12:53 PM, Jacob Kaplan-Moss wrote: Hi folks -- Also see http://simonwillison.net/2009/Jan/7/ratelimitcache/ for a discussion of a similar technique built on top of memcached. Jacob Thanks for that link. There's some really good stuff in the comments. I'm seriously considering

Re: throttling login attempts to avoid brute force attacks

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
Interesting approach. Although, I don't like the "get multi" approach, too much overhead. I personally prefer to configure an amount of time, combined with the max hits, then do the following: class IPThrottleException(exception): pass import time MAX_INTERVAL = 180 # secon

Model translation

2011-07-08 Thread Tomáš Ehrlich
Hi there, I just want to open discussion about this topic again, because I didn't find any solution which 100% fits my needs. What I want: - store translations in other table (1:N) - storing additional info, if necessary (translation_date, translation_edit_date, translator_name, etc) - keeping

Re: throttling login attempts to avoid brute force attacks

2011-07-08 Thread Jacob Kaplan-Moss
Hi folks -- Also see http://simonwillison.net/2009/Jan/7/ratelimitcache/ for a discussion of a similar technique built on top of memcached. Jacob -- 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

Re: throttling login attempts to avoid brute force attacks

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
On Fri, Jul 8, 2011 at 5:37 PM, Shawn Milochik wrote: > On Fri, Jul 8, 2011 at 12:32 PM, Cal Leeming [Simplicity Media Ltd] > wrote: > > > > > > Have you considered using an atomic caching server for storing the state > of > > an IPs 'throttle' count? > > It has the added benefit of giving you f

Re: throttling login attempts to avoid brute force attacks

2011-07-08 Thread Shawn Milochik
On Fri, Jul 8, 2011 at 12:32 PM, Cal Leeming [Simplicity Media Ltd] wrote: > > > Have you considered using an atomic caching server for storing the state of > an IPs 'throttle' count? > It has the added benefit of giving you future support for distributed use, > wouldn't be as performance heavy as

Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-08 Thread Brian Bouterse
I'm going to try to get a pypy installation built from source that has nginx/gunicorn/django. I will share back what I can come up with. If anyone else is doing similar things share back your findings please. I don't use shed skin, but I believe pypy is much more mature. As evident from the larg

Re: throttling login attempts to avoid brute force attacks

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
On Fri, Jul 8, 2011 at 5:32 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > > > On Fri, Jul 8, 2011 at 5:03 PM, Shawn Milochik wrote: > >> This topic came up on the list a few months back, and I just wanted to >> share the solution I've put into place. >> >

Re: throttling login attempts to avoid brute force attacks

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
On Fri, Jul 8, 2011 at 5:03 PM, Shawn Milochik wrote: > This topic came up on the list a few months back, and I just wanted to > share the solution I've put into place. > > Short version: > > 1. Ensure that my Web server (nginx) passes the user's real IP address in > the request. > > 2. For POST

Re: throttling login attempts to avoid brute force attacks

2011-07-08 Thread Shawn Milochik
I'm not familiar with shm, so I can't answer that. I don't share the in-memory db with anything else; we have a very small user-base for our commercial application, and only need one Django instance. If I wanted to trigger other activity based on this I'd probably use ZeroMQ. Sorry I can't be mor

Re: No module named registrationprofiles

2011-07-08 Thread arjun
thanks a lot! On Jul 8, 8:46 pm, Karen Tracey wrote: > On Jul 8, 11:40 am, arjun wrote: > > > i am running django-registration, django-profiles apps. > > and getting the error 'No module named registrationprofiles' while > > syncdb command is used.. > > wat cud be the reason? > > A missing comma

Re: throttling login attempts to avoid brute force attacks

2011-07-08 Thread Tom Evans
On Fri, Jul 8, 2011 at 5:03 PM, Shawn Milochik wrote: >    Middleware file creates an in-memory sqlite3 database. How do you share this in memory db with the other processes? Can one create sqlite databases that use shm? Intrigued. Cheers Tom -- You received this message because you are subs

throttling login attempts to avoid brute force attacks

2011-07-08 Thread Shawn Milochik
This topic came up on the list a few months back, and I just wanted to share the solution I've put into place. Short version: 1. Ensure that my Web server (nginx) passes the user's real IP address in the request. 2. For POST requests to the login URL only (to avoid any performance side-effe

Getting a subclass from an abstract Model

2011-07-08 Thread gontran
Hello everyone, my models are defined like this: class MyBaseModel(models.Model): . class Meta: abstract = True class ClassA(MyBaseModel): .. class ClassB(MyBaseModel): .. Then I'm trying to get a subclass of MyBaseModel by doing this: for s in MyBaseModel

Re: Managing objects spred among several tables/databases.

2011-07-08 Thread Tom Evans
On Fri, Jul 8, 2011 at 4:01 PM, Hummingbird wrote: > @Cal, > My apologies if my post has hurted you. > I didn't mean that. > I understand that all these open source projects are run by people who > don't get paid for it. > > My point was quite different. It was about knowledge sharing. > We can re

Re: No module named registrationprofiles

2011-07-08 Thread Karen Tracey
On Jul 8, 11:40 am, arjun wrote: > i am running django-registration, django-profiles apps. > and getting the error 'No module named registrationprofiles' while > syncdb command is used.. > wat cud be the reason? A missing comma between the two entries in INSTALLED_APPS. Karen -- You received t

No module named registrationprofiles

2011-07-08 Thread arjun
i am running django-registration, django-profiles apps. and getting the error 'No module named registrationprofiles' while syncdb command is used.. wat cud be the reason? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: What is an "application instance"

2011-07-08 Thread Andre Terra
For the record, there is a plan to refactor the concept of 'app' completely, granted any recent development on that front seems to be mostly restricted to discussions in django-developers. I believe the proposed changes draw from the way the admin encapsulates itself in an App class. https://githu

Re: Interesting Python obfuscation techniques from DEFCON18 (June 2010)

2011-07-08 Thread creecode
Hello Cal, Interesting read. Thanks for posting. Toodle-looo.. creecode -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/TY4ToUB67AQJ. To post

Re: Using Jinja2

2011-07-08 Thread Shawn Milochik
Did you guys know that Armin Ronacher (the author of Jinja2) is actively working on this for Google Summer of Code? https://www.djangoproject.com/weblog/2011/apr/25/gsoc/ If you're interested in the development of Django it's very informative to subscribe to django-developers and lurk. You can

Re: Using Jinja2

2011-07-08 Thread Tomáš Ehrlich
Hi there, this looks interesting: http://jinja.pocoo.org/docs/switching/#django I'll try it soon On 8 čnc, 16:43, Venkatraman S wrote: > On Fri, Jul 8, 2011 at 8:03 PM, akaariai wrote: > > > Trying jinja2 in your project is hard - you are using some template > > tags, and you would need to port

Re: Managing objects spred among several tables/databases.

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
On Fri, Jul 8, 2011 at 4:01 PM, Hummingbird wrote: > @Cal, > My apologies if my post has hurted you. > I didn't mean that. > I understand that all these open source projects are run by people who > don't get paid for it. > > My point was quite different. It was about knowledge sharing. > We can re

Re: Manytoone Form

2011-07-08 Thread Shawn Milochik
Add the field in your ModelForm, just as you would with a form. You're allowed to do that. Override the __init__ of your ModelForm subclass and populate the choices. Override the clean and clean_field functions (if necessary). Override the save() to populate the field in the other model from you

Re: User based objects

2011-07-08 Thread Shawn Milochik
On Fri, Jul 8, 2011 at 10:28 AM, Praveen Krishna R wrote: > Thank you, Shawn, I didn't knew that! I'm trying on that way now! > You're welcome. The one 'gotcha' is that you're going to have to remove the user from the kwargs before you call the __init__ of the superclass. Otherwise you'll get an

Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
On Fri, Jul 8, 2011 at 3:53 PM, Venkatraman S wrote: > Cal, > > Quiet frankly, it looks to me that if you are spending some effort on this > - better start with django on pypy. > And then probably we can move to 'one-binary' idea. I much prefer the idea of a true single binary (the way facebook

Re: Managing objects spred among several tables/databases.

2011-07-08 Thread Hummingbird
@Cal, My apologies if my post has hurted you. I didn't mean that. I understand that all these open source projects are run by people who don't get paid for it. My point was quite different. It was about knowledge sharing. We can re-phrase the question if nobody understands what we mean to ask. Act

Re: What is an "application instance"

2011-07-08 Thread Tom Evans
On Fri, Jul 8, 2011 at 3:43 PM, Thomas Denmark wrote: > Thanks Tom. So I have now read about AdminSite. > > It seems like they have encapsulated an application into a class. It > is the first time I see this. And to use the application, one must > instantiate the class. To have several instances,

Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-08 Thread Venkatraman S
Cal, Quiet frankly, it looks to me that if you are spending some effort on this - better start with django on pypy. And then probably we can move to 'one-binary' idea. -V -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: Limiting the address space of any other binary..?

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
On Fri, Jul 8, 2011 at 3:26 PM, Javier Guerra Giraldez wrote: > On Fri, Jul 8, 2011 at 9:18 AM, Cal Leeming [Simplicity Media Ltd] > wrote: > > In the above scenario, ulimit would apply that limit to everything > > within that forked supervisord instance, correct? > > > > Therefore, if nginx-wrap

Re: What is an "application instance"

2011-07-08 Thread Thomas Denmark
Thanks Tom. So I have now read about AdminSite. It seems like they have encapsulated an application into a class. It is the first time I see this. And to use the application, one must instantiate the class. To have several instances, you just instantiate several. That seems kind of straight forwar

Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
I'd imagine this would probably join the same bucket as "shedskin", as it's experimental, lacking feature support, and little known compatibility testing. On Fri, Jul 8, 2011 at 3:35 PM, Venkatraman S wrote: > And btw, AlexGaylnor, recently wrote a python > decompiler

Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
On Fri, Jul 8, 2011 at 3:24 PM, Brian Bouterse wrote: > I've been thinking about this for a day or two now, and here are some > thoughts: > > One option to possibly compile python to C++ is shed > skin, > to translate python code into a C binary. Note that th

Using Jinja2

2011-07-08 Thread Venkatraman S
On Fri, Jul 8, 2011 at 8:03 PM, akaariai wrote: > > Trying jinja2 in your project is hard - you are using some template > tags, and you would need to port them to jinja2. Then you would need > to rewrite your templates so that they work under jinja2. This would > take some time for sure. > > What

Re: django/python performance vs play/java

2011-07-08 Thread Venkatraman S
On Fri, Jul 8, 2011 at 8:03 PM, akaariai wrote: > > Trying jinja2 in your project is hard - you are using some template > tags, and you would need to port them to jinja2. Then you would need > to rewrite your templates so that they work under jinja2. This would > take some time for sure. > > What

Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-08 Thread Venkatraman S
And btw, AlexGaylnor, recently wrote a python decompiler; probably this can be leveraged ? -V -- 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@googlegro

Re: django/python performance vs play/java

2011-07-08 Thread akaariai
On Jul 8, 4:03 pm, drakkan wrote: > I have no time to try jinja2 now, I guess it should speed up django a > bit Trying jinja2 in your project is hard - you are using some template tags, and you would need to port them to jinja2. Then you would need to rewrite your templates so that they work unde

Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-08 Thread Venkatraman S
On Fri, Jul 8, 2011 at 7:54 PM, Brian Bouterse wrote: > I have also heard of folks using pypy in production serving django sites, > so I think Django is ready for this. Interesting. Can you share more on this. Any caveats/tradeoffs? -V -- You received this message because you are subscribed

Re: User based objects

2011-07-08 Thread Praveen Krishna R
*Thank you, Shawn, I didn't knew that! I'm trying on that way now! * On Fri, Jul 8, 2011 at 6:52 PM, Shawn Milochik wrote: > You can certainly pass request.user to the form from your view. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. >

Re: Limiting the address space of any other binary..?

2011-07-08 Thread Javier Guerra Giraldez
On Fri, Jul 8, 2011 at 9:18 AM, Cal Leeming [Simplicity Media Ltd] wrote: > In the above scenario, ulimit would apply that limit to everything > within that forked supervisord instance, correct? > > Therefore, if nginx-wrapper calls ulimit at almost the exact same > point as other-wrapper, there c

Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-08 Thread Brian Bouterse
I've been thinking about this for a day or two now, and here are some thoughts: One option to possibly compile python to C++ is shed skin, to translate python code into a C binary. Note that the compiled C code is statically compiled which produces a C instruct

Manytoone Form

2011-07-08 Thread Magrelo
Hello everyone, I've created a onetomany relationship between two models. The form that has the foreignkey I can use the formset without problems, but now I want to fill this relation through the form of the model that has the many, I know I can retrieve the that using the *_set, but how I create

Re: Limiting the address space of any other binary..?

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
On Fri, Jul 8, 2011 at 3:18 PM, Cal Leeming [Simplicity Media Ltd] wrote: > On Fri, Jul 8, 2011 at 3:13 PM, Tom Evans wrote: >> On Fri, Jul 8, 2011 at 3:04 PM, Cal Leeming [Simplicity Media Ltd] >> wrote: >>> Although I'm sure both methods would work, would you recommend any >>> particular prefe

Re: Limiting the address space of any other binary..?

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
On Fri, Jul 8, 2011 at 3:13 PM, Tom Evans wrote: > On Fri, Jul 8, 2011 at 3:04 PM, Cal Leeming [Simplicity Media Ltd] > wrote: >> Although I'm sure both methods would work, would you recommend any >> particular preference? (as my preference is merely on the fact that >> having a wrapper seems a l

Re: Limiting the address space of any other binary..?

2011-07-08 Thread Tom Evans
On Fri, Jul 8, 2011 at 3:04 PM, Cal Leeming [Simplicity Media Ltd] wrote: > Although I'm sure both methods would work, would you recommend any > particular preference? (as my preference is merely on the fact that > having a wrapper seems a lot cleaner). > > I guess the custom binary I was trying t

Interesting Python obfuscation techniques from DEFCON18 (June 2010)

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
Not sure if anyone else has seen this: http://www.defcon.org/images/defcon-18/dc-18-presentations/RSmith/DEFCON-18-RSmith-pyREtic.pdf Well worth reading if you are into this sort of thing. Cal -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
Here is what I've come up with so far: https://github.com/foxx/jennifer/wiki/Design-Sketch I've enabled public edit mode, so feel free to add/change. Cal On Fri, Jul 8, 2011 at 10:55 AM, Cal Leeming [Simplicity Media Ltd] wrote: > Also, one of the things you mentioned (about security updates o

Re: Limiting the address space of any other binary..?

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
My responses below. On Fri, Jul 8, 2011 at 2:55 PM, Michal Petrucha wrote: > On Fri, Jul 08, 2011 at 02:43:11PM +0100, Cal Leeming [Simplicity Media Ltd] > wrote: >> Sorry, I should have given a bit more detail. >> >> Using ulimit is going to be an issue as it relies on the host allowing >> user

Re: anybody using PhoneGap with Django

2011-07-08 Thread Brian Bouterse
I would be interested to hear this as well... On Fri, Jul 8, 2011 at 12:44 AM, John Fabiani wrote: > On Thursday, July 07, 2011 08:48:51 pm Andy McKay wrote: > > On 2011-07-07, at 2:22 PM, John Fabiani wrote: > > > I'm wondering if anyone has had any success with PhoneGap and Django? > > > > Yes

Re: Limiting the address space of any other binary..?

2011-07-08 Thread Michal Petrucha
On Fri, Jul 08, 2011 at 02:43:11PM +0100, Cal Leeming [Simplicity Media Ltd] wrote: > Sorry, I should have given a bit more detail. > > Using ulimit is going to be an issue as it relies on the host allowing > users to modify their ulimit (some aren't allowed). It also then > applies that rule to

Re: Limiting the address space of any other binary..?

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
Hmm, I should have posted this to a C mailing list, as it's extremely off topic for Django. I'll move this discussion to a different list.. but here's what I've found so far (for anyone interested). Within C code, setting 'rlim_max' allows you to set a floor limit for a process (http://linux.die.

Re: Limiting the address space of any other binary..?

2011-07-08 Thread Tom Evans
On Fri, Jul 8, 2011 at 2:43 PM, Cal Leeming [Simplicity Media Ltd] wrote: > Sorry, I should have given a bit more detail. > > Using ulimit is going to be an issue as it relies on the host allowing > users to modify their ulimit (some aren't allowed). It also then > applies that rule to any other p

Re: Limiting the address space of any other binary..?

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
Thank you for taking the time to reply though! On Fri, Jul 8, 2011 at 2:33 PM, Tom Evans wrote: > On Fri, Jul 8, 2011 at 2:23 PM, Cal Leeming [Simplicity Media Ltd] > wrote: >> Hi Roberto, >> >> Wonder if you might be able to give me some advice.. >> >> Is there is a way to limit the address spa

Re: Limiting the address space of any other binary..?

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
Sorry, I should have given a bit more detail. Using ulimit is going to be an issue as it relies on the host allowing users to modify their ulimit (some aren't allowed). It also then applies that rule to any other processes within that user, which is bad as different processes may need different li

Re: Managing objects spred among several tables/databases.

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
Hummingbird, If there is no reply to a question, it's either because people are busy, no one knows the answer, or because the OP did not make any sense. Personally, I read the post and thought "this post makes no sense". OP may want to re-phrase their original post in the form of a real set of que

Re: Limiting the address space of any other binary..?

2011-07-08 Thread Tom Evans
On Fri, Jul 8, 2011 at 2:23 PM, Cal Leeming [Simplicity Media Ltd] wrote: > Hi Roberto, > > Wonder if you might be able to give me some advice.. > > Is there is a way to limit the address space of any other binary, > without relying on /etc/security/limits.conf?? > > For example, is it possible to

Re: NoReverseMatch in django production server

2011-07-08 Thread urukay
Hi, try this in obras urls.py: obras urls.py: from django.conf.urls.defaults import * urlpatterns = patterns('obras.views', url(r'^presobra/$', 'pres_obra', name='pres_obra'), ) Radovan http://www.yau.sk On 7. Júl, 22:17 h., mf wrote: > The project is working fine in the dev server but

Limiting the address space of any other binary..?

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
Hi Roberto, Wonder if you might be able to give me some advice.. Is there is a way to limit the address space of any other binary, without relying on /etc/security/limits.conf?? For example, is it possible to do something like this: ./magic-here --limit-as=256M -- /usr/sbin/some-legacy-binary-h

Re: User based objects

2011-07-08 Thread Shawn Milochik
You can certainly pass request.user to the form from your view. -- 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 unsubscribe from this group, send email to django-users+unsub

User based objects

2011-07-08 Thread Praveen Krishna R
*Hi, * * * *This is one of my Model which has an owner, column - user.* * * * class MiscList(models.Model): name = models.CharField(max_length= 30) user = models.ForeignKey(User); count = models.IntegerField() createdate = models.DateTimeField(auto_now_add = True) ** def __unico

Re: Managing objects spred among several tables/databases.

2011-07-08 Thread Hummingbird
Not to put too fine a point on this. I was hopeful to get some reply on this list (I heard that django community is superbly active). But it seems that either this post of mine alongwith "qMax" (OP) was extremely silly, OR Nobody understood the gravity of our post. In data-centric business apps (no

Re: django/python performance vs play/java

2011-07-08 Thread drakkan
On 8 Lug, 14:44, Thomas Guettler wrote: > On 06.07.2011 15:33, drakkan wrote:> On 6 Lug, 14:03, akaariai > wrote: > >> On Jul 5, 10:54 pm, drakkan wrote: > > ... > > > using pgpool I get a 2,5x performance improvement thanks! I'll try on > > intel atom again to see if there I have more improv

Re: RegistrationForm subclass not showing up

2011-07-08 Thread Andre Terra
If I remember this correctly, there's a variable somewhere in django-registration that defines the form to be used. grep (or ack!) the source for RegistrationForm and see if you can find it Cheers, Andre On 7/8/11, katstevens wrote: > Thanks for your answer, but unfortunately that hasn't helped

Re: django/python performance vs play/java

2011-07-08 Thread Thomas Guettler
On 06.07.2011 15:33, drakkan wrote: > On 6 Lug, 14:03, akaariai wrote: >> On Jul 5, 10:54 pm, drakkan wrote: ... > using pgpool I get a 2,5x performance improvement thanks! I'll try on > intel atom again to see if there I have more improvements Hi, I am interessted in the result. Please post

Re: MultipleObjectsReturned using MongoDB

2011-07-08 Thread delegbede
Whenever you use a get(), it is expecting to return one item. Use filter() and see if the error comes up again and then I can take a deeper look at the error. Regards. Sent from my BlackBerry wireless device from MTN -Original Message- From: Ademar Sender: django-users@googlegroups.com

MultipleObjectsReturned using MongoDB

2011-07-08 Thread Ademar
hi, im new in django and mongodb and im trying to use the admin with mongodb. i installed everything and there's no errors on the server but after i access the admin page it gives me the error 'MultipleObjectsReturned at /admin/ get() returned more than one Session -- it returned 2! Lookup parame

[ANN] cfp for PyCon India closing soon

2011-07-08 Thread Kenneth Gonsalves
hi, for those of you who would like to visit India: http://in.pycon.org/2011/ -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, s

Re: RegistrationForm subclass not showing up

2011-07-08 Thread katstevens
Thanks for your answer, but unfortunately that hasn't helped - on further investigation I think the problem is somewhere else, as the original RegistrationForm class instance (in registration.forms) doesn't seem to be being called correctly by registration.views (so no wonder RegistrationFormTermsO

Re: What is an "application instance"

2011-07-08 Thread Tom Evans
On Fri, Jul 8, 2011 at 10:45 AM, Thomas Larsen Wessel wrote: > I'm reading the URL Dispatcher documentation, at > https://docs.djangoproject.com/en/dev/topics/http/urls/. > > It mentions "application instance" several times. I do not know / understand > what an application instance is. > > Could s

Re: How to use the django-users mailing list properly and doing your homework..

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
On 8 Jul 2011 01:51, "Kenneth Gonsalves" wrote: > > On Thu, 2011-07-07 at 10:46 -0400, Shawn Milochik wrote: > > > mentioned. With a threaded mail client, I use Mutt, they're much > > > easier to keep up with than anything web based. > > > > > > > +1 > > > > I prefer this mailing list to anything

Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
Also, one of the things you mentioned (about security updates of the chroot) is something i have been pondering today. Although a single compile will mean recompile everytime a security announce is released, this is unavoidable. This is my idea for handling security announcements: The single bina

Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-08 Thread Cal Leeming [Simplicity Media Ltd]
Hi Bjarni, Thanks for your input. As pointed out earlier in the thread, the end goal is to provide a single binary that is entirely host independant, contains the chroot/stack needed by the webapp etc. You really need to watch the facebook video link i included earlier in the thread to understand

What is an "application instance"

2011-07-08 Thread Thomas Larsen Wessel
I'm reading the URL Dispatcher documentation, at https://docs.djangoproject.com/en/dev/topics/http/urls/. It mentions "application instance" several times. I do not know / understand what an application instance is. Could somebody please explain this, preferably with an example which demonstrates

Re: OperationalError: no connection to the server using Django and gunicorn

2011-07-08 Thread Adrian Ribao
I still have the same problem using gevent with gunicorn, but it works with synchronous workers. Did you find a solution? 2011/7/1 Андрей Махнач > I'm getting this error randomly > and it throws 500error to nginx (I'm using nginx+gunicorn) > > and it appears really randomly ;) > > On Jul 1, 10:

Re: cropping of an image

2011-07-08 Thread Thomas Augestad Weholt
There are several options. Take a look at django-photofile. It rotates photos based on exif-info as well. If you don't want to use the entire app you should be able to rip out just the cropping part. Sendt fra min iPad Den 7. juli 2011 kl. 22:16 skrev jaspreet kaur : > Hello everyone > I wan

Re: Serving static files weirdness

2011-07-08 Thread bruno desthuilliers
On Jul 8, 4:40 am, neridaj wrote: > I had my static files being served form media i.e., the tree looked > like this: > > media/ > /css > /js > /images > > with this in my url conf: > if settings.SERVE_MEDIA_FROM_DJANGO: >     urlpatterns += patterns('', >     (r'^media/(?P.*)$', 'django.views.stat

Re: Speed of search question

2011-07-08 Thread Benedict Verheyen
On 7/07/2011 11:31, Marc Aymerich wrote: > Hi Benedict, > If you're concerned about the performance of your django apps, I > recomend you this app: > https://github.com/robhudson/django-debug-toolbar/commits/master/ > > Besides many other interesting things, It shows you the DB queries > that you

Re: Some thoughts on a package/stack compile system for easy distribution of webapps..

2011-07-08 Thread Bjarni Rúnar Einarsson
On Fri, Jul 8, 2011 at 5:22 AM, Roberto De Ioris wrote: > > 2011/7/8 Bjarni Rúnar Einarsson > > > > Nice script; but i (and also i guess Cal) were thinking more in the terms > > of having a single binary. > > > > [DISCLAIMER] i still have not tried pybreeder > > Having a single blob file (the .p