Re: Restrict access to user-uploaded files to authorized users

2013-09-26 Thread Frank Bieniek
Django filer might be usefull http://django-filer.readthedocs.org/en/latest/secure_downloads.html Am 26.09.13 03:24, schrieb m1chael: I think Xsendfile is what you want On Wed, Sep 25, 2013 at 12:51 PM, Mattias Linnap > wrote: > Are there any obvious solutions

Re: Restrict access to user-uploaded files to authorized users

2013-09-26 Thread Sanjay Bhangar
On Thu, Sep 26, 2013 at 6:54 AM, m1chael wrote: > I think Xsendfile is what you want > > +1. I know the OP said it maybe hard to install apache modules, but I would really try and check with the host, etc. - it should ideally not be such an issue to install mod-xsendfile, and this is exactly the

Re: Executing validation on entry to class-based views

2013-09-26 Thread Daniel Roseman
On Thursday, 26 September 2013 07:29:38 UTC+1, dspruell wrote: > Greetings, > > I have an app with a CBV for the main functionality that I'd like to > do some validation on config settings (in settings.py) before carrying > out the view. > > My particular view in this case is a FormWizard, but

Django Crispy Form Layout

2013-09-26 Thread Tushar Patil
Hi, I use a django crispy form and Bootstrap in which i want a layout field first_Name, Middle_Name, Last_Name like this, First Name Middle Name Last Name Trust Admin Name[input field] [input field] [input Field] I am using span3 ou

Re: Django Crispy Form Layout

2013-09-26 Thread Lachlan Musicman
You probably need to give some indication of the things you have tried, and versions. For instance - are you using the latest bootstrap (3.0)? If so, did you try this? http://django-crispy-forms.readthedocs.org/en/latest/crispy_tag_forms.html#bootstrap3-inline-forms cheers L. On 26 September 2

Re: Recommended dev environment for a Django project deployed to Linode

2013-09-26 Thread Christiano Anderson
I have the same stack, GeoDjango + PostGIS (and all its dependencies like GDAL, Proj, GEOS, etc). My notebook runs Debian (also I have a Mac Book Pro, but I prefer to work on Linux) and I use Digital Ocean to host my projects, also running Debian boxes. Since Debian keeps an older version of PostGI

Responsive design

2013-09-26 Thread Jasvir Singh
Could anyone please tell me, how to make responsive design in django? -- Jasvir Singh Grewal Blog: jasvirsinghgrewal91.wordpress.com : [ GNU/Linux One Stanza Tip (LOST) ]### Sub : awk tips [#13] LOST #473 # Print sequence number and then c

Re: Responsive design

2013-09-26 Thread Rafael E. Ferrero
Do it in your templates, its just html and javascript xadmin its responsive for your admin, here its the demo 2013/9/26 Jasvir Singh > Could anyone please tell me, how to make responsive design > in django? > -- > Jasvir Singh

Bootstrap - django-bootstrap3 or django-crispy-forms

2013-09-26 Thread Nigel Legg
Hi, I've been looking into using Bootstap3 on the django app I'm working on. It seems you can do this with both django-bootstrap and crispy-forms. Am I right in thinking that django-bootstap allows you to use bootstrap across the whole site, while crispy forms is just for forms? So you can use bo

Re: Responsive design

2013-09-26 Thread Rafael E. Ferrero
And you can use bootstrap with Django Bootstrap Toolkit 2013/9/26 Rafael E. Ferrero > Do it in your templates, its just html and javascript > > xadmin its responsive for your > admin, here its the demo

django admin: integrate django-modeltranslation + django-ckeditor into 3rd party module

2013-09-26 Thread Roberto López López
Hi, I want to integrate django-modeltranslation into the cmsplugin_news package. I mean, register some fields in the News class to have a translation in the DB for each of the settings.LANGUAGES defined. class NewNewsForm(forms.ModelForm): class Meta: model = News

Re: Responsive design

2013-09-26 Thread Christiano Anderson
Django gives you all the freedom to create responsive layouts or not. To be responsive or not is not related to Django, but to the templates you create. You can also use a CSS framework like Bootstrap, BluePrint or your favourite to create your templates as you like. Cheers On 26 September 201

Django query Advanced

2013-09-26 Thread Hélio Miranda
I am trying a query like this: result = json.dumps([a.get_json() for a in Player.objects.filter((Q(name=namepost) | Q(surname="Coimbra")))]) return HttpResponse (result, content_type = 'application / json') But it gives me the following error: Not a query object: (AND: ('surname', 'Coimbra')

How to use selenium test against different browsers using LiveServerTestCase

2013-09-26 Thread Tianyi Wang
Hi guys, So follow the Django doc example, https://docs.djangoproject.com/en/dev/topics/testing/overview/#django.test.LiveServerTestCase In the example, the test only test against Firefox. How can I test against different browsers without duplicate the example code? Thanks Tianyi -- You rec

Re: How to use selenium test against different browsers using LiveServerTestCase

2013-09-26 Thread Rafael Durán Castañeda
Hi, I don´t know any out-of-the-box solution for this, but sure you can write your own test runner/suite, so any selenium test is run by multiple browsers (maybe just using settings to select the browser). However, if you are really concerned about testing on multiple browsers, multiples versio

Re: Recommended dev environment for a Django project deployed to Linode

2013-09-26 Thread Ezequiel
On Wednesday, September 25, 2013 3:06:55 PM UTC-3, Jorge Arevalo wrote: > Fine. I don't think my boss is going to pay for PyCharm license, so I'll > probably go for Eclipse now (I don't really like it too much, but if works, > it's ok for me) > PyCharm, which is my favorite IDE, has now a Free

Re: How to use selenium test against different browsers using LiveServerTestCase

2013-09-26 Thread Evan Leis
Alright, tested tried and True: The following code provides the ability to decorate tests so that a whole list of drivers is used... see the docs for examples... import functools def test_drivers(pool_name='drivers', target_attr='selenium'): """ Run tests with `target_attr` set to each

Re: How to use selenium test against different browsers using LiveServerTestCase

2013-09-26 Thread Arnold Krille
On Thu, 26 Sep 2013 09:46:43 -0700 (PDT) Tianyi Wang wrote: > So follow the Django doc example, > https://docs.djangoproject.com/en/dev/topics/testing/overview/#django.test.LiveServerTestCase > In the example, the test only test against Firefox. How can I test > against different browsers without

Re: IntegrityError with proxy model but not with parent?

2013-09-26 Thread Rafael Durán Castañeda
Hi, As long as I know, a model form needs the fields to be included in order to get validation working, so I suspect you did something like this: class ProxyForm(forms.ModelForm): class Meta: model = models.Myproxy fields = ('name', ) Since stuff field is not included in the

Re: Bootstrap - django-bootstrap3 or django-crispy-forms

2013-09-26 Thread Sam Lai
Yep. django-bootstrap-* and django-crispy-forms only provide helpers for outputting HTML with bootstrap CSS classes. Neither are really necessary to use Bootstrap (just makes it slightly easier), which is applied through HTML and CSS and Django doesn't place any restrictions on how your HTML/CSS i

Re: How to do 2-ModelForm-in-1-CVB right?

2013-09-26 Thread Yu Chen
Inlineformset may solve your problem, and this http://haineault.com/blog/155/ is a good example. 在 2013年9月26日星期四UTC+8下午1时19分41秒,Adam写道: > > Hi, > > I am trying to handle 2 ModelForm in 1 view. Is that possible with CBV > solution? Does any best practise exist? > > Here is the problem in details

Re: Bootstrap - django-bootstrap3 or django-crispy-forms

2013-09-26 Thread Lachlan Musicman
this is probably the answer you want: http://stackoverflow.com/a/11795186 L. On 27 September 2013 09:23, Sam Lai wrote: > Yep. django-bootstrap-* and django-crispy-forms only provide helpers > for outputting HTML with bootstrap CSS classes. Neither are really > necessary to use Bootstrap (just

Re: Bootstrap - django-bootstrap3 or django-crispy-forms

2013-09-26 Thread Nigel Legg
Thanks both. Cheers, Nigel 07914 740972 On 27 September 2013 06:19, Lachlan Musicman wrote: > this is probably the answer you want: > > http://stackoverflow.com/a/11795186 > > L. > > On 27 September 2013 09:23, Sam Lai wrote: > > Yep. django-bootstrap-* and django-crispy-forms only provide