Re: edit MEDIA_ROOT in django 1.6

2014-01-18 Thread Russell Keith-Magee
Hi Niluka, Just add them to your settings.py. The contents of settings.py is a suggested starting point, not a complete list of available settings. If you want to set a value for MEDIA_ROOT, MEDIA_URL, or any other setting, just add the definition to settings.py. Yours, Russ Magee %-) On Sun,

edit MEDIA_ROOT in django 1.6

2014-01-18 Thread Niluka Piyasinghe
how edit MEDIA_ROOT,MEDIA_URL in django 1.6 (it's not in settings.py) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com.

Re: JSON serialization

2014-01-18 Thread Babatunde Akinyanmi
On 19 Jan 2014 00:18, "François Schiettecatte" wrote: > > Hi > > IANA says the JSON mime type be application/json, so you might want to use that. > > application/javascript should be for javascript. Yes thats true. My bad. > > > François > > On Jan 18, 2014, at 12:05

Re: csrf_token is not being set when using Jinja2

2014-01-18 Thread Chen Xu
That gives me : Encountered unknown tag 'csrf_token'. Thanks On Sat, Jan 18, 2014 at 8:57 PM, Mario Gudelj wrote: > Try {% csrf_token %} by itself > On 19/01/2014 12:12 pm, "Chen Xu" wrote: > >> Hi everyone, >> I am using Jinja2 instead of

Re: csrf_token is not being set when using Jinja2

2014-01-18 Thread Mario Gudelj
Try {% csrf_token %} by itself On 19/01/2014 12:12 pm, "Chen Xu" wrote: > Hi everyone, > I am using Jinja2 instead of Django's own template engine, however I am > having an issue where csrf_token is empty, I included the following line in > my form: > > > > But csrf_token

How to hide the "save and add another" button in admin page?

2014-01-18 Thread RLF_UNIQUE
I have been trying all day. What I am doing is trying to have a model for an "about" page, which I want to limit to 1 item. It doesn't really make sense to have multiple "abouts". I've done everything described here

csrf_token is not being set when using Jinja2

2014-01-18 Thread Chen Xu
Hi everyone, I am using Jinja2 instead of Django's own template engine, however I am having an issue where csrf_token is empty, I included the following line in my form: But csrf_token has no value. Can someone help? Thanks in advance -- ⚡ Chen Xu ⚡ -- You received this message because

Re: JSON serialization

2014-01-18 Thread François Schiettecatte
Hi IANA says the JSON mime type be application/json, so you might want to use that. application/javascript should be for javascript. François On Jan 18, 2014, at 12:05 PM, Babatunde Akinyanmi wrote: > https://docs.djangoproject.com/en/1.6/ref/request-response/#usage >

Re: JSON serialization

2014-01-18 Thread Babatunde Akinyanmi
https://docs.djangoproject.com/en/1.6/ref/request-response/#usage Actually, Google is your friend. On 18 Jan 2014 19:48, "Igor Korot" wrote: > Hi, Babatunde, > > On Sat, Jan 18, 2014 at 8:32 AM, Babatunde Akinyanmi > wrote: > > Thats probably because

Re: session modification question

2014-01-18 Thread Daniel Roseman
On Saturday, 18 January 2014 17:11:56 UTC, Spork Spork wrote: > > Hi, > > I have a question about what gets persisted when session data gets > updated. I've read the sessions chapter of the book, and it's not entirely > clear to me. > > Say I have two keys in the session object that I'm

Re: JSON serialization

2014-01-18 Thread Igor Korot
Hi, Babatunde, On Sat, Jan 18, 2014 at 8:32 AM, Babatunde Akinyanmi wrote: > Thats probably because you are returning the json as a context in a response > with the default "text/html" mime type. Your response should have mime type > as " application/javascript". > Your

session modification question

2014-01-18 Thread Spork Spork
Hi, I have a question about what gets persisted when session data gets updated. I've read the sessions chapter of the book, and it's not entirely clear to me. Say I have two keys in the session object that I'm manipulating in a view: view1: request.session['foo'] = 'foocontent' view1:

Open day at Django Weekend Cardiff

2014-01-18 Thread Daniele Procida
Django Weekend Cardiff is completely sold out. Our open day remains open however, and you're invited to attend the numerous talks, tutorials and demonstrations in the programme. There are fifteen different

Re: JSON serialization

2014-01-18 Thread Babatunde Akinyanmi
Thats probably because you are returning the json as a context in a response with the default "text/html" mime type. Your response should have mime type as " application/javascript". Your json data should be in the response On 18 Jan 2014 09:16, "Igor Korot" wrote: Hi, guys,

CSS in form select widget

2014-01-18 Thread Larry Martell
I have a form where I need to display 2 fields in one select box, with one field left justified and one field right justified. Here is the model: class Group(models.Model): ordering = ['order',] GROUP_BY_CHOICES = ( ("Target", "Target"), ("Recipe", "Recipe"),

custome not working

2014-01-18 Thread vaibhav Upadhyay
-- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com.

Re: JSON serialization

2014-01-18 Thread Igor Korot
Hi, guys, On Sat, Jan 18, 2014 at 12:02 AM, Babatunde Akinyanmi wrote: > > On 18 Jan 2014 08:32, "Mario Gudelj" wrote: >> >> In your template try {{usb_data|safe}} > > ...because django escapes everything in the template by default except > you

Re: JSON serialization

2014-01-18 Thread Babatunde Akinyanmi
On 18 Jan 2014 08:32, "Mario Gudelj" wrote: > > In your template try {{usb_data|safe}} ...because django escapes everything in the template by default except you ask not to. One of the methods of doing so if by using the `safe` filter like Mario suggested. You can