django.contrib.auth.views.login

2010-08-30 Thread ashy
Hi All, I am using django.contrib.auth.views.login for the login view. The code for 'registration/login.html' is as below: User Login User Login {% if form.has_errors %} Your username and password didn't match. Please try again. {% endif %} User

deployment problem gotcha

2010-08-30 Thread Mike Dewhirst
I had an admin media problem finding base.css in deploying an app from the Django (svn head) dev server on Windows to Apache 2.2 on Linux Because I had prepared this email ready to ask for help, I'm posting it anyway with the hope that it helps someone. Everything else was working. Firebug wa

Re: prepopulated_fields do not work at all Django 1.2

2010-08-30 Thread bruno desthuilliers
Not really an answer to your question, but you should definitly dev using the the same versions of Django and any third-part app - at least you'd have a chance to find out what happens when something goes wrong. On 29 août, 23:58, Goran wrote: > I have strange problem, on my development server ev

Re: Unable to add two Numbers

2010-08-30 Thread Harbhag Singh Sohal
On Mon, Aug 30, 2010 at 10:14 AM, Kenneth Gonsalves wrote: > On Mon, 2010-08-30 at 10:06 +0530, Harbhag Singh Sohal wrote: > > I have read tutorial / documentation > > no use reading it - please do the tutorial step by step until you make a > complete web application as shown in the tutorial. Then

Re: GeoDjango: default 4326 SRID doesn't work for transform()

2010-08-30 Thread Reinout van Rees
On 08/29/2010 07:45 PM, kyleduncan wrote: Hi all, I am trying to do obtain the distance between two users on my site, using code I found in this group. We already have geoDjango installed, though i'm wondering if my problem comes from being on an old version (i dont know which version we're usin

urls permalink error

2010-08-30 Thread Patricia
Hi all! I have a page with some years. I want to click over the year, for instance 2000, to see all the information. I've build some permalinks in other pages to built the URL, now I wanted to do the same thing, but the field I wanted to connect is not the year, is the date. @permalink def get_

appengine dynamic translation

2010-08-30 Thread Martin Kubát
Hi, I have a problem with dynamic translation strings on AppEngine. Best django module for my problem is django-rosetta. But... I can't do any operations with files on AppEngine. Exists somethings else like django-rosetta for AppEngine? Or, have somebody any experience with this problem? Thanks.

Re: django.contrib.auth.views.login

2010-08-30 Thread Karen Tracey
On Mon, Aug 30, 2010 at 2:34 AM, ashy wrote: > > I am using django.contrib.auth.views.login for the login view. The > code for 'registration/login.html' is as below: > > > >User Login > > >User Login >{% if form.has_errors %} It looks like you are working from an old book or

Re: manage.py: syncdb/sql do not pick up models from custom directory structure

2010-08-30 Thread Daniel Roseman
On Aug 30, 7:46 am, Dan wrote: > On 30 Aug., 08:26, Kenneth Gonsalves wrote:> import > lib.models > > > from lib.models import * - you may get an error here > > Both commands work without giving any error messages. However they do > not actually import anything, since the models reside in sepera

Re: appengine dynamic translation

2010-08-30 Thread TomasJKouba
Hi, I have the same problem. Please help... Tomas On 30 srp, 13:17, Martin Kubát wrote: > Hi, > I have a problem with dynamic translation strings on AppEngine. > Best django module for my problem is django-rosetta. But... I can't do > any operations with files on AppEngine. > > Exists somethings

filling model choices field according to language code

2010-08-30 Thread Oguz Yarimtepe
Hi, In my django application i have a Ticket class at my model as below class Ticket(models.Model): ... faculty = models.SmallIntegerField( _('Faculty'),

Re: potential issue re in memory django file uploading.

2010-08-30 Thread Graham Dumpleton
On Aug 30, 1:54 pm, dave b wrote: > On 30 August 2010 11:04, Russell Keith-Magee wrote: > > > > > > > On Sun, Aug 29, 2010 at 8:26 PM, dave b wrote: > >  1) An actual problem where you can clearly describe the circumstances > > or sequence of events that would allow an attack to occur, and > >

Re: deployment problem gotcha

2010-08-30 Thread Graham Dumpleton
On Aug 30, 5:36 pm, Mike Dewhirst wrote: > I had an admin media problem finding base.css in deploying an app from > the Django (svn head) dev server on Windows to Apache 2.2 on Linux > > Because I had prepared this email ready to ask for help, I'm posting it > anyway with the hope that it helps

Re: Model validation for non-django-orm databases

2010-08-30 Thread David De La Harpe Golden
On 30/08/10 06:07, onelson wrote: > I've read that a "hack" around this kind of issue is to use the meta > unique_together property and almost arbitrarily set primary_key on one > of the fields. That sounds great, except for the fact that I've got > no guarantee that any given field will actually

Bidirectional syncdb and fixtures save

2010-08-30 Thread Alexandre González
Hi! I'm developing a little project, so I'm using sqlite at the moment only to test... when I change something on my model most times I must delete my db.sqlite and create it again with syncdb to the changes made effect... Is it any module or another way to automagically create the fields (or era

Re: Мобильная версия

2010-08-30 Thread Sergey Panfilov
Hm, I thought it was django-mobile, however I've checked the link and description reminds me that project. By the way, there's also a django- wurfl at github: http://github.com/clement/django-wurfl. The latest commit was on January 21, 2010. On Aug 29, 9:30 pm, Aspontus wrote: > You probably mean

Re: Мобильная версия

2010-08-30 Thread Sergey Panfilov
Please, fix encoding of your message. On Aug 30, 1:46 am, Anton Bessonov wrote: > - . , > Σ > " / ". > . > > > > > , , > > , , , > > , . > > ? > > User Agent' > > User Agent > > ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: manage.py: syncdb/sql do not pick up models from custom directory structure

2010-08-30 Thread Alex Robbins
If you define your models somewhere django doesn't expect, I think you need to add the app_label in the model's Meta class. http://docs.djangoproject.com/en/1.2/ref/models/options/#app-label They mention the models submodule use case in the docs. Hope that helps, Alex On Aug 30, 6:56 am, Daniel

Re: GeoDjango: default 4326 SRID doesn't work for transform()

2010-08-30 Thread kyleduncan
Hi, thanks for the tips! to answer your questions: 1. our model doesnt specify a coordinate system, it just saves the lat and lng that are returned from google maps. 2. i thought transforming had to be done to make a lat/lng point "spatial" before distance was calculated. have i got that wrong? 3

Re: Model validation for non-django-orm databases

2010-08-30 Thread Owen Nelson
> With the hack i think you mean, it doesn't matter, just pick one, the > point of the hack is you just shamelessly lie to the django ORM. So make > sure to make your model ummanaged and _don't_ try to save. > Excellent. Yeah, I'd been planning on overriding save() to make it raise NotImplemented

Is there a way to dumpdata truncate to last n lines?

2010-08-30 Thread rh0dium
Hi Folks, Is there anyway to dump the last 'n' lines of the db. I like to build test fixtures but with 3M lines it's a bit much... Thanks --- Steven M. Klass ☎ 1 (480) 225-1112 ✉ skl...@pointcircle.com -- You received this message because you are subscribed to the Google Groups "Django u

Custom attributes in Django

2010-08-30 Thread Sebastian Pawlus
Hi Maybe im looking in wrong places or maybe there is no application to cover functionality of carrying custom/admin defined attributes, or maybe it isn't even possible. Use Case could looks like Defining models from customr_attr import models class ObjectWithCustom(models.Model): name = m

Geodjango + Docstrings

2010-08-30 Thread David Z
Hello, I can't generate docs from my docstrings for geographic models w/ geodjango. I opened this bug, with a really simple test case: http://code.djangoproject.com/ticket/14183 Is this a good test case? Is there anything else I can do to assist in this bug's resolution? Thanks, z -- You rec

How to display the user profile in the admin interface?

2010-08-30 Thread João Rodrigues
I have a company model class Company(models.Model): name = models.CharField(max_length=50) address = models.TextField() phone = models.CharField(max_length=15) fax = models.CharField(max_length=15) and I wanted to associate each user to a company, so I read http://docs.djangoproje

Re: potential issue re in memory django file uploading.

2010-08-30 Thread dave b
/me rolls eyes. You have a valid point re /tmp, sorry I am used to mounting /tmp as /tmpfs - my mistake :) Ok lets be *really* clear the security problem still exists. An attack can in the limits set on the maximum post by the httpd / module in use upload a large file. > I don't actually use Djan

Re: Model validation for non-django-orm databases

2010-08-30 Thread David De La Harpe Golden
On 30/08/10 15:12, Owen Nelson wrote: > I just started to wonder if the ORM would, I don't > know... "freak out" on the off-chance I run a query that returns a set of > objects with duplicate values on what is supposed to be the pk. Nah, you just get multiple objects back with the same "pk", map

Re: How to display the user profile in the admin interface?

2010-08-30 Thread Sithembewena Lloyd Dube
Hi João, Add myapp.UserProfile to the INSTALLED_APPS global variable of your settings.py file, and in your admin.py file, import the model/s. On Mon, Aug 30, 2010 at 5:04 PM, João Rodrigues wrote: > I have a company model > > class Company(models.Model): >name = models.CharField(max_length=5

Re: How to display the user profile in the admin interface?

2010-08-30 Thread Sithembewena Lloyd Dube
Don't forget to run manage.py syncdb to create table/s for your model/s. On Mon, Aug 30, 2010 at 5:28 PM, Sithembewena Lloyd Dube wrote: > Hi João, > > Add myapp.UserProfile to the INSTALLED_APPS global variable of your > settings.py file, and in your admin.py file, import the model/s. > > > On M

Re: Pass extra data in post_save?

2010-08-30 Thread Bill Freeman
If you have control of the sending model, you can, so long as you avoid field and method names, just add a reference to the user to the instance. inst.user = request.user Since it's not a field, it won't affect the saving of the instance, but it will be there in the instance passed in the sign

Re: Is there a way to dumpdata truncate to last n lines?

2010-08-30 Thread Beres Botond
Hi Steven, You can use the django-test-utils app, more specifically it's "makefixture" command, then you can just dump a single model instance if you want. Or a subset of model instances. You can see it here: http://github.com/ericholscher/django-test-utils/blob/master/test_utils/management/comman

Re: How to display the user profile in the admin interface?

2010-08-30 Thread João Rodrigues
Thanks, I did run syncdb and added myapp to the INSTALLED_APPS. "Company" appears in the admin interface under myapp. But what I wanted to do is to show the UserProfile fields in the Add/Change user page. I was thinking in subclassing django.contrib.auth.admin.UserAdmin and adding the UserProfile

Re: Custom attributes in Django

2010-08-30 Thread Beres Botond
Hi Sebastian, I suppose you are trying to do something like this? class CustomAttributes(models.Model): name = models.CharField(max_length=30) value = models.CharField(max_length=50) class ObjectWithCustom(models.Model): name = models.CharField(max_length=30) attributes = models.

urlencode in Django

2010-08-30 Thread refreegrata
Hello lista, I'm a newbie in django. In php i have the urlencode function for encoding an url with characters "+","ñ","ó", Has Django an urlencode or similar function? Thanks for read, and sorry my bad english P.D.: django 1,2.1 -- You received this message because you are subscribed to t

Re: prepopulated_fields do not work at all Django 1.2

2010-08-30 Thread Goran
I agree with you but it is the situation. I didn't know Django version on the production server (shared) before I run the project. On Aug 30, 10:00 am, bruno desthuilliers wrote: > Not really an answer to your question, but you should definitly dev > using the the same versions of Django and an

Re: Overriding flatpages class meta

2010-08-30 Thread Goran
I was try class Meta(FlatPage.Meta): but when runserver there is following error: AttributeError: type object 'FlatPage' has no attribute 'Meta' any other solution to try? Thanks On Aug 30, 12:53 am, Steve Holden wrote: > On 8/29/2010 6:51 PM, Goran wrote: > > > Thanks for the answer Stev

Re: Model validation for non-django-orm databases

2010-08-30 Thread Owen Nelson
Sounds good. Thanks for the advice! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. Fo

Re: prepopulated_fields do not work at all Django 1.2

2010-08-30 Thread Goran
Finally problem is fixed. In the admin/media/js was been files from Django 1.1 after uplod 1.2 files everything works as expected. On Aug 30, 6:52 pm, Goran wrote: > I agree with you but it is the situation. I didn't know Django version > on the production server (shared) before I run the proje

Surreptitious caching of JS in Django

2010-08-30 Thread buddhasystem
Hello, with the generous help of many of you, I easily set up JSON caching feature in my Django app, in a few views. The problem I'm now facing is that according to what I observe, Django also caches Javascript code in its memcached backend. While this is a welcome behavior in a deployed app, it

Re: Overriding flatpages class meta

2010-08-30 Thread Owen Nelson
Sorry to be guessing here, but I was looking at something similar recently. My attempt (untested at this point) would be something like: from copy import copy class NewFlatpage(FlatPage): _meta = copy(FlatPage._meta) _meta.verbose_name_plural = "foo" -- You received this message because

Re: urlencode in Django

2010-08-30 Thread Alexandre González
example from one of my codes... import urllib parameters = ({'langpair': '%s|%s' % (self.detected_language, 'en'), 'v': '1.0', 'q': self.words_list.encode('utf-8') }) urllib.urlencode(parameters) but what do you need this? Becasue you can find a more

set utf8 as default database char set

2010-08-30 Thread elim
In my MySQL's my.ini, I have default-character-set=latin1 But I like to use utf-8 for all my Django projects. What I should set in settings.py? Thanks a lot. ===I just get Django installed, not even done with the 1st tutorial -- You received this message because you are subscribed to the

Re: urlencode in Django

2010-08-30 Thread Felix Dreissig
The urlquote() function from django.utils.http and the "urlencode" template filter might be exactly what you're looking for. Regards, Felix refreegrata schrieb: Hello lista, I'm a newbie in django. In php i have the urlencode function for encoding an url with characters "+","ñ","ó", Has

static files

2010-08-30 Thread Bradley Hintze
Hi all, I have my site on a production server (apache) and am trying to get static files to be served but cannot get it to work (serving on the same server). Following the django documentation did not work, I edited the httpd.conf as described in the documentation but when I tried to restart the s

Re: urlencode in Django

2010-08-30 Thread Shawn Milochik
This a Python question, not a Django question. import urllib urllib.quote("+ ñ ó") '%2B%20%C3%B1%20%C3%B3' Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe

Re: manage.py: syncdb/sql do not pick up models from custom directory structure

2010-08-30 Thread Dan
On 30 Aug., 13:56, Daniel Roseman wrote: > In your lib/models/__init__.py, do `from FooModels import *` for each > model file. OK, that does the trick. When I import the models in lib/__init__.py they are being recognized by the manage.py script. I guess I could just look for *.py files in lib/mod

Staticstic app, any suggestion?

2010-08-30 Thread romi.lucian
I want to make a statistic app. There is a float field in my model(table). I want to use a chart to show what's the percentage in each range. Any suggestion to make such and app that can fit into django model. Thanks. -- You received this message because you are subscribed to the Google Groups "

Staticstic app, ask for idea.

2010-08-30 Thread hollando
I want to make a statistic app. There is a float field in my model(table).I want to use a chart to show what's the percentage in each range. Any suggestion to make such and app that can fit into django model. Thanks. -- You received this message because you are subscribed to the Google Groups "D

Re: static files

2010-08-30 Thread Łukasz Rekucki
On 30 August 2010 20:26, Bradley Hintze wrote: > Hi all, > > I have my site on a production server (apache) and am trying to get > static files to be served but cannot get it to work (serving on the > same server). Following the django documentation did not work, I > edited the httpd.conf as descr

Re: static files

2010-08-30 Thread Daniel Roseman
On Aug 30, 7:26 pm, Bradley Hintze wrote: > Hi all, > > I have my site on a production server (apache) and am trying to get > static files to be served but cannot get it to work (serving on the > same server). Following the django documentation did not work, I > edited the httpd.conf as described

{% csrf_token %} template tag not outputting the hidden field

2010-08-30 Thread Erik
Hi Django Users- I'm having trouble with the {% csrf_token %} tag. On my site I have a regular login view / page / url, which uses the django contrib registration app. I include the CSRF token in my login template and it works fine. I'd also like a little login box in the corner of

Re: static files

2010-08-30 Thread Bradley Hintze
I think you just found my problem...lol. I'll let you know if I still have problems On Mon, Aug 30, 2010 at 2:59 PM, Daniel Roseman wrote: > On Aug 30, 7:26 pm, Bradley Hintze > wrote: >> Hi all, >> >> I have my site on a production server (apache) and am trying to get >> static files to be serv

Re: static files

2010-08-30 Thread Bradley Hintze
OK, I followed http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango and still sant seem to get my image up. hpptd.conf #WSGI stuff # Alias /media/ /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/media/ Order deny,allow Allow from all WSGIScriptAlias / /Users/bradleyhin

Re: static files

2010-08-30 Thread Bradley Hintze
I added: AliasMatch /([^/]*\.gif) /Users/bradleyhintze/djcode/production/MolProbity_Compare_test/media/$1 and it worked. YAY! On Mon, Aug 30, 2010 at 3:26 PM, Bradley Hintze wrote: > OK, > > I followed http://code.google.com/p/modwsgi/wiki/IntegrationWithDjango > and still sant seem to get my i

Re: urlencode in Django

2010-08-30 Thread refreegrata
i'm sorry in my last time accidentally send the post before of finish. I try to do in the template something like {{ my_var|urlencode }} but don't work. Can i do something like an urlencode in the template? P.D.: I'm from Chile. -- You received this message because you are subscribed to the Go

Missing template variable when using django admin list_display

2010-08-30 Thread christian.oudard
On Django 1.2, I'm getting a missing template variable when using a custom formatter in the django admin. Here is my admin class: class CustomerAdmin(admin.ModelAdmin): fields = [ 'name', ] list_display = [ 'name', 'customer_tenants', ] def customer_ten

Re: {% csrf_token %} template tag not outputting the hidden field

2010-08-30 Thread Daniel Lathrop
I may misunderstand how csrf_token works, but I think it needs to be used in conjunction with the forms system, which would require you to pass a form to your template. Are you doing that? Daniel Lathrop News Applications Editor The Dallas Morning News --- Daniel Lathrop 20

Re: urlencode in Django

2010-08-30 Thread Alexandre González
Why do you like to do it? I think that your problem is with codification, and not with urlenconde... try to search about utf8 and html On Mon, Aug 30, 2010 at 22:09, refreegrata wrote: > i'm sorry in my last time accidentally send the post before of > finish. > I try to do in the template some

Re: Staticstic app, ask for idea.

2010-08-30 Thread bruno desthuilliers
On 30 août, 20:24, hollando wrote: > I want to make a statistic app. > There is a float field in my model(table).I want to use a chart to > show what's the percentage in each range. > Any suggestion to make such and app that can fit into django model. Nope, but reposting the same question two tim

Re: urlencode in Django

2010-08-30 Thread refreegrata
for the moment i don´t have a problem, the section of my site work's fine. Maybe is just a PHP habit. In php when a wont to build an url in the template i do somethin like echo 'http://mysite.php?aaa='.urlencode($aaa).'>link'; -- because $aaa can

Re: urlencode in Django

2010-08-30 Thread Alexandre González
With django you can define you url in urls.py as: url(r'^sample$', sample, name='the_name'), and then in your template use: {% url the_name %} If it need a id or similar you can provide it with {% url the_name ID %} On Mon, Aug 30, 2010 at 23:08, refreegrata wrote: > for the moment i don´t ha

Re: Pass extra data in post_save?

2010-08-30 Thread bruno desthuilliers
On 30 août, 17:58, Bill Freeman wrote: > If you have control of the sending model, you can, so long as you > avoid field and method names, ??? > just add a reference to the user to the > instance. If the OP has control over the sending model, he can overrides the save method. FWIW, he can eve

Re: urlencode in Django

2010-08-30 Thread refreegrata
i know how configure my urls.py is ok, with regular expression. but i must do something like link Now works. In the browser url the character "ñ" is not converted to "%C3%B1", but the character "+" is converted to "%2B". maybe i have some problems with the theory. Maybe the character "ñ" isn't a

Re: urlencode in Django

2010-08-30 Thread Alexandre González
use a ñ in a url isn't a good way to work... why don't you change it for a n? With a ñ you could have problems between explorers. Anyway, you can use link On Mon, Aug 30, 2010 at 23:29, refreegrata wrote: > i know how configure my urls.py is ok, with regular expression. but i > must do somethin

Re: urlencode in Django

2010-08-30 Thread refreegrata
now works for all characters. I don't know why, but now finally works. ñ is converted to "%C3%B1", ó is converted to "%C3%B3", + to "%2B", ... thanks. P.D.: I hate use special characters in an url, generaly is a bad idea, but is necessary in my application. The client want to filter registers ac

Saving a location with a model

2010-08-30 Thread Joel Klabo
I want to tie a location to each instance of a model. I am planning on getting the lat/long. from navigator.geolocation through javascript. My original idea is to have a location model with fields, latitude, longitude, and the id of whatever model it is linked to. Is that the way to go? Anyone have

Re: Saving a location with a model

2010-08-30 Thread Mikhail Korobov
You may find this useful: http://bitbucket.org/barttc/django-generic-location On 31 авг, 04:05, Joel Klabo wrote: > I want to tie a location to each instance of a model. I am planning on > getting the lat/long. from navigator.geolocation through javascript. > My original idea is to have a locatio

Re: Saving a location with a model

2010-08-30 Thread Joel Klabo
looks cool. Any problems with just adding lattitude and longitute float fields? On Aug 30, 3:38 pm, Mikhail Korobov wrote: > You may find this useful:http://bitbucket.org/barttc/django-generic-location > > On 31 авг, 04:05, Joel Klabo wrote: > > > > > I want to tie a location to each instance of

Re: Staticstic app, ask for idea.

2010-08-30 Thread sebastien piquemal
I created an app to easily generate the stats part : http://code.google.com/p/django-cube/ ; however you still have to create the chart, for example with matplotlib : http://www.scipy.org/Cookbook/Matplotlib/Django. To create your stats with django-cube, you can use this code : from cube.mode

Please wait page trouble

2010-08-30 Thread Bradley Hintze
I am attempting to do a lengthe calculation that will require the user to wait a bit. I want a 'Please wait page to come up while the lengthy calculation is performed. I thought this might work: views.py def please_wait(request): return HttpResponse('Please Wait..') def run_DHM(request):

Re: potential issue re in memory django file uploading.

2010-08-30 Thread Graham Dumpleton
On Aug 31, 1:09 am, dave b wrote: > /me rolls eyes. > You have a valid point re /tmp, sorry I am used to mounting /tmp as > /tmpfs - my mistake :) > Ok lets be *really* clear the security problem still exists. > An attack can in the limits set on the maximum post by the httpd / > module in use u

Re: potential issue re in memory django file uploading.

2010-08-30 Thread Russell Keith-Magee
On Mon, Aug 30, 2010 at 11:09 PM, dave b wrote: >> I don't actually use Django so not 100% sure, but yes there possibly >> isn't an equivalent of LimitRequestBody definable within Django unless >> can be done with middleware. > > Ok so you don't even use django, ok... > You know I think I missed y

Re: potential issue re in memory django file uploading.

2010-08-30 Thread dave b
>> Secure by default please! > > That's an easy epithet to throw around, but I disagree that it is > appropriate here. "Security" doesn't mean "stops the user from making > mistakes". Look like wsgi, apache2 and django all on ubuntu PLACE no size limits at all by default. Isn't that neat? I think

Re: potential issue re in memory django file uploading.

2010-08-30 Thread dave b
> > From my testing (granted this was run against something pre-1.2 so things > may have changed since then), as soon as you initiate the first file upload, > you're monopolizing the devserver process, preventing further attempts to do > the following 9 uploads until the first has completed (succes

Re: potential issue re in memory django file uploading.

2010-08-30 Thread Tim Chase
On 08/30/10 10:09, dave b wrote: well you finish the tutorial(s) now and then you try to upload a file right? So you start uploading the file. Now because (I assume you are still using the django built in webserver) why don't you play with this a bit, start uploading say 10 1gb files(all at once)

django 1.2.1 csrf error

2010-08-30 Thread womenshizuihaode womenshizuihaode
under wsgi + apache, there is no error but when i change to nginx + fastcgi, i got csrf error. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, s

Re: potential issue re in memory django file uploading.

2010-08-30 Thread Steve Holden
On 8/30/2010 9:09 PM, dave b wrote: >>> Secure by default please! >> >> That's an easy epithet to throw around, but I disagree that it is >> appropriate here. "Security" doesn't mean "stops the user from making >> mistakes". > > Look like wsgi, apache2 and django all on ubuntu PLACE no size limits

Re: hosting django applications

2010-08-30 Thread creecode
Hello Rodrigo, I'm happy with EC2. Others feel it is not a good value for the money. Previous posts to this group have gone over this topic so you may want to look those message up. On Aug 27, 6:54 pm, Rodrigo Lombardo wrote: > I'm planning to deploy my first django application and I think it

Re: potential issue re in memory django file uploading.

2010-08-30 Thread Russell Keith-Magee
On Tue, Aug 31, 2010 at 9:09 AM, dave b wrote: >>> Secure by default please! >> >> That's an easy epithet to throw around, but I disagree that it is >> appropriate here. "Security" doesn't mean "stops the user from making >> mistakes". > > Look like wsgi, apache2 and django all on ubuntu PLACE no

Re: potential issue re in memory django file uploading.

2010-08-30 Thread dave b
> And, for the record, the fact that Ubuntu or Debian have chosen these > defaults doesn't make Apache insecure either. System defaults exist to > make it easy and obvious to get something started. A responsible > sysadmin for a public-facing webserver shouldn't be using *any* > OS-provided default

Re: potential issue re in memory django file uploading.

2010-08-30 Thread Russell Keith-Magee
> On 8/30/2010 9:09 PM, dave b wrote: >> Do not pass go do not collect profit! ... >> Put your hands up in the air like you just don't care! ... >> blahblahblalbha sssh listen. ... On Tue, Aug 31, 2010 at 9:42 AM, Steve Holden wrote: > Frankly, at this stage you can stick it up your ass and set

Re: potential issue re in memory django file uploading.

2010-08-30 Thread Steve Holden
Thanks for the reminder. I apologize. regards Steve On Aug 30, 2010 10:04 PM, "Russell Keith-Magee" wrote: >> On 8/30/2010 9:09 PM, dave b wrote: >>> Do not pass go do not collect profit! > ... >>> Put your hands up in the air like you just don't care! > ... >>> blahblahblalbha sssh listen. > ..

Re: potential issue re in memory django file uploading.

2010-08-30 Thread dave b
On 31 August 2010 12:04, Russell Keith-Magee wrote: >> On 8/30/2010 9:09 PM, dave b wrote: >>> Do not pass go do not collect profit! > ... >>> Put your hands up in the air like you just don't care! > ... >>> blahblahblalbha sssh listen. > ... > > On Tue, Aug 31, 2010 at 9:42 AM, Steve Holden wrot

Re: set utf8 as default database char set

2010-08-30 Thread Rolando Espinoza La Fuente
On Mon, Aug 30, 2010 at 1:58 PM, elim wrote: > In my MySQL's my.ini, I have > > default-character-set=latin1 > > But I like to use utf-8 for all my Django projects. What I should set > in settings.py? Django already uses utf8 by default. Even, as far I know, is not possible to use another charact

Re: Please wait page trouble

2010-08-30 Thread Rolando Espinoza La Fuente
On Mon, Aug 30, 2010 at 7:18 PM, Bradley Hintze wrote: > I am attempting to do a lengthe calculation that will require the user > to wait a bit. I want a 'Please wait page to come up while the lengthy > calculation is performed. I thought this might work: > > views.py > > def please_wait(request):

Model Validation - Prevent Datetimefield overlaps?

2010-08-30 Thread Victor Hooi
heya, I have a model that contains a whole bunch of bytes in/out for datetime ranges. I.e.: class BandwidthUsageEntry(models.Model): start_of_usage_block = models.DateTimeField() end_of_usage_block = models.DateTimeField() bytes_in = models.IntegerField() bytes_out = models.Intege

Re: potential issue re in memory django file uploading.

2010-08-30 Thread Russell Keith-Magee
On Tue, Aug 31, 2010 at 10:01 AM, dave b wrote: >> And, for the record, the fact that Ubuntu or Debian have chosen these >> defaults doesn't make Apache insecure either. System defaults exist to >> make it easy and obvious to get something started. A responsible >> sysadmin for a public-facing web

Re: Staticstic app, ask for idea.

2010-08-30 Thread Lucian Romi
Thanks Sebastien. Can I integrate Cube with filter and search features from the admin app? Also, to make things simple, I'm going to use GChart, but I need statistic data. Let me download Cube and spend some time on it. Thanks. On Mon, Aug 30, 2010 at 4:16 PM, sebastien piquemal wrote: > I creat

Re: Missing template variable when using django admin list_display

2010-08-30 Thread Karen Tracey
On Mon, Aug 30, 2010 at 4:13 PM, christian.oudard < christian.oud...@gmail.com> wrote: > On Django 1.2, I'm getting a missing template variable when using a > custom formatter in the django admin. > > Here is my admin class: > > class CustomerAdmin(admin.ModelAdmin): >fields = [ >'name

Re: potential issue re in memory django file uploading.

2010-08-30 Thread dave b
> His response is to say he will escalate this to some other security > forum. We can only assume that this is a threat that he will raise > merry hell until we do what he says. Right first: Yes I am sorry for the 9 or so posts :) I am only human. Right. Um no that's not a threat. That's being re

Re: Model Validation - Prevent Datetimefield overlaps?

2010-08-30 Thread Karen Tracey
On Mon, Aug 30, 2010 at 10:34 PM, Victor Hooi wrote: > Just playing around - I noticed that setting "unique=True" on a > DateTimeField() doesn't seem to work? As in, I was able to do > something like: > > b1 = > > BandwidthUsageEntry(start_of_usage_block=datetime.datetime(2007,05,05,12,05), > > e

Django UserProfile's - the hardest part of the whole framework

2010-08-30 Thread reduxdj
So, I'm still newer to django. I have user registration, authentication, imagefields, filters, and more all built into my application and working. So now, I need a user to be able to edit his own email and upload an image to the user_profile. First, I am using RegistrationProfile for the django reg

Re: deployment problem gotcha

2010-08-30 Thread Mike Dewhirst
Graham Thanks for your response. Everything works nice now. I read the reference and fixed the missing slashes and commented out print functions if dev-oriented or added the print option file=sys.stderr if reporting an error. Nice to learn something before it bites :) I have decided to keep

Re: set utf8 as default database char set

2010-08-30 Thread Elim Qiu
Thanks Rolando Espinoza La Fuente ! On Mon, Aug 30, 2010 at 8:27 PM, Rolando Espinoza La Fuente < dark...@gmail.com> wrote: > On Mon, Aug 30, 2010 at 1:58 PM, elim wrote: > > In my MySQL's my.ini, I have > > > > default-character-set=latin1 > > > > But I like to use utf-8 for all my Django proje

Query overhead or not ?

2010-08-30 Thread Jonas Geiregat
First of all I know of the django-taggit application. But I'm new to django and I thought this would be a good way of getting to know this great framework a little bit better. That lined out, I have a Post and a Tag model. Each Tag.name property of the tag model is unique. I'm trying to figure