I've figured a way that I think will work best for me for the model
and form but I'm having trouble with writing the view. Here is my
pseudo code
models.py
-
class baseModel(models.Model):
first_name = models.CharField( max_length=100,
verbose_name='first')
class
d email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com <
django-users%2bunsubscr...@googlegroups.com>.
> For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
>
--
Brian Bouter
for your help
Brian
--
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 mo
I know it's not Django specific, but when I need a table for my Django
projects, I use jQuery Datatable <http://www.datatables.net/>. It rocks!
Brian
On Wed, Aug 10, 2011 at 5:26 PM, Adam Zedan <zedan...@gmail.com> wrote:
> Or in other words a good datagrid to use with Dj
to this mailing
> list are getting that spam and it really does not help at all if we
> all just start posting "+1" mails.
>
> Michal
>
--
Brian Bouterse
ITng Services
--
You received this message because you are subscribed to the Google Groups
"Django users&quo
I'm using the Model->ModelForm flow. I was starting with the model
and working my way up. Once I get the model I was going to switch to
the form and then the view.
Brian
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
is that when I use form1 the data gets put in
form1 and myBaseModel.
Thank you for your help
Brian
--
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
I've created a form with Model->ModelForm flow. Django is running on
a sub-domain and I'm putting separate instances of the form on
multiple php websites via iframe.
How can I use the same form model but have independent forms?
For example I want:
form1 to be at: example.com/form1
On Aug 2, 3:14 pm, webcomm wrote:
> ...
> Non-interactively, in the automatic admin, what I get is a visible
> text input below the title field and above the summary field. Here's
> the relevant model and modelform:http://pastebin.com/azKgdraw
>
> -Ryan
Oh...you are trying to
Just in case anyone else has the same problem and finds their way here...
The answers were there in the documentation once I rooted around for a
while. I just need to override the default form field provided for my time
model field and explicitly specify the allowed formats.
class
an iframe. This minimizes the look and feel consistence
since most every page is loaded from PHP.
Brian
On Wed, Jul 27, 2011 at 9:34 AM, brian <brian.down...@yakkadesign.com>wrote:
> I'm learning Django and was hoping to get some advice on an
> application I want to try.
>
> I'
I'm doing this to add features like better submitted data management
and writing the data to another program.
Brian
--
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@google
of it. It seems creating the
form is really easy but I'm not sure the best way to include that form
in the php website.
Do you have any suggestions about creating a Django form that will be
included in a php website? In the php website, I'd prefer not to use
javascript.
Brian
--
You received
t I need to override - if such a
thing exists?
Brian
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/j4xBfHyqpAUJ.
To post to this group, send email to
any advice?
Thanks in advance,
Brian
--
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
feel your pain, validating forms can be a PITA... Try reading through this
> last bit of the form validation docs:
>
> https://docs.djangoproject.com/en/dev/ref/forms/validation/#cleaning-...
>
> Cheers,
> André Terra
>
>
>
>
>
>
>
> On Mon, Jul 11, 2011 at 6:02
I have a search form that is used by a view to search for results and
then redirect to display them one at a time. If my search doesn't find
any objects matching the criteria, I'd like to display a message
saying so.
It seems natural to add this error to the search form and redisplay it
since it
is a win for
everyone (django, python, open source, ...). My personal heuristic on what
is off topic on django-users for python specific questions is this: if the
question is python only, if it is ultimately going to be used in a django
project, then I consider that on topic.
Brian
On Sun, Jul 10
On Jul 8, 11:03 am, Shawn Milochik wrote:
> This topic came up on the list a few months back, and I just wanted to
> share the solution I've put into place.
>
> Short version:
>
> 1. Ensure that my Web server (nginx) passes the user's real IP address
> in the request.
>
> 2.
as the reference python interpreter.
I was talking with the pypy authors at pycon this past spring and they
anecdotally that django and pypy are being used in production on some sites.
The folks in the pypy community could probably comment more on this than I
could.
Brian
On Fri, Jul 8, 2011 at 11
to be figured out is how to get pypy reading the nginx and
gunicorn C code natively and then switching over and using JIT compilation
on the python code from the gunicorn->django entry point.
I would love to hear what others think about this type of thinking.
Best,
Brian
On Fri, Jul 8,
eceived 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, vi
I write a lot of automation on RHEL / CentOS systems and would like to see
the built process to look at potentially porting it. Let me know how I can
follow the development.
Brian
On Wed, Jul 6, 2011 at 3:29 PM, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk>
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/
ce, yet when it is called from within my post
function it fails strangely. I know what I'm doing is kind-of strange, but
it should work right?
Enlighten me...
Thanks,
Brian
--
Brian Bouterse
ITng Services
--
You received this message because you are subscribed to the Google Groups
"Django user
xing won't
always work either. pastebin.com does have the option to retain snippets
forever as an alternative to dpaste.com which deleted them eventually.
Brian
On Fri, Jul 1, 2011 at 5:58 AM, Russell Keith-Magee <russ...@keith-magee.com
> wrote:
> On Friday, July 1, 2011, Herman Sch
this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/SZabiWnq_S0J.
>
> 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
+1 for django-sentry. I use it on even the smallest sites and it works
great there too.
Brian
On Sun, Jun 19, 2011 at 9:17 AM, graeme <graeme.piete...@gmail.com> wrote:
> What is the simplest way of preventing the flood of emails that
> results from a site wide error? I do not wa
of the user/editor.
Thanks for any advice you can offer,
Brian
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/ZjWvsBbrmS0J.
To post to this g
In case anyone else has the same issue, the problem stopped when I upgraded
django from 1.2 to 1.3.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
Is there an easy way to get checkboxes for groups in the User admin,
rather than a multiselect?
--
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,
This conversation is off topic, and should not be facilitated through the
Django users mailing list. There are sites setup for these kinds of
things<http://www.freelancer.com/>
.
Brian
On Fri, Jun 10, 2011 at 11:09 AM, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedia
',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
Is the test broken or is there something that I'm doing that makes the sites
app mandatory?
Thanks for any help you can give,
Brian
nfusion.htm>on how import
works in python.
Brian
On Thu, Jun 2, 2011 at 10:39 AM, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk> wrote:
> Hey guys,
>
> This is more of a python question, than a Django specific one, but it's
> been bugging me f
Thanks for the replies. I realised that I could reorganise the code so that
all the database updating was done in the main thread. Re
TransactionTestCases, I knew I'd read something related to that but didn't
find it when I went looking yesterday evening; it sounds like that would
have worked
in that transaction is hidden from the other threads? Can the database
connection (and hence transaction) be shared between the threads? Has anyone
encountered this problem before? (And, ideally, came up with a really neat
solution...)
Thanks,
Brian
--
You received this message because you are subscribed
(ContentView, self).render_to_response(context,
**response_kwargs)
On May 23, 3:01 pm, Brian Morton <rokclim...@gmail.com> wrote:
> I have some legacy code that I used to dynamically load a template based on
> url if it exists and render a 404 if it doesn't exist.
>
> def content(requ
ews behavior and interfaces just like Django
already has, which is silly when you can just subclass the generic 'View'
function.
3. So class based views tend to always inherit from some generic django
view ... django.views.generic.base.View at the very least.
Hope this is helpful,
Brian
On Thu, May 26, 201
You'll need make sure that "django.template.loaders.filesystem.Loader" is
enabled in your TEMPLATE LOADERS to use the app in the way you want. Also,
you'll need to place your app BEFORE the 'django.contrib.admin' application
in the INSTALLED_APPS list.
Hope this helps,
Brian
On T
We all have our opinions. Either way this conversation is OT from Django.
On Tue, May 24, 2011 at 4:07 PM, Masklinn <maskl...@masklinn.net> wrote:
> On 2011-05-24, at 21:57 , Brian Bouterse wrote:
> > +1 for xpath
> >
> > I also like using
> > xml.dom.minid
+1 for xpath
I also like using
xml.dom.minidom<http://docs.python.org/library/xml.dom.minidom.html>since
it is so simple and straightforward.
If you XML is poorly formed go with beautiful
soup<http://www.crummy.com/software/BeautifulSoup/>
.
Brian
2011/5/24 Тимур Зарипов <q21
to rebuild
it.
Don't be like me and break your system by not using virtualenv.
Brian
On Tue, May 24, 2011 at 9:42 AM, Shawn Milochik <sh...@milochik.com> wrote:
> 1. You can compile Python 2.6 (or 2.7) in your home directory and use that
> to create your virtualenvs.
>
> 2. I do
lso really excellent
integration with celery through the django-celery project.
Brian
On Mon, May 23, 2011 at 9:49 PM, br <robert...@gmail.com> wrote:
> I understand a lot of production systems use celery and/or cron to
> automate task queues and/or scheduling. I am just getting i
I have some legacy code that I used to dynamically load a template based on
url if it exists and render a 404 if it doesn't exist.
def content(request, template_name='index'):
try:
return direct_to_template(request, '%s.html' % template_name)
except TemplateDoesNotExist:
I use fabric and chef together. Usually fabric bootstraps my chef
environment, and then chef takes over. I also don't use cron anymore, but
instead use celery <http://celeryproject.org/>.
Best,
Brian
On Mon, May 23, 2011 at 7:50 AM, DK <cypre...@gmail.com> wrote:
> What
uot;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.
>
I have a generic view that accepts its template_name attribute from
the urlconf dynamic variable:
(r'^(?P[^/]+)$', TemplateView.as_view()),
But I get an exception:
TemplateResponseMixin requires either a definition of 'template_name'
or an implementation of 'get_template_names()'
I've read the
project __init__.py, but that works inconsistently, apparently
because django isn't fully initialized when the project __init__.py is
loaded.
On Tue, May 17, 2011 at 11:07 AM, Brian Craft <bc...@thecraftstudio.com> wrote:
> Is there a good way to add new users to a default group when they a
Is there a good way to add new users to a default group when they are
created (e.g. via django-registration)? I just tried binding the
post_save signal for User, and adding the group in the signal handler
(if "created" is true). However, I haven't found a good place (file)
to put the connect()
> > I'd think you'll find it's significantly more than a factor of 2. For bulk
> > inserts, raw SQL is often several orders of magnitude faster.
>
> You might want to check outhttp://pypi.python.org/pypi/dse/. My tests
> using postgres showed a 3Xperformancegain on inserts compared to
> using the
that does very similar
functionality to the functionality discussed.
Hope that clears up any confusion.
Brian
On Fri, May 13, 2011 at 10:20 AM, Xavier Ordoquy <xordo...@linovia.com>wrote:
> > On May 13, 9:34 pm, Brian Bouterse <bmbou...@gmail.com> wrote:
> >> Go for it!
com/dcramer/django-sentry>.
You're idea sounds great and needed, I just want to encourage you to make
sure you're adding to the community, not re-inventing existing solutions.
Best,
Brian
On Thu, May 12, 2011 at 11:44 PM, Adrien LEMAIRE <
adrien.lema...@aquasys.co.jp> wrote:
> Hello de
ome way, and since I never distribute it I never have to share my
derivative changes thereby preventing the GPL project from benefitting from
my extensions. That is a pretty easy way to sidestep any of these licenses.
Brian
On Fri, May 13, 2011 at 7:58 AM, Alistair Grant <akgrant0...@gmail.
solved this by moving it to the model clean() method, and using
imagefield.file.open() and imagefield.file.read() to get the data for
computing the other fields.
On Wed, May 11, 2011 at 1:28 PM, Brian Craft <bc...@thecraftstudio.com> wrote:
> I have a model with an imagefield, and so
I have a model with an imagefield, and some fields that are computed
from the image. I'm trying to override the "save" method to fill in
the other fields.
When I test this in the admin, there are two problems: first, the path
(mymodel.image.path) doesn't honor the upload_to setting on the field.
Sure - it's just that bit more convenient and readable to use the ORM
approach. If I get the chance, I must try substituting direct calls to
psycopg and see if that makes it significantly faster again. I'd guess
there's maybe another factor of 2 to be had.
--
You received this message because
Having hauled myself a few feet up out of the abyss of ignorance, I can
answer my own question (which might be of benefit to others getting started
with django). To clarify the problem, I have a standalone script that
imports the django settings and uses its ORM pleasantness to populate one of
I would like unit tests that do file manipulations to run with a
different storage "location", so they're not manipulating real app
files. Is there a good way to do this? Is there a way to override
model field initializers, so I can instance a model, passing in the
'storage' parameter for an
any advice you can offer,
Brian
--
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.c
r-side state
machine that ensures what a user can and can't do with the application from
a given state.
This is not exactly what is being discussed here, but it is near it in
topic, so I thought I would mention it.
Brian
On Mon, May 9, 2011 at 8:59 AM, Cal Leeming [Simplicity Media Ltd] <
AMQP is not too heavy weight for me. +1 for Celery and RabbitMQ.
Brian
2011/5/6 λq <lamb...@gmail.com>
> Thanks guys.
>
> Is AMQP a bit too heavy weight?
>
> Besides celery, are there any realworld in-production usage of
> Django+ZeroMQ?
>
> Is django-ztask stable
I like your second solution a lot better than mine. I've never seen {%
ifchanged %} used properly before.
Brian
On Wed, May 4, 2011 at 1:19 PM, Javier Guerra Giraldez
<jav...@guerrag.com>wrote:
> On Wed, May 4, 2011 at 11:42 AM, pankaj sharma
> <new.pankajsha...@g
structure dynamically in the view code without explicitly pre-defining it as
a class or model.
Hope this helps.
Brian
On Wed, May 4, 2011 at 12:42 PM, pankaj sharma
<new.pankajsha...@gmail.com>wrote:
> hello friends,
> i have database of colleges.
> i want to show all cities
>
something to allow all data to
be moved back and forth. It sounds like you have a data sync service. Any
thoughts on open sourcing that code? Anyone else know of a project that
already does this?
Thanks,
Brian
On Wed, May 4, 2011 at 9:02 AM, David Goehrig <d...@nexttolast.com> wrote:
and closed.
Best,
Brian
On Wed, May 4, 2011 at 6:32 AM, VoodooH <radu.hasan2...@gmail.com> wrote:
> Hello guys,
>
> We currently have a desktop software that uses a sqlite embedded
> database. We are now gonna develop the online version for our software
> and we need your opi
I will definitely be using this next time. Nice post.
Brian
On Tue, May 3, 2011 at 5:50 PM, Thomas Weholt <thomas.weh...@gmail.com>wrote:
> Hi,
>
> Just posted a new blog about more realistic performance of DSE against
> a real database. Head over to http://weholt.blo
This would have been so useful on my last project. 14.4 Million records
took a couple of days with a single thread using the ORM. This would have
really sped things up.
Brian
On Tue, May 3, 2011 at 7:50 AM, Thomas Weholt <thomas.weh...@gmail.com>wrote:
> Inserting, updating or dele
A form with a CharField seems to end up with a zero-length string in
the cleaned_data if the field is not in the form data. Is there any
good way to avoid this?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
net/htmldoc/options.html#'list'>
.
Brian
On Thu, Apr 28, 2011 at 4:50 AM, Tom Evans <tevans...@googlemail.com> wrote:
> On Thu, Apr 28, 2011 at 8:47 AM, Kenneth Gonsalves
> <law...@thenilgiris.com> wrote:
> > On Thu, 2011-04-28 at 00:27 -0700, Derek wrote:
> >>
On Apr 21, 12:48 pm, Guevara wrote:
> Hello!
> My project is failing to import the staticfiles_urlpatterns, using
> Eclipse Helios:
>
> urls.py
>
> import from django.contrib.staticfiles.urls staticfiles_urlpatterns
>
> In django 1.3 I already have:
>
> INSTALLED_APPS = (
I need to create objects with version tracking, a bit like wiki
content. Anyone done this in django?
I could create a model with a content field and a version field. But
I'm not sure how to query (for example) all the latest versions of a
set of objects. I'm sure there's a raw sql method via
On Apr 15, 2:23 pm, Jeff Blaine wrote:
> Thank you all. I will digest the replies when I have the time to properly
> focus back on the issue (it's obviously small, since I have a workaround in
> place by shoving base.html into the project root).
>
> It still, regardless of
Could you include the output to highlight the differences?
Brian
On Wed, Apr 13, 2011 at 9:32 AM, Gianluca Sforna <gia...@gmail.com> wrote:
> In writing a complex filter for an application, I've found a different
> behavior between a filter like:
> Model.objects.exclude(f
This is an interesting approach I had not thought of before. Thanks!
Agreed, CRUD is not the same as REST.
Brian
On Tue, Apr 12, 2011 at 10:51 AM, sebastien piquemal <seb...@gmail.com>wrote:
> Well ... http://django-rest-framework.org allows you to override the
> method by a
a common pattern I end up implementing a lot, and it would be cool
if a rest framework let me accomplish this in an easier way.
Brian
On Tue, Apr 12, 2011 at 6:23 AM, Tom Christie <christie@gmail.com>wrote:
> I've been working on this with some folks:
>
> http://django-rest-frame
I'm a fan of using flot <http://code.google.com/p/flot/> for visualization.
I've used the Google Charts and it works well too.
Brian
On Sun, Apr 10, 2011 at 2:07 AM, ucnt...@gmail.com <ucnt...@gmail.com>wrote:
>
>
> On Apr 8, 12:22 am, Chris Matthews <ch...@bbd.co.
On Mar 30, 9:36 am, Dipo Elegbede wrote:
> Hi all,
>
> I have a django application that uses mysql database.
>
> Everything works just fine except that I noticed some queries do spend a lot
> of time to load.
>
> I have about 15,000 checklists the system would have to
Alarm bells usually go off for me when I am required to purchase a license
for code I have written. Maybe I'm just an open source kinda guy, but if
I'm going to write code, I should be free to run it without paying a license
fee. Flex is a life choice ... I won't be making it.
Brian
On Fri
On Mar 23, 9:55 pm, Javier Guerra Giraldez <jav...@guerrag.com> wrote:
> On Wed, Mar 23, 2011 at 8:49 PM, Brian Neal <bgn...@gmail.com> wrote:
> > items = Post.objects(filter=forum__topic__in=forums).order_by('-
> > topic__update_date', '-update_date').sele
On Mar 23, 1:47 pm, Javier Guerra Giraldez <jav...@guerrag.com> wrote:
> On Wed, Mar 23, 2011 at 1:35 PM, Brian Neal <bgn...@gmail.com> wrote:
> > So you are suggesting I need to shrink the number of topics or
> > possibly link the posts directly to the forum?
>
On Mar 23, 8:58 am, Shawn Milochik wrote:
> Everyone:
>
> I just donated $25 to the Django Software Foundation. I would like
> to suggest that others who appreciate all the hard work chip in a
> couple of bucks if they are able. Especially those who, like me, want
> to
On Mar 23, 12:59 pm, Javier Guerra Giraldez
wrote:
> On Wed, Mar 23, 2011 at 12:56 PM, Javier Guerra Giraldez
>
> wrote:
> > in this case the problem arises because of the big mismatch between
> > the forums_forum table (just 15 records) and the
On Mar 23, 11:45 am, Javier Guerra Giraldez
wrote:
>
> >http://dpaste.com/524865/
>
> ok, now it's obvious.
>
> the second query (the one with topic__forum__in=forums, right?) is
> scanning the whole topic table (12Krows). it seems to be guessing
> that picking a significant
On Mar 23, 8:49 am, Javier Guerra Giraldez wrote:
> are the EXPLAINs from these exact SQL queries? i don't see why it
> cares about the forum_forum table, which isn't mentioned on the
> queries.
Sorry, my bad. I've been tweaking things in vain. Here are the correct
EXPLAINS.
On Mar 22, 11:01 pm, Javier Guerra Giraldez <jav...@guerrag.com>
wrote:
> On Tue, Mar 22, 2011 at 10:42 PM, Brian Neal <bgn...@gmail.com> wrote:
> > This is what I came up with to reduce the long times I was
> > seeing (but it still is slow). This is probably going to g
On Mar 22, 10:15 pm, Javier Guerra Giraldez <jav...@guerrag.com>
wrote:
> On Tue, Mar 22, 2011 at 10:06 PM, Brian Neal <bgn...@gmail.com> wrote:
> > I see. There are in fact only 15 forums. But why does it take 40
> > seconds? I can get much better results if
On Mar 22, 9:58 pm, jim_rain <j...@rainville.net> wrote:
> Brian -
>
> Thanks for the reply - I missed that step. But when I added it the
> behavior changed but still no joy. The form has text field in addition
> to the date picker - it looks like this:
>
> class JTestFo
On Mar 22, 9:56 pm, Javier Guerra Giraldez <jav...@guerrag.com> wrote:
> On Tue, Mar 22, 2011 at 9:49 PM, Brian Neal <bgn...@gmail.com> wrote:
> > I studied the SQL that Django generated and it seemed fine to me.
> > That's why I wonder if it is a MySQL issue since
On Mar 22, 8:17 pm, smallfish xy wrote:
> hi, you can try split the in statement, with less with "in".
>
> forums = [1, 2, 3, 4, 5]
> r = []
> for f in forums :
> r.append(Post.objects.filter(topic__forum=f.id)
> return r
That's what I did to work around it. I'd
On Mar 22, 6:49 pm, jim_rain wrote:
> I'm running Django 1.2.5 on a linux (Centos 5.5) server and I'm trying
> to use a datepicker widget written by Aaron Williamson (http://
> copiesofcopies.org/webl/2010/04/26/a-better-datetime-widget-for-
> django/)
>
> I followed all the
I apologize in advance as this is probably only tangentially related
to Django.
I have a forums type Django application. In my RSS feed class I had
this Django model query:
return Post.objects.filter(topic__forum__id=obj.id).order_by(
No, it's not. It's a static file.
On Mon, Mar 21, 2011 at 10:23 AM, Matt Robenolt
<youdontevenk...@gmail.com> wrote:
> Is your main view being rendered by Django or something else? If so, you'll
> have access to the cookie.
>
> On Mar 21, 2011, at 1:09 PM, Brian Craf
It's in a cookie once you coerce django into sending the cookie to the
browser. This is less automatic for ajax apps, because django isn't
serving the forms (which is when it usually sends the csrf cookie).
On Mon, Mar 21, 2011 at 9:49 AM, Matt Robenolt
wrote:
> To
Yeah, I'm using that technique. It works fine once you have the
cookie. My question was about how to get the cookie, which is not
described well in the documentation.
Manually calling get_token() in the view for the first ajax GET seems
to be working. After that I can POST to other views.
On
In an ajax-based site, where the page is static, and makes ajax calls
after loading, how would one get a csrf cookie? There aren't any
templates associated with the views (they just return json strings).
Setting of the cookie seems to be a side effect of serving forms in
django, but the client
When a long-running script loses the db connection, I get this exception:
_mysql_exceptions.OperationalError
Is there any way to trap this in a database-agnostic way? Or must I
hard-code it to mysql?
--
You received this message because you are subscribed to the Google Groups
"Django users"
I recommend running your runserver inside
screen<http://www.manpagez.com/man/1/screen/>and leaving it detached
when you are logged out.
Brian
On Wed, Mar 9, 2011 at 9:50 PM, Huy Ton That <huyslo...@gmail.com> wrote:
> Well, if you are just doing a development test, as it seems
I have a script that sits in a loop, doing occasional queries, something like
while 1:
wait.for.some.event()
object=get.some.django.db.object()
do.something.with(object)
transaction.commit_unless_managed()
The last line is required so the script will see updates to the
database from
On Tue, Mar 8, 2011 at 12:53 PM, william ratcliff
wrote:
> If you look through the code in the django admin, then the limit is set in
> the database schema.
I've read elsewhere that it's also in all the auth form validations,
so you have to subclass all of them. I
dit some more codes?
>
> --
> 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...@g
201 - 300 of 923 matches
Mail list logo