Re: Working for a startup.
nd > > push for a rewrite in .net. > > > > I'd like examples of large systems written in Django or other open source > > frameworks. I'd also like stories about companies who tried .net > switched > > over to open source. It seems like there was a big Microsoft project on > > some stock exchange program that failed but I can't find any references > to > > it. I tried searching Google but it seems like it doesn't differentiate > > ".net" with the internet so trying to find .net failures only turned up > > stories about internet downtime. > > > > Any help would be greatly appreciated. > > > > -- > > You received this message because you are subscribed to the Google Groups > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > > For more options, visit this group athttp:// > groups.google.com/group/django-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Brendan Smith, IT Coordinator National Priorities Project http://www.nationalpriorities.org http://www.costofwar.com http://www.facebook.com/nationalpriorities 413 584 9556 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how template tag extends works
i don't know for sure the exact answer of whether or not your include is cached, someone more intimate with core would know better than i... but, i would recommend making your own template tag for doing this ( http://docs.djangoproject.com/en/dev/howto/custom-template-tags/) On Fri, May 21, 2010 at 1:29 PM, paul wrote: > > > > On May 21, 12:46 am, Marcus Carlsson > wrote: > > Does example.html print the data in `item` and if so, why not make the > > loop in example.html and just use include one time in your "main" > > template? > > > > Concerning your actual question. Even if it's cached it seems like bad > > practice to me so I would avoid using this method but without more info > > about what example.html holds it's hard to say. > > Let's say example.html outputs a html block showing some attributes of > item: > > {% for item in items %} >{% include "example.html" %} > {% endfor %} > > example.html: > >{{ item.id }} {{ item.name }} > > > > Obviously another solution is: > {% for item in items %} > >{{ item.id }} {{ item.name }} > > {% endfor %} > > > but in my case, it's useful for me to use example.html with other > templates. I thought about this some more and I'd suspect {% include > %} opens a file every time, as it's within a generic {% for %} loop, > unless {% include %} is structured to be able to reference a file it's > already opened. The reason I'm asking is because there would be a > performance penalty if the file has to be opened for every loop > iteration? > > > > > > On 21 May 12:40, paul wrote: > > > > > > > > > > > > > > > > > sorry -- I made a mistake -- I meant include instead of extends :-p > > > > > {% for item in items %} > > > {% include "example.html" %} > > > {% endfor %} > > > > > does example.html get opened for every iteration of the loop, or just > > > at the first iteration, and then perhaps cached? > > > > > On May 21, 12:36 am, paul wrote: > > > > hi -- given this example template: > > > > > > {% for item in items %} > > > >{% extends "example.html" %} > > > > {% endfor %} > > > > > > When this block is evaluated during template rendering, does the file > > > > "example.html" get opened for every iteration of the loop, or might > > > > the contents of "example.html" get cached the first time it's opened? > > > > > > -- > > > > You received this message because you are subscribed to the Google > Groups "Django users" group. > > > > To post to this group, send email to django-us...@googlegroups.com. > > > > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > > > > For more options, visit this group athttp:// > groups.google.com/group/django-users?hl=en. > > > > > -- > > > You received this message because you are subscribed to the Google > Groups "Django users" group. > > > To post to this group, send email to django-us...@googlegroups.com. > > > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > > > For more options, visit this group athttp:// > groups.google.com/group/django-users?hl=en. > > > > -- > > You received this message because you are subscribed to the Google Groups > "Django users" group. > > To post to this group, send email to django-us...@googlegroups.com. > > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > > For more options, visit this group athttp:// > groups.google.com/group/django-users?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: how safe is the template engine
i have done similar to allow my users the ability to use template tags in publications we put out. I thought long and hard about the repercussions of this and what I decided on in the end is that all of my users are (should be at least) considered trusted (we all work in the same office) and the only way it could end up biting me in the butt is if a users login gets compromised, which in that case I have other issues to worry about anyway ;) On Mon, Oct 18, 2010 at 10:11 AM, ringemup wrote: > In addition to what Jonathan said, keep in mind that letting your > users enter raw HTML opens your site up to XSS attacks, since > userInput could contain javascript, and it won't be escaped if you > just turn it directly into a template. > > You could render userInput into the template as a context variable, > and then load the result of that as a template, but that would of > course preclude your users from using *any* HTML. > > On Oct 16, 12:06 pm, "Henrik Genssen" > wrote: > > Hi, > > > > can I safely use the template engine to produce user configured output? > > If I use the template engine like it is done in the RSSFeed: > > > > title_tmp = Template('{% load i18n %}' + userInput) > > ctx = Context({'dstart': date.dstart, > > > > where userInput is something a user can fill in. > > So far, the only point seems to be: > > protect functions of objects one uses in the context, so nobody can > delete items or do something else... > > > > Am I overlooking something? > > > > regards > > > > Henrik > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Brendan Smith, IT Coordinator National Priorities Project http://www.nationalpriorities.org http://www.costofwar.com http://www.facebook.com/nationalpriorities 413 584 9556 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
200 OK message
hey all, I pushed some changes to my code last night and this morning upon trying to add an object (based on a model I added last night) this morning I am getting the following response: OK None of the range-specifier values in the Range request-header field overlap the current extent of the selected resource. -- Apache/2.2.12 (Ubuntu) Server at nationalpriorities.org Port 80 If I refresh a few times I can get the admin change form to appear, but almost every time I go directly from "Add Table+" (table is my model) I get this message.anyone have any idea what this is all about? thanks,Brendan -- Brendan Smith, IT Specialist National Priorities Project http://www.nationalpriorities.org http://www.costofwar.com http://www.facebook.com/nationalpriorities 413 584 9556 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: 200 OK message
bump? On Thu, May 26, 2011 at 11:11 AM, Brendan Smith < bren...@nationalpriorities.org> wrote: > hey all, > > I pushed some changes to my code last night and this morning upon trying to > add an object (based on a model I added last night) this morning I am > getting the following response: > > OK > > None of the range-specifier values in the Range request-header field > overlap the current extent of the selected resource. > -- > Apache/2.2.12 (Ubuntu) Server at nationalpriorities.org Port 80 > > If I refresh a few times I can get the admin change form to appear, but > almost every time I go directly from "Add Table+" (table is my model) I get > this message.anyone have any idea what this is all about? > > thanks,Brendan > > -- > Brendan Smith, IT Specialist > National Priorities Project > http://www.nationalpriorities.org > http://www.costofwar.com > http://www.facebook.com/nationalpriorities > 413 584 9556 > -- Brendan Smith, IT Specialist National Priorities Project http://www.nationalpriorities.org http://www.costofwar.com http://www.facebook.com/nationalpriorities 413 584 9556 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: DeprecationWarning: A Field class whose get_db_prep_value method hasn't been updated to take `connection` and `prepared` arguments
i've also got this warning on a bone stock django install + mysql backend. I've started to just ignore it for now On Wed, Jun 1, 2011 at 9:08 AM, tom wrote: > Hello, > > since I have upgraded to django 1.3 i see following errors: > DeprecationWarning: A Field class whose get_db_prep_value method > hasn't been updated to take `connection` and `prepared` arguments > > There are following packges installed: > > INSTALLED_APPS = ( >'debug_toolbar', # OK >'django.contrib.auth', >'django.contrib.contenttypes', >'django.contrib.sessions', >'django.contrib.sites', >'django.contrib.admin', >'django.contrib.admindocs', >'django.contrib.flatpages', >'django.contrib.markup', >'django.contrib.messages', >'django.contrib.humanize', >'django.contrib.redirects', >'payments.moneybookers', # OK >'djcelery', # OK >'compress', # OK >'johnny', # OK >'tagging', # OK >'registration', # OK >'django_extensions', # OK >'profiles', # OK > ) > > I already have updated the 3rd party modules to the latest version and > I also have tried to deactivate module by module. But the warning does > not go away. > > Any hints? > > Many thanks for your help! > > regards, Tom > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Brendan Smith, IT Specialist National Priorities Project http://www.nationalpriorities.org http://www.costofwar.com http://www.facebook.com/nationalpriorities 413 584 9556 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.