ure what I'm saying except that maybe the old-style
Template class just needs to be removed to avoid confusion.
On Tue, 13 Mar 2018 at 14:50 Mike Dewhirst wrote:
> On 13/03/2018 11:44 AM, Craig de Stigter wrote:
>
> Thanks for the reply.
>
> So I guess there are actually now t
just use the new-style templates, which means we have to avoid
using `django.template.Template` at all. Perhaps it could be deprecated and
removed?
Cheers
Craig de Stigter
On Monday, 12 March 2018 11:21:41 UTC+13, Daniel Roseman wrote:
>
> On Sunday, 11 March 2018 21:06:51 UTC, Craig de S
in.py:3: RemovedInDjango110Warning: render() must be
called with a dict, not a Context.
This is a surprising warning to me, since the docs still document the use
of Template.render(Context) in 2.0:
https://docs.djangoproject.com/en/2.0/ref/templates/api/#rendering-a-context
Would someone mind explain
nt and is MIT licensed.
My question is does anyone have experience using PyMySQL, are there any
reasons why I shouldn't use it or known issues? Is anyone using it in
production?
Thanks in advance for any advice.
Cheers
Craig
--
You received this message because you are subscribed to the G
<https://gist.github.com/craigds/b53cf8a8110530436c7a>)
Seems the migration system isn't handling the monkey-patched field properly.
Does anyone know how to avoid this?
Cheers
Craig de Stigter
--
You received this message because you are subscribed to the Google Groups
"Django
I am getting the "standard" CircularDependencyError (Django 1.7c2 with
migrations) with ManyToManyFields and a custom user.
from django.db import models
from member.models import Member
from company.models import Company
class Affiliation( models.Model ):
member = models.ForeignKey( Member )
I know that this is a common question and I have seen many, many answers
when I google about this, but I need some advice.
What I have is a field in my models called entered_by which is ForeignKey
to the User model. I would like to have this filled automatically upon
creation in the Admin panel
Thank you. I think that is exactly what I need. Moving to Django 1.7 now
:-)
On Monday, August 11, 2014 9:47:43 AM UTC-4, Collin Anderson wrote:
>
> in django 1.7 we added "through_fields" which I think would solve your
> problem.
>
>
> https://docs.djangoproject.com/en/dev/ref/models/fields/#d
The basic idea is that I want to track training and have a roster for each
training session. I would like to also track *who* entered each person in
the roster hence a table rather than just an M2M to the Member model within
Training.
So, here is what I currently have:
class Training( model
In South, automatically generated migrations that add models fire the
function send_create_signal(), which among other things, results in a
ContentType record being written for the new model. Except that it doesn't,
because it actually just queues up that signal to be fired at the end of
the
and then run syncdb, that would fix it if you don't care about
> your data.
In my case, it is for a system that isn't in production yet, so I was planning
to wipe the database before running syncdb. I just didn't know if that is
necessary.
-Craig
>
> Shawn
&g
This is probably an easy question, but I didn't manage to find the answer.
If I just change the default value of a field in a model, do I need to run
syncdb?
Specifically I changed:
foo = models.IntegerField(default=1)
to
foo = models.IntegerField(default=5)
Thanks,
Craig
--
Trying to setup postgres with the postgres mac app and hit this error,
which I haven't been able to solve. Any thoughts?
ImportError:
dlopen(/Users/Craig/pyenv/mysite/lib/python2.7/site-packages/psycopg2/_psycopg.so,
2): Library not loaded: @executable_path/../lib/libssl.1.0.0.
Just confirming that this fixed the memory leak problem for us. Thanks
again :)
On Friday, March 22, 2013 3:07:02 PM UTC+13, Craig de Stigter wrote:
>
> Karen Tracey saves the day!
>
> Thanks so much, seems likely that's it :)
>
> Craig de Stigter
>
> On Friday, Mar
Karen Tracey saves the day!
Thanks so much, seems likely that's it :)
Craig de Stigter
On Friday, March 22, 2013 2:25:04 PM UTC+13, Karen Tracey wrote:
>
> On Thu, Mar 21, 2013 at 9:00 PM, Craig de Stigter
>
> > wrote:
>
>> Hi everyone
>>
>> (cross-p
Karen Tracey saves the day!
Thanks so much, seems likely that's it :)
Craig de Stigter
On Friday, March 22, 2013 2:25:04 PM UTC+13, Karen Tracey wrote:
>
> On Thu, Mar 21, 2013 at 9:00 PM, Craig de Stigter
>
> > wrote:
>
>> Hi everyone
>>
>> (cross-p
een unable to reproduce the bug on a
dev server, and I'm not comfortable with doing `git bisect` on our
production box ;)
I've tried using Dozer to track down the leak but it appears to cause
apache to segfault with annoying regularity before finding anything of
consequence.
Any tips
self.user = UserFactory.build()
self.workplace = WorkplaceFactory.build()
def test_foobar(self):
# how do I add self.user to self.workplace ?
self.assertEqual(self.workplace.employees_set.all(), 1)
--Craig
--
You received this message because you are subscribed to th
I think this is a bug in 1.4 that is probably addressed in the dev version.
The model docstring is not run through the markdown to HTML routine in the
django version I'm using. Was simple enough to patch locally.
On Sep 10, 2012 1:58 PM, "craig" wrote:
> It could be I'
:57:49 PM UTC-7, craig wrote:
>
> It could be I'm doing something wrong, but I have the admin documentation
> working, and read about the helpers ( :model:`app.model`, :view:, etc) but
> when I use them the docs render the actual text and not the link:
>
> class Calendar(model
It could be I'm doing something wrong, but I have the admin documentation
working, and read about the helpers ( :model:`app.model`, :view:, etc) but
when I use them the docs render the actual text and not the link:
class Calendar(models.Model):
> """
> Contains a collection of :model:`ev
x in
private_details]
- Craig
On Fri, Sep 7, 2012 at 2:06 PM, Jason Whatford <1jason.whatf...@gmail.com>wrote:
> Hi Craig, thanks for the response. I'm using django 1.2 for templating and
> webapp2 to handle the requests on appengine. I've tried your suggestio
{% if folder.id in private_folder_details.values() %} should do the trick
On Fri, Sep 7, 2012 at 11:06 AM, Jason <1jason.whatf...@gmail.com> wrote:
> Hi there,
>
> I'm using django 1.2 and am attempting to get the following code to work.
>
> private_folder_details = [{"folderId":"", "name": "
etrieval of multiple types of
subclasses, all in one query.
See the readme on that github link for an example. Please let me know what
you think! And file issues if you have some.
Cheers
Craig de Stigter
Koordinates Ltd
--
You received this message because you are subscribed to the Google Groups
&q
Hi All,
I need the bugfix from this ticket. This ticket is assigned to Version 1.3,
and was closed as fixed 5 months ago. This was fixed after the 1.3.1
release. Is there going to be a 1.3.2 release which includes this fix?
Cheers,
--Craig Blaszczyk
--
You received this message because you
Hi -
Responding to myself...
Doesn't this always happen? As soon as you ask for help, you figure out the
solution.
Here's what I want: c_list = C.objects.fiter(b__a__pk = pk_of_a_instance)
- Craig
On Thu, Dec 8, 2011 at 9:36 AM, Craig wrote:
> Hi -
>
> I'm pret
I'm having issues figuring out how it's actually done.
TIA,
- Craig
--
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 e
Hi,
I'm wondering if there's a recommended solution for a FloatField which
requires a minimum value? IMHO the best solution would be a ModelField
implementation which provides this functionality. Can anybody recommend one,
as I prefer not to implement it myself?
Cheers,
--Craig
csrf_token is a proxy object not a string.
Try doing:
csrf_token = '%s' % response.context['csrf_token']
--
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/-/Dt
#x27;ve also got SeaMonkey but haven't had a chance to try it yet.
Platforms I've got available are Linux or Windows.
Thanks. Bob.
The Aptana packaging of Eclipse for Python Development includes an HTML editor
that is Django-aware.
- Craig -
--
You received this message because you are
've registered won't match 'hostname1' since it only matches upper and
lower case letters.
- Craig -
--
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.
uivalent Person object
(though you may have Persons without corresponding Employees). You can then
use these models as follows:
(InteractiveConsole)
from foo.models import *
from datetime import datetime
now = datetime.now()
p = Person( name='Tom', date_inclusion=now )
ame or port, the
urlpattern entry should define the document_root parameter, and your HTML
documents should reference an absolute, not relative path (/media/..., not
media/...).
- Craig -
On Fri, Feb 4, 2011 at 17:33, h@ck5t0ck wrote:
> Hi,
> Thanks for your quick reply. I tried what you showe
instead of ActivePython and
see if that improves things.
- Craig -
On Mon, Jan 3, 2011 at 14:09, daniels wrote:
> Hi,
> Unfortunately i did not found the case, and i'm getting it pretty
> often, about 3 out of 5 times i refresh the page.
> If i leave it loading and i don't stop it it s
You'll probably want to install the Django debug toolbar (
https://github.com/robhudson/django-debug-toolbar) at some point, though it
doesn't help much with views that hang or throw exceptions.
- Craig -
On Sun, Jan 2, 2011 at 16:25, daniels wrote:
> Hi,
> I'm having a is
The exception you're seeing is just a response to stopping the request in
the browser. The real problem is that your view function is hanging. Could
you post the source to the view (and the substantial parts of your
template)? Very hard to offer suggestions without the right data.
-
what went wrong, but if you run
'python manage.py sqlall invdb' it should print out the DDL to create the
trigger and sequence, and you can manually add them.
- Craig -
On Thu, Dec 30, 2010 at 11:09, Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:
> I'm m
l behavior. (What happens when record 999 of 1000 blows up on a
key violation -- how do you correctly insert as much data as possible? Or
do you backup the database before you start, and restore from the backup if
anything fails?)
- Craig -
On Mon, Dec 27, 2010 at 16:55, Silva Paulo wrote:
when
you're writing management commands.
- Craig -
On Mon, Dec 27, 2010 at 05:29, derek wrote:
> Can you explain what you mean by "manual commitments" (preferably with
> a code example)?
>
> Thanks
> Derek
>
> On Dec 26, 4:38 am, Silva Paulo wrote:
> &
u point out the breakage, they will fix it, but it can be
confusing for the unwary).
- Craig -
On Wed, Dec 22, 2010 at 13:40, Dana wrote:
> I've been bashing my head against a wall lately trying to determine
> the best (highly subjective, I know) workflow for developing Django
>
ou should be good ... as soon as you replace
'localhost/portfolio' with 'portfolio' in the portfolio virtualhost
configuration.
- Craig -
On Fri, Dec 17, 2010 at 23:58, andy wrote:
> I have the following in my apache httpd.conf file
>
>
>ServerName
I usually register the signals for a given application at the bottom of that
app's model.py file.
- Craig -
On Thu, Dec 16, 2010 at 19:04, dmitry b wrote:
> On Dec 16, 3:28 pm, Graham Dumpleton
> wrote:
> > On Friday, December 17, 2010 10:00:55 AM UTC+11, dmitry b wrote
Tonton ...
See <http://docs.djangoproject.com/en/1.2/topics/db/sql/> for details on how
to use so-called 'raw' SQL (ie: not managed with models) within Django.
- Craig -
On Thu, Dec 16, 2010 at 09:16, Tonton wrote:
> Hello
> i like to use some database table that are no
f you need a
different Python (2.6 in this case), you'll need a differ mod_python. I
won't know how it gets installed and configured in your hosting
environment. Sorry.
- Craig -
On Thu, Dec 16, 2010 at 03:51, Álex González wrote:
> Thanks for your reply Craig,
>
> to use mod_
It sounds like you have a Windows and/or Python path problem. The DLL
that's being loaded (kernel32.dll?) isn't on the Windows path (or in the
Python lib directory) when Python is attempting to load it. Certainly
nothing to do with Django. What version of Python are you using?
- C
/ref/templates/api/#loading-templatesand
http://code.djangoproject.com/browser/django/trunk/django/template/loader.pyfor
details.
- Craig -
On Wed, Dec 15, 2010 at 18:30, Doug Ballance wrote:
> First, I'd like to find out if there is a better way than thread
> locals to do what I want t
Graham ...
I appreciate the criticism -- I had to build for both mod_python and
mod_wsgi and there was some bleed through.
- Craig -
On Wed, Dec 15, 2010 at 17:11, Graham Dumpleton
wrote:
>
>
> On Wednesday, December 15, 2010 11:10:06 PM UTC+11, Craig Trader wrote:
>
>> H
irtualEnv environment and then
starting the Django mod_python handler. It's basically an amalgam of the
VirtualEnv activate_this.py script, and the mod_python startup script from
the Django documentation.
- Craig -
On Wed, Dec 15, 2010 at 16:56, Álex González wrote:
> Hi guys!
>
> Thanks
ironment on the host,
and then install your packages using pip, before copying your application
files. (pip freeze and pip bundle can be your friends here.)
- Craig -
On Wed, Dec 15, 2010 at 11:48, Álex González wrote:
> Hi!
>
> I'm using virtualenv with --no-site-packages and now
te.urls ) ),
( r'^foo include( 'stackexchange.foo.urls' ) ),
( r'^bar include( 'stackexchange.bar.urls' ) ),
( r'^static/(?P.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT } ),
Background:
I have a fairly complex distributed Django application that, for
excellent reasons that I can not go into, requires that it have as low
an attack surface as possible AND that it run on both Windows and
Linux. One consequence of this is that instead of using any of the
normal tools for
de.google.com/p/owasp-esapi-python/
Questions, comments, and criticisms are all welcome. Thank you.
--
Craig Younkins
Website/Blog <http://cyounkins.blogspot.com/>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this grou
.objects.extra(where=['num %% 2
= 0']).query` to see what it's trying to execute on the database itself,
which may help you track down your problem.
Craig
On Mon, Nov 30, 2009 at 8:50 AM, Marcos Marín wrote:
> Hi, I'm trying to do a query where I select all rows where a fie
Probably a constraint problem on the tables being created. Logging into to
your MySQL server via command line and running either 'show myisam status'
or 'show innodb status' (depending on what type of tables you are making)
should provide you with more useful information.
C
Ah, you're absolutely right. I am not sure how I didn't even catch the
other thing that should have grabbed my attention this morning, which was
that the table I was using was MyISAM. This is why I shouldn't send emails
before noon :)
Sorry about that, that was my mistake.
Cra
ec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from bids;
+--+--+
| id | high_bid |
+--+--+
|1 | 23 |
+--+--+
1 row in set (0.00 sec)
Craig
>
>
>
>
n a content delivery network so that
media resources get served from a geographically close server, which
will (again) improve the user-perceived responsiveness of your
application.
Sounds like a few other people in the world have found approach (1) to
be worth the effort.
Craig
PS: WIth regards t
t represent the DB.
> same thing, different philosophies.
I'm not much into "my XXX is bigger/stronger/better than your XXX"
games, but it is worth noting that Java based ORM frameworks
(including JPA and Hibernate) definitely understand what a one-to-one
versus a many-to-one rela
as you can share.
Sounds like you might want a models.OneToOneField() instead of a
models.ForeignKey field.
http://www.djangoproject.com/documentation/models/one_to_one/
Craig
> >
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
hings like using a session cookie are no more or less secure for this
use case than they are for the usual approach to keep a user logged on
to a web app, other than the fact that you'd probably need to keep
your session alive a lot longer.
Craig
PS: The typical solution I've seen for a
on is
having to hand-code some views, forms, and templates that let me do
the right thing -- not a huge amount of work, but having admin do it
for us would be way cool.
Craig
> Greetings
> Sven
--~--~-~--~~~---~--~~
You received this message because you are sub
.html#isolevel_repeatable-read
If that is your issue there are two suggestions on how to solve the problem
here
http://groups.google.com/group/django-users/browse_thread/thread/e25cec400598c06d/55fa3724d2754013?#55fa3724d2754013
.
Craig
On Thu, Jun 25, 2009 at 1:48 PM, afrobeard wrote:
>
> Thanks fo
Yes, this was fixed post 1.0 release. If you upgrade to 1.0.2 it may fix
your problem.
Craig
On Mon, Dec 15, 2008 at 4:04 PM, jmat wrote:
>
> I'm using 1.0
>
> Is the patch post 1.0 ? I was having a tough time figuring out if
> that patch was post 1.0 or not on the ticket
Which version of Django are you using? Do you also have APPEND_SLASH set to
true? There was a ticket about this a while back that was fixed (
http://code.djangoproject.com/ticket/9199).
Hope that helps.
Craig
On Mon, Dec 15, 2008 at 11:23 AM, jmat wrote:
>
> Just curious, has anyon
Hello All,
I fixed my problem I needed to add a line like this to urls.py:
(r'^uploads/(?P.*)$', 'django.views.static.serve', {
'document_root': 'c:/src/webcomic/uploads' } )
Thanks,
Craig Spry
On Mon, Dec 8, 2008 at 10:49 PM, Craig Spry <[EMAIL PROT
Hello All,
Just to add to what I've said below, when I point the browser at the
image url like this:
http://localhost:8000/uploads/comics/john7_web.png
I get a 404.
Craig
On Mon, Dec 8, 2008 at 10:34 PM, Craig Spry <[EMAIL PROTECTED]> wrote:
> Hello All,
>
> I have
ge is the comic.name. Is there
anything else I need to setup for this to work?
Thanks,
Craig Spry
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
Nick Craig-Wood <[EMAIL PROTECTED]> wrote:
>
> I'm adapting a legacy database for use with Django and I've come
> across a problem I haven't been able to solve!
>
> The database has ForeignKey fields which are sometimes 0, meaning
> there is no r
null=True
"""
def __get__(self, instance, *args, **kwargs):
# never gets called
print "Instance %r " % instance
def to_python(self, value):
# never gets called
print "to_python %r" % value
I'm using svn of few da
args)
self._index_column = index_column
Craig
[1] http://www.mercurytide.co.uk/whitepapers/django-full-text-search/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to th
e.
If you want to take that route, there is an example of doing this at
the top of html2text.py[1].
Craig
[1] http://www.aaronsw.com/2002/html2text/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users
changed to make it work. But it is
working now
Thanks for the help
Craig
--~--~-~--~~~---~--~~
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
Thanks Robin, I checked my permissions and they were messed up.
Does any one have any idea what that error is from. I am at work
right now, but tonight I am going to dig in and see if I can find it,
but if anyone has any ideas they would be much appreciated.
Thanks
Craig
have to do to have the file
actually uploaded. In the settings file I added a media root and a
media url. What else do I have to do?
Thanks
Craig
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users&q
ready discusses connecting to a legacy database - but
not a ... what would one call it? A "legacy non-database."
--
Brandon Craig Rhodes http://www.rhodesmill.org/brandon
Georgia Tech[
Thanks, that did it.
Craig
On 4/13/07, RajeshD <[EMAIL PROTECTED]> wrote:
>
>
> >
> > search_fields = ['question', 'choice_choice']
> >
> > Where choice_choice is supposed to be pointing to the choice field in
> > the choice model,
something very easy and I was wondering if someone
could point it out to me.
Thanks,
Craig
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [EMAIL
I found this example to help me alot when trying to figure out the newforms.
http://code.pui.ch/2007/01/07/using-djangos-newforms/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
irectory, and if failed to import django at the python
prompt, so I changed the env-var to point to the parent of the django
directory, and I now have the same problem I had to start with. I can
import django at the python prompt, but running syncdb gives me the
Imp
ackages), do you have anything
> resembling Django (egg or directory)?
Only the symlink I made called "django" which points to the actual
django dir in my $HOME
I also symlinked /usr/bin/django-admin.py into the
.../site-packages/django/bin/django-admin.py file.
> Jeroen Ruigro
t when I go into our project directory and run "./manage.py
> syncdb", I get this error:
>
> ImportError: No module named django
Is this the best place to ask this kind of question, or would I be
better off trying irc or something else?
Thanks,
Craig
--~--~-~--~~
hon2.4", the former
being a symlink to the latter, so I don't think I have a different
version installed anywhere. There's probably a better way to check
this though.
I'm really not sure what to try next. I guess the last resort is to go
back to debian, but I quite like the ea
directory and run "./manage.py
syncdb", I get this error:
ImportError: No module named django
I'm running Python 2.4.3 in case that matters - any ideas?
Thanks,
Craig
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
83 matches
Mail list logo