Re: ModelAdmin missing a couple of key features, or am I doing this wrong?

2016-09-16 Thread Andrea D'Amore
On 16 September 2016 at 00:53, wrote: > I have a ModelAdmin subclass (code at: ) Gives a 404: The requested URL /0LAt was not found on this server. I'm missing the rationale of using an external paste service while you're already using a text-based medium, the mail

Compressing images before saving to database

2016-09-16 Thread Isaac Tetteh
hello, I have a project where users upload photos of any type. But i want to compress the images before saving them. Is pillow the best i can use or Is there a built in or 3rd party library to do this. Its link to documentation will be appreciated too. Thanks! -- You received this message b

Re: A public cloud with django backend

2016-09-16 Thread Andreas Kuhne
2016-09-15 9:21 GMT+02:00 Rahul Doshi : > Hi ,I want to setup a dropbox like server with django. So far i have > achieved uploading files onto a location .I want these files to show up on > browser which they do(while saving file to the location I indexed an entry > in the Db so i just print the

Re: Compressing images before saving to database

2016-09-16 Thread Javier Guerra Giraldez
On 16 September 2016 at 05:45, Isaac Tetteh wrote: > I have a project where users upload photos of any type. But i want to > compress the images before saving them. Is pillow the best i can use or Is > there a built in or 3rd party library to do this. Its link to documentation > will be appreciate

Re: Setting FK field in list view

2016-09-16 Thread ludovic coues
Have you tried something like author__name ? Assuming a model with an author foreign key. 2016-09-16 8:56 GMT+02:00 RompePC : > I would like to pass to the list display view a FK field of the admin form > (like the ones when adding a new row). But I don't see the way of doing it, > although I've s

Re: Setting FK field in list view

2016-09-16 Thread RompePC
I'll try ASAP I can, thanks El viernes, 16 de septiembre de 2016, 13:59:26 (UTC+2), ludovic coues escribió: > > Have you tried something like author__name ? Assuming a model with an > author foreign key. > > 2016-09-16 8:56 GMT+02:00 RompePC >: > > I would like to pass to the list display view

Re: ModelAdmin missing a couple of key features, or am I doing this wrong?

2016-09-16 Thread thauk
Apologies, I updated it. class MyModelAdmin(ModelAdmin): model = MyModel form = MyForm def get_form(self, request, obj=None, **kwargs): form_class = super(MyModelAdmin, self).get_form(request, obj=obj, **kwargs) some_parameter_for_one_thing = self.get_some_parame

Random 404 instead of 301 for URLs without trailing slash

2016-09-16 Thread Frederik Elwert
Hello, I am running a site that uses Django 1.8 and Django CMS 3.2. The site is deployed using gunicorn and nginx. Now I noticed a strange, hard to debug issue: When accessing a URL without trailing slash, I expect a redirect to the correct URL with the trailing slash appended, as per the APPEN

Re: export html to pdf

2016-09-16 Thread Michael Macdonald
Excellent article. I played with a couple of the specific tools mentioned there but in my little application it wound up being more efficient and sufficient to format a printed page in HTML. On Thursday, September 15, 2016 at 6:49:18 AM UTC-7, Derek wrote: > > There is a useful overview of di

Re: Random 404 instead of 301 for URLs without trailing slash

2016-09-16 Thread Michal Petrucha
Hi Frederik, On Fri, Sep 16, 2016 at 09:01:53AM -0700, Frederik Elwert wrote: > Hello, > > I am running a site that uses Django 1.8 and Django CMS 3.2. The site is > deployed using gunicorn and nginx. Now I noticed a strange, hard to debug > issue: When accessing a URL without trailing slash, I