A really simple hosting for my Django app?

2013-06-15 Thread thomaaaas
Hi there! I just finished my first Django app that's working great locally. I have a PHP background, and I'm already a big fan of Django :) Now I'm looking to host my new app online, but where and how? My only requirement: I want something *really simple*. I'm not a sysadmin, and I'm usually pre

Unique image name with timestamp?

2013-06-22 Thread thomaaaas
Hello, I'm new to Django, and I have a question. I have a ImageField() in my model, and I obviously want that each image has a unique name in my filesystem. How to do this? My idea was to include the timestamp in the name of the image (I'll never have more than one image uploaded per second). S

Count the number of drawings each artist has?

2013-06-22 Thread thomaaaas
Hello, In my model I have artists and drawings. Each drawing has a ForeignKey(Artist) I'm trying to count the number of drawings each artist has, but I don't know how to do it... Below a simplified version of my code. class Artist(models.Model): name = models.CharField(max_length=140) def numb

Re: Count the number of drawings each artist has?

2013-06-22 Thread thomaaaas
will be displayed as: > Donatello - 24 > Michelangelo - 14 > > On Saturday, June 22, 2013 4:36:54 PM UTC+2, thoms wrote: >> >> Hello, >> >> In my model I have artists and drawings. Each drawing has >> a ForeignKey(Artist) >> I'm trying to count

Build SEO friendly url with {% url 'detail' object.id %} ?

2013-06-22 Thread thomaaaas
Hello, In my index.html, I have something like this that displays a list of drawings, with links to the drawings: {% for drawing in latest_drawings_list %} {{ drawing.title }} {% endfor %} When I look at the html generated, I see this type of url: which is not SEO friendly. I'

Re: Build SEO friendly url with {% url 'detail' object.id %} ?

2013-06-22 Thread thomaaaas
Found the answer: http://stackoverflow.com/questions/11879416/pretty-and-seo-friendly-urls-in-django On Saturday, June 22, 2013 8:10:07 PM UTC+2, thoms wrote: > > Hello, > > In my index.html, I have something like this that displays a list of > drawings, with links

Have Jcrop in Django Admin for thumbnails?

2013-06-23 Thread thomaaaas
Hello, I'm new in the Django world, and I need some advice. Basically what I want: 1) In m model I have an origianl_image and a thumbnail_image 2) In the admin, a user upload an image 3) Then, we show him the Jcrop pluging to crop the image as a thubnail I already do 1) and 2), but have no id

An easy way to integrate Jcrop in Django's admin?

2013-06-26 Thread thomaaaas
An easy way to integrate Jcrop in Django's admin? Hello, I'm new in the Django world, and I have a question regarding image resizing. What I'm trying to do: 1) A user upload an image in the admin 2) He is shown the Jcrop interface to crop the image, and submit the form 3) The original image and

Re: An easy way to integrate Jcrop in Django's admin?

2013-06-26 Thread thomaaaas
t crop the image just any other python program > would. people use PIL a lot, try using that (or pillow). > you can also use external tools like imagemagick, either using one of the > python bindings or calling the command line tools using subprocess > > > On Wed, Jun 26, 20

A PHP framework with some Django features?

2013-06-27 Thread thomaaaas
Hello, I have a PHP background, and I'm learning Django. Long story short: I love Django, but some things are really painful to do (configuration, media/static content, etc.). That's why I want to know if there is a PHP framework that has some of Django's really cool features: - Automatically c