Some ideas (untested of course)
"I need develop an API that will read the matching pattern from the log
file, and push it to the DB." <== this is NOT an API - but have look at how
a different script could access your log:
https://stackoverflow.com/questions/12523044/how-can-i-tail-a-log-file-in
https://code-maven.com/serialize-datetime-object-as-json-in-python
On Thursday, 20 February 2020 22:12:11 UTC+2, mick wrote:
>
> TypeError at /addForm4
>
> Object of type date is not JSON serializable
>
> Request Method: POST
> Request URL: http://127.0.0.1:8000/addForm4
> Django Version: 3.0.1
>
no one's
able, it's no problem.
Thanks!
--Derek
--~--~-~--~~~---~--~~
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 unsubscri
will be called
and you'll get fresh values.
HTH.
--Derek
On Jan 20, 10:47 am, Dheeraj Irukulla wrote:
> Hi Malcolm,
>
> I'm building my forms in a file called forms.py. This is how I populate the
> choice list:
>
> CLIENT_CHOICES = [
> ('',
Malcom is absolutely right, apologies for sending untested code to the
list.
--Derek
On Jan 20, 4:53 pm, Malcolm Tredinnick
wrote:
> On Tue, 2009-01-20 at 11:00 -0800, Derek Payton wrote:
> > The issue is that CLIENT_CHOICES is only evaluated once, when the
> > server is sta
ts.exclude(activeyesno = 2).filter
(grantstartdt__year=yr.pk)
Which should do the trick. Alternately you could use year_id if you
don't need your Year model for the template.
Derek
On May 29, 3:33 pm, Jesse wrote:
> Hello,
>
> year_id (2004 etc) is a dropdown box on the template. Th
I just tried the code and it worked for me (although I do work for the
NYT, so I hope it would!), so I'm guessing it's a Windows 7 issue -
perhaps it doesn't treat feedparser requests the same as other Python
scripts for purposes of requesting urls?
Derek
On Jun 4, 11:40 am,
a for a period of years, you may want to have League be a
FK from SchoolSeason, not School, since colleges sometimes leave one
conference to join another.
Derek
On Sep 25, 8:24 pm, Jim McGaw wrote:
> What you might be asking for is the following syntax, that allows you
> to perform q
How about using filter() before annotate()
Topic.objects.filter(subtopics__trashed_at__isnull=true,
subtopics__complete_at__isnull=True).annotate(Count('subtopics'))
That filters out the records you don't want and then performs the
annotation on the remaining set.
On Sep 26, 6:04 am, "oliver.an
on any URL in the project, including admin.
Many thanks Malcolm.
Derek
--~--~-~--~~~---~--~~
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
Meant to add that this was definitely something in r5516 - it appeared
consistently going between r5515 and r5516.
sorry haven't had time to poke about at the cause- got a demo of the
project this afternoon :)
If I can help track it down, let me know.
Take a look at this:
http://www.djangoproject.com/documentation/authentication/#authentication-data-in-templates
You can use this to put something in a base template that all your
site templates can be based on.
Derek
--~--~-~--~~~---~--~~
You received this
How are you producing your index page? If you look in the docs,
you'll see the warning about needing a RequestContext- if that's not
being used in the view that is loading the index.html into a response
then the template won't have any user info even if you are logged in..
Hope that makes some s
hey all,
could anyone point me to a python html sanitizer implementation (or
example)? i don't mean to strip all html, just tags and attributes not
on a whitelist, such as I/B/A href/U/etc.
danke,
derek
--~--~-~--~~~---~--~~
You received this message be
well, but sometimes you want them to be able to enter HTML. style
items, simple links, etc...
[EMAIL PROTECTED] wrote:
> Yes it is much safer to reject rather than sanitize. If bad tags are
> detected then reject the input out of hand. If you don't your
> sanitizer could be turned against you
> note: I know this looks complicated, but if you built your sanitizer
> once you can always reconfigure and reuse it.
> we use the above example for text-fields in the admin (with TinyMCE).
>
> patrick
>
> Am 13.07.2007 um 11:23 schrieb Derek Anderson:
>
>&
/django_schema_evolution-v096patch.txt
-- Derek
--~--~-~--~~~---~--~~
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
you're not adding two ints, you're adding an int to an instance of your
Choice class. make your line:
pr = pr + a['choice'].value
or whatever you called it.
Greg wrote:
> Hello,
> I have the following view
>
> def showcart(request, style_id, choice_id):
> s = Style.objec
you were supposed to substitute "value" with whatever column you have
defined. (you didn't post your model def)
Greg wrote:
> Derek,
> I tried that and now I get the following error:
>
> AttributeError at /rugs/cart/1/4/
> 'Choice' object has no attrib
yeah, i did a poor/non-existent job advocating inclusion of my SoC work
into django-proper. (combination of frustration with my original mentor
and busy prepping for starting my phd right after it ended - i just
handed it off and didn't follow through afterwards) but i use django
quite a bit
re trying to add a number to a non-number
class. you have to pull the actual number out of whatever class
structure you've put it in.
Greg wrote:
> Derek,
> Ok...I made the change and I'm now getting the error:
>
> TypeError at /rugs/cart/1/4/
> unsupported operand t
ngo-proper.
Thanks,
Derek
Derek Anderson wrote:
> Hey all,
>
> I've ported my schema evolution work from my SoC project last summer to
> Django v0.96. To use it, download the patch below, and run the
following:
>
> $ cd //site-packages/django/
> $ pa
understandable. i do have both, but not integrated into django's
framework. when i finish such, would you suggest a patch posted to the
list, or attached to a bug report? (if the latter, a new bug or is
there a schema evolution bug already in discussion?)
danke,
derek
Russell Keith-
#x27;, [])
> cart.append({'style': s, 'choice': c})
>
> What method do I use on request.session to delete only one "row" in my
> cart dictionary? Does cart have an id field that I can access?
>
> Thanks
>
> On Jul 20, 8:44 am, Greg <[EMAIL
Tim Chase wrote:
> Or, if you're away from the web, [...]
because his secretary prints out and hand-delivers his emails? ;-P
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this g
Tim Chase wrote:
>
> This is also why I prefer mercurial (hg) as my version-control.
> Svn is nice if you're connected to your central repository all
> the time, but I also like to be able to use my version-control
> while I'm disconnected...yet still be able to sync up to a main
> repo. I tried
erent ideas)
derek
Russell Keith-Magee wrote:
> On 7/20/07, Derek Anderson <[EMAIL PROTECTED]> wrote:
>> but i use django
>> quite a bit now and am surprised some sort of this hasn't been merged
>> yet, so i figured i'd bring it up to date and re-release.
>
&
i
do admit that the tests are not comprehensive. i figure release
early/often. :)
> Yours,
> Russ Magee %-)
glad for the constructive criticism. :) i think the only thing we're
too far apart on is the notation. i'm not wed to it, but i do think
light-weight/in-the-mod
hey all,
i'm having a heck of a time using pydev (the eclipse python plugin). it
keeps randomly locking up eclipse (unresponsive UI + 100% CPU), usually
when i switch tabs. anyone else experiencing this?
thanks,
derek
--~--~-~--~~~---~--~~
You received
added postgres unit tests to the schema-evolution branch. also fixed a
bug where constraint lookups in postgres broke after a model rename.
thanks,
derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
this is the right place. or anyone can feel free to PM me.
which database are you using? can you give me a copy of your model file
and a dump of your existing schema?
Romo wrote:
> Hello!
>
> I don't know if this is the right place to a little problem I have
> with this...
>
> I installed
s.py and/or your existing database schema
thanks!
derek anderson
--~--~-~--~~~---~--~~
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
T
Compiz.
>
> One more thing, did you try updating your Eclipse install? My install
> is fully updated, though I never experienced a total lock-up while
> using Eclipse.
>
> On 8/1/07, Derek Anderson <[EMAIL PROTECTED]> wrote:
>> hey all,
>>
>> i'm havi
haha. yeah, i know, it was a rhetorical question...
i do appreciate the detailed description tho! even if it does make me
sound like a moron being schooled by a guy named nimrod. :-P
Nimrod A. Abing wrote:
> On 8/6/07, Derek Anderson <[EMAIL PROTECTED]> wrote:
>> i was u
this does sound quite usefullet us know if you find one and/or roll
your own. :)
Tim Chase wrote:
>> I'm not sure I really understand. It sort of sounds like you are
>> talking about a CharField with a choices argument. Is what you're
>> looking for more complex?
>
> No...a "choices" arg
hey,
how is everyone handling mutual exclusion between server threads in
django? is there a built-in method i'm missing?
derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gr
i have a number of background threads in my app, and for a few of them i
want to make sure only one of them exist. (not one per server thread)
for instance, my bigram indexeror my notification mailer.
Jeremy Dunck wrote:
> On 8/16/07, Derek Anderson <[EMAIL PROTECTED]> wrot
same time.
Jeremy Dunck wrote:
> I think you want gearmand:
> http://www.danga.com/gearman/
>
> It has a 'uniq' property that ensures only one job with a given name is
> running.
>
> On 8/17/07, Derek Anderson <[EMAIL PROTECTED]> wrote:
>> i have a
that, an in-process
> mutex will do you no good.
>
> If you really are single-process, Django does not have a built-in
> mutex, but maybe you want:
> http://docs.python.org/lib/module-mutex.html
>
>
> On 8/17/07, Derek Anderson <[EMAIL PROTECTED]> wrote:
>> n
this. Is there any other way
I can include remote files with Django that I am missing, or do I have
to come up with my own solution? Any suggestions/advice appreciated,
Thanks,
Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
had something in it similar to the tag that you could
point at a site and directly embed its code... this would work nice as
the client is doing all the fetching.
I suppose doing a simple client-side fetch & print in javascript could
work as well.
Derek
Rajesh Dhawan wrote:
> Hi
otherwise i expect your reaction to
be like "yeah, neat, but, wtf?" :)
anyway, link: http://gpapers.org/
ttyl,
derek
--
looking to buy or sell anything?
try: http://allurstuff.com
it's a classified ads service that
shows on a map where the seller is
(thin
it for all of my
django-based projects. :)
derek
--
looking to buy or sell anything?
try: http://allurstuff.com
it's a classified ads service that
shows on a map where the seller is
(think craigslist + google maps)
plus it's 100% free :)
--~--~-~--~~--
i use beautifulsoup [http://www.crummy.com/software/BeautifulSoup/].
run it on your input, iterate through all tags, calling extract if
they're not in your allowed set. then print it back out as a string.
derek
Rob Hudson wrote:
> Hi,
>
> I'm looking for something
Jeff Anderson wrote:
> And you just need minimal functionality,
> You could probable write up a small hack to do it with some regular
> expressions. You can find things that strip html, and then you could to
> the simple markup fairly easily after that. It shouldn't take too long
> to write som
nearly
> 100% overlap in functionality between the two interfaces. I'm a CLI
> snob but I also need GUI to "sell" my projects to the rest of the
> team.
>
>
>
> On Jan 21, 12:12 am, Derek Anderson <[EMAIL PROTECTED]> wrote:
>> hey all,
>>
>>
long and glorious history is
not a secure standard anymore. plus it's inferior in virtually every
way to AES. i'd highly recommend AES instead.
derek
--
looking to buy or sell anything?
try: http://allurstuff.com
it's a classified ads service that
shows on a map where
d research of the professional cryptographic community.
derek
Tim Chase wrote:
>>>> - Take a message, encrypt it using a secure method (should be better
>>>> or equal than OTP), return the encrypted message.
>> >
>>> parties, Blowfish and DES3 are popular choic
How about putting the separator before the link?
if first, put nothing
else
if last put 'and'
else put a ', '
Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
It's not as efficient as the methods already described, but you can do
this in Django if it's easier.
Just set up a redirect (django.contrib.redirects) for robots.txt
pointing to a flatpage (django.contrib.flatpages). for example,
/robots-t
n each file
you upload, as well as the bucket. Also, you might need to adjust
your code to allow for a little latency in the system.
Derek
On Sun, Apr 27, 2008 at 6:18 PM, truebosko <[EMAIL PROTECTED]> wrote:
>
> Hi there,
>
> Recently been toying with the idea of using Amaz
On Sat, May 3, 2008 at 11:05 PM, derek.hoy <[EMAIL PROTECTED]> wrote:
> - if you register models to basic-admin, they won't show automatically
> in advanced-admin and vice-versa
Looks like you can register a model with more than one
On 3/21/07, worksology <[EMAIL PROTECTED]> wrote:
>
> I have the exact same issue, also with Dreamhost. I tried the
> "mysql_old" thing, but still got the same error.
Malcolm has just checked in a fix.
this has saved M
n, but
it seems to work fine now.
Derek
--~--~-~--~~~---~--~~
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 gr
well, my first real django app is now online!
http://allurstuff.com/
it's kind of like craigslist, but with maps.
sorry to tout my own warez, but, you know, proud
father syndrome and all :)
derek
--~--~-~--~~~---~--~~
You received this message be
> Are there any restrictions on multithreading with mod_python or just
> regular multithreading code will work.
yep. and regular multithreading code will work. no special setup. (i
do it myself)
Adrian-Bogdan Andreias wrote:
> Hi,
>
> This is a rather python on web question then a django
if you want any help, feel free to pm me.
Xan wrote:
> Thanks, what the equivalent in mysql?
>
> Meanwhile, I think I will try patch to 0.96 found in
> http://code.djangoproject.com/wiki/SchemaEvolutionDocumentation
>
> Thanks another time,
> Xan.
>
>
> On Sep 26, 12:27 am, Joe <[EMAIL PROTEC
ng equivalent to
"what's the proper timing sequence for a ford 302 V8", and suspicious of
programmers who have a history of outright lying to them)
btw, why do you think OSS is beating the pants off of closed-source
stuff anyway? we don't have more money. we don't ha
> > I tried downloading Django and installing it on my windows looks very
> > difficult. Plsease can anyone help me on how to install Django and how
> > to go about starting web development in Phyton?
I think your best bet would be to follow John's advice:
> I'm not sure of the details for doing
you're not including the
extension in your manage.py, or anywhere else you're calling it. (same
goes for DJANGO_SETTINGS_MODULE)
derek
Xan wrote:
> Hi,
>
> * I have installed django 0.96 in ubuntu 7.04 [http://
> packages.ubuntu.com/gutsy/python/python-django] (when I run dpk
your previous bug was a standard import issue unrelated to deseb.
however this looks like it may be a real one. let me look into it.
derek
Xan wrote:
>
>
> On Oct 11, 5:13 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
> wrote:
>> On Thu, 2007-10-11 a
xan,
this is fixed in the latest version of deseb. (v0.2.2)
feel free to pm me if you have any further problems, or join:
http://groups.google.com/group/deseb-discuss
or use the issue tracker at:
http://code.google.com/p/deseb/
thanks,
derek
Xan wrote:
> Okay. Say something
>
ok, seriously, is there not something we can do about the porn spam?
some of us read this list at work on machine's we don't own. the image
stuff is becoming a serious problem.
--
looking to buy or sell anything?
try: http://allurstuff.com
it's a classified ads service that
shows
_demo.mpeg
~10 minutes. the audio quality sucks, (i'm no AV guy), but it gives you
a good overview. :)
derek
[EMAIL PROTECTED] wrote:
> I'm aware of a number of different schema evolution (Rails style
> migration) tools that exist, most notably the ones listed at
>
Hello,
I was recently charged with installing a new development server at
work, and I'm having some trouble getting Django to work as FastCGI
under Lighttpd. The new server is setup identical to the old server,
except for some hardware upgrades and we moved from Ubuntu Dapper to
Ubuntu Gutsy.
Li
Chris,
[EMAIL PROTECTED]:~/django-trunk$ svn update
At revision 6897.
Any ideas?
Thank you,
--Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
ems to be with the way flatpages handles
500's. Not sure if it's a bug nor not.
--Derek
On Dec 5, 4:42 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On 12/5/07, Derek Payton <[EMAIL PROTECTED]> wrote:
>
>
>
> > Apparently there was an issue with
templates directory, and it seemed to fix it.
However, is this the intended behavior (requiring a 404.html for
flatpages to work)? Should this be filed as a bug?
Thank you,
--Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
are you building this for a specific client? or looking to sell to many?
if the former, i'd strongly suggest considering trusting your client
with the code. you're likely to see that trust reflected back towards
you in your relationship. lots of for-hire-and-support contract work
goes belly
t should I be doing?
Thanks,
Derek
--~--~-~--~~~---~--~~
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,
re request was recently changed to "Someday/Maybe". To me it seems
obvious that all of the data that a Django app could need might not
reside on the same database for any number of reasons.
Perhaps I'll put some work into this when I have some time and get it
caught up with
the template.
>
> unfortunately i haven't found any way to do it, so i:
>
> - either do it in the view
> - or i add a content-type property to every model of mine
>
> are there any other ideas how to do it?
Use a custom filter ?
--
Derek
--~--~-~--~~
ith the scale id and a value.
Derek
--~--~-~--~~~---~--~~
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,
On 6/2/06, mamcxyz <[EMAIL PROTECTED]> wrote:
>
> Somebody have experience with a good VPS hosting provider?
rimuhosting.com
excellent responsive support.
--
Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
ut that's about to change
with a new django-based site for a music charity under development.
A few weeks ago I moved it to rimu's London facility- it was all done
within a couple of hours of putting in the ticket.
--
Derek
--~--~-~--~~~---~--~~
You re
param, you use the object to fill bits of your
page etc.
--
Derek
--~--~-~--~~~---~--~~
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
help you check if that's the problem?
--
Derek
--~--~-~--~~~---~--~~
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 unsubscri
And in the workgroup model, there was this:
def _get_user_last_name(self):
return self.user.last_name
user_last_name = property(_get_user_last_name)
May not be as efficient as doing it in the query, but it's a lot
clearer for me than all those dots and underscore
__ c_c_c_C/ \C_c_c_c____
it's relatively lean and
mean.
The idea of having tutorial stuff on using X with Django is a good way to go.
--
Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to t
Don't put the title in the song model- just have a Title model instead of Alias.
Then you just list the titles...
--
Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
1708
http://ivory.idyll.org/articles/basic-supervisor.html
And this is cool :)
http://www.truepathtechnologies.com/gcal.html
--
Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to thi
gs.py for stuff like this that will be different for
development, test, production servers.
You just import it into your settings.py, then you can have different
base URIs for each environment.
--
Derek
--~--~-~--~~~---~--~~
You received this message because you
nnect(my_func, signal=signals.post_save, sender=MyModel)
If you look in the source for Model.save(), in
django/db/models/base.py you'll see where the pre and post save hooks
are called.
--
Derek
--~--~-~--~~~---~--~~
You received this message because you are subsc
rimu have some useful info for a VPS setup:
http://rimuhosting.com/howto/memory.jsp
--
Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
Or just use the templatetag approach mentioned earlier.
--
Derek
--~--~-~--~~~---~--~~
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@googlegro
On 6/28/06, Julio Nobrega <[EMAIL PROTECTED]> wrote:
> Django | Python: We indented jazz (some people say jazz' magic is
> the space between the notes, a definition that I love)
that's great :)
I had 'the Djoy of Django' in my head as
after logging out, the main page says I'm logged in.
If you're just hitting the back button, then you're probably seeing
the page cached by your browser. Try doing a page refresh and see
what happens.
--
Derek
--~--~-~--~~~---~--~~
You received t
lemented
> (yet).
If you're working with FF, maybe try with IE, or use another PC to
connect? That would at least help narrow down the problem.
I'm using a setup just like you've described, and it works fine for me.
--
Derek
--~--~-~--~~~---~--~-
explanation) would be greatly appreciated!
You could avoid wizardry by just getting the LabelIngredients sorted
by order, and in the template display the labelingredient.ingredient.name ?
I tend to resort to adding properties for this kind of thing so I can
understand
; )
In the template, you iterate over labelingredients and refer to
labelingredients.ingredient.name
{% for labelingredient in labelingredients %}
{{ labelingredient.ingredient.name }}
I think that'll work- I'm having a pause with Django development for
the moment...
--
Derek
--~--~-~-
On 7/20/06, markguy <[EMAIL PROTECTED]> wrote:
>
> Derek,
>
> I appreciate the followup. That works, but I have to say, I don't
> understand *why* it works!
that's good :)
The thing that's hard to pick up is that the ORM (db) stuff isn't
quite object-o
Sorry, this doesn't help with your problem with Apache, but Lighttpd has this:
http://lighttpd.net/documentation/secdownload.html
--
Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users&
will be called if you update the customer.
You can do a test to see if the Customer is new- I think you just
check for self.id is None and you know this is the first time through
the save()
--
Derek
--~--~-~--~~~---~--~~
You received this message because you
On 8/6/06, Maciej Bliziñski <[EMAIL PROTECTED]> wrote:
>
> There's only one thing missing. The website has to be in form of static
> HTML files.
You could try http://www.httrack.com/
I've used it for demos of dynamic sites. It's free
hey leon,
the schema evolution feature i'm working on should cover the vast
majority of model modifications like you mention, without
data-destructive database modifications. i should be publicly posting
something this week.
thanks,
derek
[EMAIL PROTECTED] wrote:
> Hi,
>
>
ething
like this myself.
One thing I had to do, because the old site has loads of .html files
in the root, is put the url regex straight into the site's urls.py as
the last line, eg
(r'^(?P.*)$', 'verdjnlib.templatepages.views.templatepag
submits the form for payment.
This is new territory for me, but there are folks round here who've
done this stuff before.
--
Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gro
ey field ('id').
> -Dave
Thanks Dave, that's what I've done.
I haven't seen this mentioned before, so it might be worth pointing
out in the docs?
Some of the slug examples use slug as PK. Funnily enough, your blog
example does :)
http://davidavraamides.net/blog/2006/05/1
ng-comments/
ah well, that's how we learn.
Blog looks nice by the way. Thanks for making your work available.
--
Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To po
801 - 900 of 947 matches
Mail list logo