Re: Storing data before committing to data base, wait for approval of admin

2016-05-04 Thread Aaron Cannon
I'd probably just keep a seperate table for all the edits, with a foreign key pointing back to the record to be updated. Seems like the simplest layout to me, unless there's some complicating factor I'm overlooking. It would have a field for each field that edits can be suggested for, a foreign

Re: Querying a model with a ForeignKey

2016-05-03 Thread Aaron Cannon
I fear doing this efficiently is beyond my limited abilities. Will look forward to other answers you might get. Good luck. Aaron On 5/3/16, ofeyofey wrote: > Aaron thanks for looking at this. > I understand what you did now, and that is great. > But I actually realised

Re: Querying a model with a ForeignKey

2016-05-03 Thread Aaron Cannon
Does pModel = PostModel.objects.filter(topicid_id=pk).order_by('-pub_date')[0] work for you? Also, I believe it would be more conventional if you named your topicid field simply topic, your post field as body, and your topic field as name. Luck. Aaron On 5/3/16, ofeyofey

Re: Complex content type

2016-05-02 Thread Aaron Cannon
To your Answer class, you could just add a field like: question = models.ForeignKey(Question, on_delete=models.CASCADE) It may be as simple as that. Does that help? Aaron On 5/2/16, ludovic coues wrote: > There is such example in the django girls tutorial I linked

Re: Is it good idea to transition from MS Access to a webapp? And if so, is Django a good tool to do it?

2016-05-01 Thread Aaron Cannon
On the other hand, if you don't anticipate hundreds of users, then a cheaper option like Digital Ocean may meet your needs better. There minimal servers start at $5/month. Don't get me wrong, I love Aws, and I use it all the time. It just sounded like your needs were modest, so thought that

Re: Avoid Django s3-urls stripping

2014-03-28 Thread Aaron Cannon
> > It seems that django strip the url when i get the url via browser... > > > > Il giorno giovedì 27 marzo 2014 19:34:10 UTC+1, Aaron Cannon ha scritto: >> >> Is the url a bytestring? A quick check of the code for HttpResponse >> shows that that class is expecting

Re: Avoid Django s3-urls stripping

2014-03-27 Thread Aaron Cannon
Is the url a bytestring? A quick check of the code for HttpResponse shows that that class is expecting a byte string. Perhaps the URL contains unicode characters that aren't being escaped properly? Aaron On 3/27/14, Aaron Cannon <cann...@fireantproductions.com> wrote: > Other t

Re: Avoid Django s3-urls stripping

2014-03-27 Thread Aaron Cannon
<paolo.b...@gmail.com> wrote: > Hi Aaron, > the html is "wrong" as well. > > Moreover i tried {% autoescape off %} but with no luck :( > > > > > Il giorno giovedì 27 marzo 2014 17:24:45 UTC+1, Aaron Cannon ha scritto: >> >> Try clicking view sourc

Re: Client side timestamp handling and timezone

2014-03-27 Thread Aaron Cannon
Have you seen this SO answer? This might help you to convert to UTC in JS. No idea why you're seeing different results inside and outside the shell. Luck. Aaron On 3/18/14, Yoanis Gil Delgado wrote: > Hello there, > > I've been struggling with this issue for the last

Re: Avoid Django s3-urls stripping

2014-03-27 Thread Aaron Cannon
Try clicking view source in your browser when you view it. Perhaps the URL needs to be HTML escaped? Just a guess. Aaron On 3/21/14, Paolo Bertasi wrote: > Hello, > I'm trying to setup a mini django app to allow users to download files from > > s3. I wrote a simple

Some input on #20287

2013-05-14 Thread Aaron Cannon
Hi all. Was browsing the tickets, looking for something that could use some implementation work, and came across https://code.djangoproject.com/ticket/20287 I posted a comment to the ticket, but I'm happy to provide some sample code to illustrate what I mean, if that would be clearer. Aaron --

Re: Testing put in django 1.5

2013-05-14 Thread Aaron Cannon
Try something like the following untested code: >From djanto.test.client import BOUNDARY, MULTIPART_CONTENT, encode_multipart ... encoded_data = encode_multipart({'someParameter':'someValue'}) response = self.c.put("/path/to/some/api", data=encoded_data,

Re: FREE Full Django Tutorial

2012-02-03 Thread Aaron Cannon
Any plans to release a video podcast? Aaron On 2/3/12, programmersbook.com wrote: > Hi All, > > I created a full django turtorial screencast, so far 25, every week > I'm adding one more. > > http://www.youtube.com/playlist?list=PL385A53B00B8B158E=view_all > > Let

Re: Django Caching appended character issue

2012-01-31 Thread Aaron Cannon
If it was a BOM issue, wouldn't it get prepended? Unfortunately, I don't have any better ideas either. Aaron -- This message was sent from a mobile device On Jan 31, 2012, at 7:56, Ustun Ozgur wrote: > No idea actually, but I would look for BOM related issues. > >

Re: Starting a new Python blog

2012-01-30 Thread Aaron Cannon
For me, Twitter is the new RSS. Any chance of setting up a feed for new content notifications? Thanks. Aaron On 1/30/12, Kevin wrote: > It is good to see some subscribers this early on. Thank you. I have > rolled out the updates for Tutorials and set the foundation for

Re: Help with new version of django

2012-01-28 Thread Aaron Cannon
I suspect he means the latest stable version, in which it really is 1.3.1. To my knowledge 1.4.1 does not yet exist. As for the original question, I would suggest familiarizing yourself with the what's new documents for Django 1.2 and 1.3, and then tuning your code accordingly. Depending on

Re: Can't make 404.html template to be used. Keep getting Apache 500 Internal Server Error instead.

2012-01-27 Thread Aaron Cannon
Hi. Have you created a 500.html file in your templates directory? Aaron On 1/21/12, Chris Seberino wrote: > >> Check your apache logs. > > Last line below says error is that there is no handler500. I thought > a missing web page for some URL was a 404 error so I'm not

Re: Can't make 404.html template to be used. Keep getting Apache 500 Internal Server Error instead.

2012-01-27 Thread Aaron Cannon
Any hints in the Apache error logs? Aaron On 1/21/12, Chris Seberino wrote: > I am proxying my Django app behind Apache. I created a 404.html in my > template directory but when I try to test it I get the following error > that appears to come from Apache... > > Internal