How to use PythonOption DjangoPermissionName in apache authentication?

2008-10-22 Thread Eric
Hi everybody, I set apache authentication against django's user database. and I want to limit a location to a group of people of my django staff. I set this in apache's config file like this: SetHandler cgi-script # authentication method

Re: How to use PythonOption DjangoPermissionName in apache authentication?

2008-10-23 Thread Eric
I've got the answer the permission format used in DjangoPermissionName is in my example, it's 'main.printdriver_developer' On Oct 22, 11:56 pm, Eric <[EMAIL PROTECTED]> wrote: > Hi everybody, > > I set apache authentication against django's user databas

Adding a "subtotal" row to the Admin change list page?

2008-11-11 Thread Eric
Hi folks, I am using the default Admin pages for my site, and I have a modification/customization question. I am wondering what the best approach would be to modify the admin change list page so that there can be a new row that sums the contents of all the other rows. For example, each row in the

Configuring Paths for FileField ?

2008-12-01 Thread Eric
Hi! I'm new at Django, but I've been having relatively good luck. I've recently hit a big of a wall using FileField. I have set up the paths correctly enough that I can upload files to /my_site/uploads/photos, but when I view the model containing the FileField in the admin interface, it shows

Re: Configuring Paths for FileField ?

2008-12-02 Thread Eric
Thanks! That's really helpful. So, in a production environment, you'd set up the MEDIA_ROOT to be somewhere within the generally accessible web-root, right? -E On Dec 2, 3:28 am, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 2 déc, 08:58, Eric <[EMAIL PROTE

Can javascript call a python script?

2008-12-03 Thread Eric
Hello, this might be a silly question, but I'm wondering if javascript can call a python script, and if so, how? To elaborate, I'm trying to customize the admin change_list page so that editing can be done directly from the change_list, instead of clicking into the admin change_form page. To do t

Re: order of apps in the admin panel

2008-10-13 Thread Eric
Quoted from the very bottom of Tutorial 2: """Customize the admin index page On a similar note, you might want to customize the look and feel of the Django admin index page. By default, it displays all the apps in INSTALLED_APPS that have been registered with the admin application, in alphabetic

Changing the default filter values in the admin site?

2009-01-20 Thread Eric
Hello, when using the django admin site, none of my filters are initially applied to the change-list page (all filters are instead set to "All"). I'm wondering if there's a way to change this so that by default, one of the filters is applied. This was also asked here, http://groups.google.com/g

Accessing filter values on the admin site? (i.e. need help running a filter-dependent script)

2009-01-20 Thread Eric
Hello, I'm customizing the admin site, and I've run into an issue I cannot find the solution to. I'm trying to create a new button on the change_list page that, when pressed, runs a particular script with input values dependent on the filters that are currently applied to that change_list page. S

Admin filtering on a foreign key is "an unsorted mess" (not my words)

2009-02-19 Thread Eric
Hi, I have an admin filter that filters all entries that have a particular foreign key. Specifically, this foreign key is a "Code" object that contains a "Code #" and a "Description". In the admin filter display, it shows all the codes I can filter by, but they are all out of order, i.e. Filter

Re: Admin filtering on a foreign key is "an unsorted mess" (not my words)

2009-03-15 Thread Eric
Thanks a lot, Daniel! That did the trick. On Feb 20, 4:55 am, Daniel Roseman wrote: > On Feb 20, 4:32 am, Eric wrote: > > > > > Hi, I have an admin filter that filters all entries that have a > > particular foreign key. Specifically, this foreign key is a "Cod

Can't Internationalized

2009-03-17 Thread Eric
Hi, Now , I face a problem about Internationalization, I have used Django + python + extJs to created a log in html page. In the page , the user can select the language which will be shown in the next page . For instance, when you open the log in page , it was showed in English . Now , I just wa

My web page can not be Internationalized

2009-03-17 Thread Eric
Hi, Now , I face a problem about Internationalization, I have used django + python + extjs to created a log in html page. And my browser is Firefox. In the page , the user can select the language which will be shown in the next page . For instance, when you open the log in page , it was showed i

Re: My web page can not be Internationalized

2009-03-17 Thread Eric
Can anyone help me ? On Mar 17, 5:22 pm, Eric wrote: > Hi, Now , I face a problem about Internationalization, I have used > django + python + extjs to created a log in html page. And my browser > is Firefox. > > In the page , the user can select the language which will be show

Re: My web page can not be Internationalized

2009-03-18 Thread Eric
Our website is : www.cubelive.cn . when you use English browser and log in the index page , the problem will be shown ! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: My web page can not be Internationalized

2009-03-18 Thread Eric
Can anyone help me ? Tks --~--~-~--~~~---~--~~ 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-u

Re: My web page can not be Internationalized

2009-03-20 Thread Eric
There is the source code: //when you fill up all the form option and submit it , it will execute this if request.method == 'POST': lang_code=request.POST.get("language",request.LANGUAGE_CODE) if check_for_language(lang_code) and lang_code != request.session.get('django_language'):

How to deal with this Internationalization ?

2009-03-22 Thread Eric
Hi, Now , I face a problem about Internationalization, I have used django + python + extjs to created a log in html page. And my browser is Firefox. In the page , the user can select the language which will be shown in the next page . For instance, when you open the log in page , it was showed

Parsing / Deserializing a JSON String

2009-09-02 Thread Eric
row (g1 t2)", "own":"John Doe"}, {"stt":1, "end":2, "ttl":"test row - gr1 ga1 ta3", "own":"Mary Smith"} ] }, { "rows":[ {"stt":1, &q

Re: Parsing / Deserializing a JSON String

2009-09-02 Thread Eric
I forgot to mention that I am trying to deserialize the data as follows: " ... gantt_data = request.POST.get('ganttdata') for obj in serializers.deserialize("json", gantt_data): ... " On Sep 2, 10:37 am, Eric wrote: > Hi, > I am attempting to parse a

Re: Parsing / Deserializing a JSON String

2009-09-02 Thread Eric
Im using the Django deserialization method shown here: http://docs.djangoproject.com/en/dev/topics/serialization/ It goes something like: " ... gantt_data = request.POST.get('ganttdata') for obj in serializers.deserialize("json", gantt_data): ... " On Sep 2, 10:41 am, Andrew McGregor w

Re: Parsing / Deserializing a JSON String

2009-09-03 Thread Eric
;:"frame","own":"Ed"},{"stt": 6,"end":10,"ttl":"the rest","own":"Chris"}]}],"start":"2009-1-01"}, {"gantts":[{"rows":[{"stt":3,"end":5,"ttl&qu

Re: Parsing / Deserializing a JSON String

2009-09-05 Thread Eric
because it evaluates to "ganttgroups"['gantts'] > (which would give you the error you see. > > What you want is more like: > > for obj in serializers.deserialize('json', gantt_data)['ganttgroups']: >     start = obj['start'] >     fo

Re: Parsing / Deserializing a JSON String

2009-09-11 Thread Eric
7;, gantt_data): ") On Sep 6, 3:42 pm, "J. Clifford Dyer" wrote: > On Sat, 2009-09-05 at 16:12 -0700, Eric wrote: > > Thank you for your input.  I tried what you suggested by first just > > trying to loop through the data like so: > > > " > >

Re: How to deal with this Internationalization ?

2009-03-29 Thread Eric
Now,I have designed a Demo . It contains username ,password, and language . But ,when I submit , it can't work . what's wrong ? -- settings.py # Django settings for Test project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_em...@doma

Re: How to deal with this Internationalization ?

2009-03-29 Thread Eric
sorry , the correct code is below . I change the login.py into forms.py > -- > settings.py > > # Django settings for Test project. > > DEBUG = True > TEMPLATE_DEBUG = DEBUG > > ADMINS = ( >     # ('Your Name', 'your_em...@domain.com'), > ) > > MANAGERS = ADMINS > >

Re: select_related and 1-to-many relations

2009-04-07 Thread Eric
Thanks, although that reverses the logic, and only lets me select the most recent for one table. The example is actually simplified, my User object example actually has multiple items associated with it, for example, I want to show a User, most recent Item, most recent LogEntry, etc. On Apr 7, 4:

Re: custom comment app migration

2009-04-14 Thread Eric
raise AlreadyRegistered('The model %s is already registered' % model.__name__) Exception Type: AlreadyRegistered at /admin/ Exception Value: The model Comment is already registered On Apr 9, 10:15 pm, Eric Abrahamsen wrote: > I'm planning on migrating an exis

Tutorial part 4 doubt

2009-05-19 Thread eric
ll post the form at r'^(?P\d +)/vote/vote/$'. How to solve that? I hope I was clear. thanks in advance Eric --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Installation Problem on Mac OS Leopard

2009-11-27 Thread Eric
I'm trying to get Django installed and I can't figure out why its not working. I purchased the book Djang 1.0 web site development and the install instructions in the book are identical to instructions on the Django site. It seems simple enough but for some reason I always catch hell when it comes

URL Fetching Method Timing Out? Strange problem

2010-05-20 Thread Eric
Hi, I'm writing a facebook app with django and it is running on google app engine. Part of the application is calculating the strength of a relationship between friends, and classifying it as 1 (weak), 2 (acquaintance), or 3 (close bond). A copy of the relevant code is http://pastebin.com/AtQZDu65

Admin ModelMultipleChoiceField does not keep order

2010-05-24 Thread Eric
way to fix this cleanly. The only solution I found as of now is reorder the sequence based on raw data also in this method. I'm using development version at revision 12853. Thanks Eric -- You received this message because you are subscribed to the Google Groups "Django users" grou

Speed Comparison of Django on CPython to Jython

2010-05-26 Thread Eric
Some basic searching hasn't answered my question if django running on CPython or Jython is faster. I know its not that simple of an issue, but I'm about to start a large django project that is moderately resource intensive, and will have to scale to pretty large sizes. Could anyone link some benchm

UnicodeEncodeError

2010-07-29 Thread Eric
ew 901. self.log_change(request, new_object, change_message) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/django/contrib/admin/options.py" in log_change 443. object_repr = force_unicode(object), File

Copying the Django Admin Interface

2010-08-16 Thread Eric
Hello, I am new to Django, and I am trying to develop an application for researchers to submit data to a database. I believe that the default admin interface from django.contrib.admin should be just about perfect for the job. I either want to subclass AdminSite and make my own administration page

Empty Response

2010-11-02 Thread Eric
, the response is empty. And this appears to be only when I make an AJAX request since all of the other requests and responses produce the expected results. I don't know how to go about troubleshooting this. Does anybody know what is going on here? Or, how to troubleshoot this? Thanks! Eri

Re: Empty Response

2010-11-05 Thread Eric
n/x-www-form-urlencoded X-Requested-With: XMLHttpRequest Referer: http:///search/ HTTP/0.9 200 OK There is no redirect and the status code is 200. Also, in firebug I see the request sent and in my app log, I see the request being received correctly. When I look at response in Firebug, it is

Re: Empty Response

2010-11-05 Thread Eric
Actually, I just realized that Python is crashing silently during one of my method calls. But, this only happens when coming through Apache and not when I hit Django's own server directly. :( Thanks for the help! On Nov 5, 9:31 am, Eric wrote: > In "Live HTTPS headers", a FF

Re: Empty Response

2010-11-05 Thread Eric
Yep, that is what it was. Our SA did some Googling and found the solution to the problem. http://code.google.com/p/modwsgi/wiki/IssuesWithExpatLibrary Thanks for the help and thoughts. On Nov 5, 9:47 am, Eric wrote: > Actually, I just realized that Python is crashing silently during one &

newbie admin question

2010-11-24 Thread eric
While I've been using python for years, I'm new to django and I've found myself puzzled about something. I created my models and then activated the admin app, which is cool. I really like how sophisticated the admin system is out of the box. However, when I went to organize fields using the models

Re: newbie admin question

2010-11-24 Thread eric
Well, there are a number of models, so I'll just give an example of the one that is misbehaving: from pages.models import Chapter from django.contrib import admin class CharacterInline(admin.StackedInline): model = Character class CharacterAdmin(admin.ModelAdmin): inlines = [CharacterIn

Re: Is Django thread safe?

2008-03-29 Thread Eric
soul and I assumed that if the documentation prefered threaded, it was safe. Generally your pretty safe with threading unless you're using module level or global variables. I hope that helps. Eric. On Mar 29, 3:26 pm, Peter Rowell <[EMAIL PROTECTED]> wrote: > > The best I have

Re: Is Django thread safe?

2008-03-29 Thread Eric
Sorry, I forgot to post the url to the fastcgi docs http://www.djangoproject.com/documentation/fastcgi/ On Mar 29, 7:52 pm, Eric <[EMAIL PROTECTED]> wrote: > I currently use lighttpd and fastcgi, and I noticed that in the django > documentation that they mention using threade

Re: Django API interface adapter for Google App Engine

2008-04-12 Thread Eric
Here's a project being developed by Google. Guido is even involved: http://code.google.com/p/google-app-engine-django/ On Apr 12, 5:58 am, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > Great stuff, man! > > I'll try to have an in-depth look this weekend and I'll se if I can help > with anything. >

Re: Announcing the Django Dash!

2008-04-23 Thread Eric
I see that you can have a team of two, does that include a designer? On Apr 14, 2:31 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Jonathan, > > I consider those to be utility libraries (unlikely to comprise your > entire app) and should be fine for use.  You may want to document what > ve

Re: Announcing the Django Dash!

2008-04-23 Thread Eric
t the ratings it seems that if we > take one of our 3 people out then we'll lose many points. and chance > to get 3? maybe by popular demand?On Wed, Apr 23, 2008 at 11:25 AM, Eric > <[EMAIL PROTECTED]> wrote: > > > I see that you can have a team of two, does that inclu

Re: django-tagging or search engine?

2008-05-01 Thread Eric
I was experimenting with that very thing just now. Doing tagging in a sql database can get pretty expensive quick. I was experimenting with pysolr and solr. Solr is a enterprise search engine server . Solr is a little more work than to get set up than us pythonistas are used to, but it's fast.

I cannot get Django to process files.

2008-05-29 Thread Eric
I simply cannot get this to work. I am attempting to run Python/Django on Apache/Windows. When I run the mpinfo it shows the mod_python service is available, but i cannot even view the most simple example shown in the online book (current_datetime view). I am using the basic installation (ie my p

Re: I cannot get Django to process files.

2008-05-29 Thread Eric
Wow. That fixed it. Thank you! I didn't realize I was so close. I obviously have a bit to learn about Django (and Apache). This should help get me started. On May 29, 10:56 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Thu, May 29, 2008 at 1:40 PM, Eric <[EMAIL

Template Tag caveat

2008-06-17 Thread Eric
This isn't a bug but it's something that might need to be documented to prevent folks from doing something that may hurt them later: In the Django template system. There is a small caveat that you need to recognize when developing your own template tags. When Django parses the Node tree it crea

Re: Template Tag caveat

2008-06-17 Thread Eric
name this more accurately self.obj_expression = obj_expression def render(self, context): # Use a local variable instead of a object attribute obj = template.resolve_variable(self.obj_expression, context) return str(obj) On Jun 17, 6:1

Re: Template Tag caveat

2008-06-18 Thread Eric
ngs that should be known so that other folks won't make the same mistake. E. On Jun 18, 4:20 am, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 18 juin, 00:14, Eric <[EMAIL PROTECTED]> wrote: > > > > > This isn't a bug but it's something that

Re: Passing user.is_superuser through form

2006-08-22 Thread Eric
errors = manpulator.get_validation_errors() if not errors: manipulator.do_html2python(new_data) manipulator.save(new_data) Let's say you're just have a form that sets the Name of the user, new_data = {'firstname' : 'Eric', 'lastname' : 'Moritz'} if someone

Product to help Localize Django Application

2010-12-21 Thread Eric
We have a Django application that we would like to localize in Spanish. However, nobody in our group speaks Spanish and so, we have sent the po file out for translating. This has caused problems because some of the editors get confused by the file structure. So, I was wondering if there is an appl

Re: Product to help Localize Django Application

2010-12-21 Thread Eric
gt; > On 21 Dec 2010, at 15:58, Eric wrote: > > > We have a Django application that we would like to localize in > > Spanish. However, nobody in our group speaks Spanish and so, we have > > sent the po file out for translating. This has caused problems because > >

Re: Problem with contrib.comments and signals: instance is not defined

2008-10-24 Thread Eric Abrahamsen
e is my code: You might also consider using one of the custom signals that come with the comment app, they are part of the comment posting process and as such are easier to use for some things like this: http://docs.djangoproject.com/en/dev/ref/contrib/comments/signals/ Eric > def modera

Re: comment_was_posted

2008-10-29 Thread Eric Abrahamsen
urn values for comment_was_posted are ignored altogether. What you want is to add a 'next' value into your comment post form; that will automatically be used as redirect value after the comment is posted. Take a look at the code in post_comment, inside django.contrib.comments.views.c

Re: Syndication Feed-Problem

2008-10-30 Thread Eric Abrahamsen
On Oct 30, 2008, at 7:04 PM, [EMAIL PROTECTED] wrote: > > Hi, > i hope any one can help me. > I want to generate a rss-feed. > The url ist http://localhost:8000/isf/info/. > All works fine but the title of an Item and the Description are still > the same! > How can i change the title of an feed

Re: Forms Question

2008-11-03 Thread Eric Abrahamsen
On Nov 4, 2008, at 8:14 AM, Robocop wrote: > > I'm working with some rather long forms, and i've processed them in a > pretty basic way. I read in the post data for every field, then just > create a new table entry using the form data. > > Something like: > if request.method == 'POST': > if fo

Re: How to log the cause of a 500 error

2008-11-05 Thread Eric Abrahamsen
ossible when one occurs. The logging module is impressive: silly things like getting an IM or a twitter when an error occur are relatively easy to set up. Even getting internal 404s via email isn't too onerous, provided you make good use of ignorable_404_ends. Yours, Eric > > >

How can we improve performance in the Admin when loading profile pages with ManyToMany fields?

2008-11-14 Thread Eric Chamberlain
we would like as admin loads all the field possibilities. Most of the time we use the admin to view the data, not make changes. Is there anything we can do to improve performance? -- Eric Chamberlain --~--~-~--~~~---~--~~ You received this message because

Re: How can we improve performance in the Admin when loading profile pages with ManyToMany fields?

2008-11-14 Thread Eric Chamberlain
On Nov 14, 2008, at 4:00 PM, James Bennett wrote: > > On Fri, Nov 14, 2008 at 5:49 PM, Eric Chamberlain <[EMAIL PROTECTED]> wrote: >> We have five or so ManyToMany fields (with 10,000+ and growing total >> entires in each field, only a few are selected for any one prof

Re: Modify uploaded image

2008-11-30 Thread Eric Abrahamsen
On Nov 30, 2008, at 10:36 PM, Alex Jonsson wrote: > > Hey guys, > > I have an application where I want my users to be able to upload a > picture. The model contains a name field and a ImageField. > > My question is how the easiest way would be to modify this image > before saving it? That is, cr

Re: XML templates

2008-12-01 Thread Eric Abrahamsen
On Dec 1, 2008, at 7:51 PM, Vicky wrote: > > Can we use XML files as templates instead of HTML? Anything that comes as a plain text file can be produced by a template: HTML, XML, plain text, email, iCAL, source code... Yours

Re: XML templates

2008-12-02 Thread Eric Abrahamsen
On Dec 2, 2008, at 5:50 PM, Vicky wrote: > > I did as you said. Still its giving the same error :( Are you using forward slashes instead of backslashes? The docs indicate that's necessary... > > > > > > On Dec 2, 11:38 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: >> On Mon, 2008-12-0

Re: XML templates

2008-12-02 Thread Eric Abrahamsen
On Dec 2, 2008, at 5:50 PM, Vicky wrote: > > I did as you said. Still its giving the same error :( Do you have the correct permissions on the TEMPLATE_DIRS directories? Have you written the paths with forward slashes? That's all I can think of. E > > > > On Dec 2, 11:38 am, Malcolm Tredin

Re: template tag

2008-12-05 Thread Eric Abrahamsen
custom tag? There's already a filter for that: http://docs.djangoproject.com/en/dev/ref/templates/builtins/#add Yours, Eric > > > > Alfredo > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

misreporting verify_exists

2008-12-06 Thread Eric Abrahamsen
truncated or altered in any way, so I don't think that's it. I've entered URLs with GET parameters before... I can't think of anything else! Has someone got a bright idea? I'm running 1.1 pre-alpha SVN-9569. Thanks, Eric --~--~-~--~~~--

Re: misreporting verify_exists

2008-12-06 Thread Eric Abrahamsen
a. Sorry for the noise. Thanks for the response, Malcolm. I wonder if I'm looking at the wrong part of the code? forms.fields.URLField.clean() seems to be using a full urllib2.urlopen, not just a HEAD request -- am I looking at the wrong code? Eric > > > Malcolm > >

Re: Too Many Connections

2008-12-09 Thread Eric Abrahamsen
's probably worth using django-logging or one of the other 3rd party packages to check how many queries your views are executing. The only time I ever saw this error was with high load on an extremely inefficient view (something like 60 queries in one view), and tweaking your use of th

Re: The view didn't return an HttpResponse object.

2008-12-16 Thread Eric Abrahamsen
ept: >print"nothing" >return render_to_response('inventory/orderprocess.html', > {'form':form}) This return statement is indented to be inside the except clause. If no exception is raised, the view doesn't return anything... Yours, Eric > &g

Re: Django form HTML is rendered as TEXT

2008-12-25 Thread Eric Abrahamsen
On Dec 26, 2008, at 10:56 AM, s4shre...@gmail.com wrote: > > Hi Guys, > I am new to Django . My Django form HTML is rendered as TEXT . It > does not display the HTML as such. Are you maybe getting autoescaped? http://docs.djangoproject.com/en/dev/topics/templates/#id2 Eric

setting cookies following comment post

2009-01-03 Thread Eric Abrahamsen
y point in the process where I could get hold of the response. Thanks! Eric --~--~-~--~~~---~--~~ 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@googleg

Re: AttributeError when trying to access the Admin application

2009-01-04 Thread Eric Abrahamsen
DDLEWARE_CLASSES = ("django.contrib.sessions.middleware.SessionMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.doc.XViewMiddleware") Give that a shot. Eric >

Re: AttributeError when trying to access the Admin application

2009-01-04 Thread Eric Abrahamsen
r.is_staff > > Exception Type: AttributeError at /admin/ > Exception Value: 'WSGIRequest' object has no attribute 'user' > +++ > > I'm new to Django and I'm reading "The Definitive Guide to Django" > which seems to me too out dated...

Re: AttributeError when trying to access the Admin application

2009-01-04 Thread Eric Abrahamsen
;djdrive.books', > ) > +++ Can you also paste your middleware classes? I've had this happen and can't for the life of me remember where yet, but I think it had something to do with the Session and Authentication middleware... Eric > > > But when trying to

Re: AttributeError when trying to access the Admin application

2009-01-04 Thread Eric Abrahamsen
ry posting the full traceback, and if that doesn't jog my memory we'll just see if someone else can jump in... E > On Jan 4, 1:06 pm, Eric Abrahamsen wrote: >> On Jan 4, 2009, at 4:58 PM, HB wrote: >> >> >> >> >> >>> Hey, >&g

Re: FileSystemStorage content vs PIL Image

2009-01-04 Thread Eric Abrahamsen
return name "Content" in this case is supposed to be an instance of django.core.files.File, not raw data (see http://docs.djangoproject.com/en/dev/ref/files/file/) . It's the File object that has the missing "chunks" attribute. At the very least, try inst

Re: FileSystemStorage content vs PIL Image

2009-01-04 Thread Eric Abrahamsen
On Jan 5, 2009, at 6:51 AM, Donn wrote: > > Hi, > I am stuck on the interface between a PIL Image and a > FilesystemStorage 'content' object. > > I can: img = Image.open(content) > But how do I pass 'img' back to Django for saving? > > My short class is pasted at end. The problem reported stems

Re: FileSystemStorage content vs PIL Image - **Initial solution**

2009-01-05 Thread Eric Abrahamsen
On Jan 5, 2009, at 7:47 PM, Donn wrote: > > On Monday, 05 January 2009 00:51:03 Donn wrote: >> I am stuck on the interface between a PIL Image and a >> FilesystemStorage 'content' object. >> >> I can: img = Image.open(content) >> But how do I pass 'img' back to Django for saving? > > I have some

Re: Redirect User on First Log In

2009-01-05 Thread Eric Abrahamsen
users first login? User instances have both a last_login and a date_joined attribute. Check how these defaults are filled for new users – if last_login equals date_joined, you can assume it's their first login. Check all the User attributes in the source code, and something will pr

Re: Process file after upload

2009-01-07 Thread Eric Abrahamsen
A newly created object won't have a pk until you call the super save() method, so you can put whatever operations you want to conduct inside an "if not obj.pk:" block. See if that does what you want... Eric > > > > --~--~-~--~~~---~-

lighttpd + django on windows

2009-01-07 Thread Eric Simorre
Does anybody know a tutorial about deploying django with lighttpd on windows ? it does not work , and I don't find what to do Thanks, Eric --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&

Re: lighttpd + django on windows

2009-01-07 Thread Eric Simorre
In fact, I think that the chapter describing the fastcgi deployment in the django doc is a little ... light :-) it gives only a description of a typical django.fcgi, and that's all. I have already deployed django sites with the following configs: - fastcgi ona hosting platform - apache/mod_pyt

Module Title

2009-01-07 Thread Eric I.E.
I am trying to change the title of a module in the admin. I just need to change the displayed name, easy enough for a field or a model but I have not been able to figure out how to do it for an entire module. Any pointers would be greatly appreciated. --~--~-~--~~~---~

Re: HttpResponse HTML links missing URL prefix when emailing

2009-01-08 Thread Eric Abrahamsen
webserver, not so well when clicking a link in an email message. You might want to use a separate template for the emails, or else put the current HTTP_HOST in a variable and resolve that for the links in both html and email. Hope that helps, Eric > > > Here are the relevant pa

Re: first newbie question

2009-01-09 Thread Eric Abrahamsen
might not really be what you want, though, because that number will increment regardless of deletes or modifications, and you can't (or shouldn't) modify it manually. If you were hoping for a number attribute that you can modify, and use for

small contenttypes mystery

2009-01-10 Thread Eric Abrahamsen
e lengthy poking) actually figures out from where in the source code this particular value arises. Can someone just point me to a file and line number? Or otherwise clarify this? Many thanks in advance, Eric --~--~-~--~~~---~--~~ You received this message bec

Re: setting cookies following comment post

2009-01-11 Thread Eric Abrahamsen
#x27;,remember_wrapper(comments.post_comment)), (r'^comments/', include('django.contrib.comments.urls')), ...and more... ) The views that display comment forms check for this cookie, and use the information to populate the form. I suppose that could be done as a context process

Re: Adding a view inside a view?

2009-01-14 Thread Eric Abrahamsen
ut it into the template as: {% get_poll_question some_poll %} Where 'some_poll' was a variable that originates in your view. Hope that helps, Eric > > Any help would be appreciated. > > Thanks, > Brad > > > --~--~-~--~~~---~--~~ You

Re: cant access non-django web page after deploy django on localhost

2008-07-15 Thread Eric Abrahamsen
tion like this: SetHandler None That will at least tell modpython to leave that path alone, but you might have to add something specifically telling php to pick it up. Look at the docs here: http://www.djangoproject.com/documentation/modpython/ and see if anything seems applicable. Yrs,

Re: Request object in template HTML

2008-07-15 Thread Eric Abrahamsen
uot; as a third argument to render_to_response to get access to a 'request' variable (and a bunch else) in your templates. More details here: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext Yours, Eric --~--~-~--~~~-

Re: capture http code 413 (file size too large)

2008-07-15 Thread Eric Abrahamsen
nd django interact to tell you how to fix your current solution, sorry... Eric On Jul 16, 2008, at 11:18 AM, [EMAIL PROTECTED] wrote: > > I have used the LimitRequestBody directive in the apache conf to set > it to 1 mb. so, any files biggers than 1 mb should be rejected. > > whil

multiple one-to-one relationships

2008-07-15 Thread Eric Abrahamsen
d this be considered a bug? If not, can we update the docs somewhere? There's currently no caveat to this effect, and believe me, it was an unpleasant surprise. Yours, Eric --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

Re: multiple one-to-one relationships

2008-07-16 Thread Eric Abrahamsen
through the old admin, it works properly using the interactive prompt. I thought it was my own custom save() method, but I removed that and had the same problem. I'm happy to let this go in the old admin – I'll give it a shot with nf-ad and see w

Re: multiple one-to-one relationships

2008-07-16 Thread Eric Abrahamsen
> As documented in the backwards-incompatibility notes from the > queryset-refactor merge, OneToOneFields in (existing) admin are not > supported. They didn't work before the qsrf merge reliably, either, so > no functionality was lost in the process. Sweet, I'm switching to nf-ad. Thanks a lot.

ModelForm subclass and overriding __init__()

2008-07-16 Thread Eric Montgomery
eave those fields disabled, even if I try to add a new Event (at which point the instance *is* Null, so the fields should not get disabled). I have inserted print statements to check the flow of execution within __init__ and everything works as expected

Re: newforms-admin branch has been merged into trunk

2008-07-18 Thread Eric Abrahamsen
Beers all around! On Jul 19, 2008, at 8:01 AM, Brian Rosner wrote: > > I have just recently merged the newforms-admin branch into trunk as of > r7967 [1]. This is an extremely backward incompatible change. The > entire admin application in contrib has been refactored. The newforms > module has a

Re: superuser has no rights with newforms admin

2008-07-19 Thread Eric Abrahamsen
h is where permissions reside. If you don't use autodiscover (or don't explicitly register the admin models), then the django admin site has no way of verifying who has what permissions (or something to that effect). Short answer: register all your models with admin.si

does it means we have to user Admin tool?

2008-07-21 Thread Eric Liu
Hi all, after I readed the djangobook,I found if I wrote following code and I want to get some cool stuff.like auto generate the CRUD logic,I found that I have to use the Django Admin tool.I mean if I use Rails Or Grail,it can auto generate the code for me (both logic code and page code).but it

  1   2   3   4   5   6   7   8   >