http://stackoverflow.com/questions/26560973/python3-mysql-error-loading-mysqldb-module-no-module-named-mysqldb
Can this help you?
2015-09-16 20:04 GMT+08:00 Sandeep kaur :
> Greetings,
> I am using Python3.4 for the Django app on CentOs. The application is
> working perfectly fine with runserver
s://bitbucket.org/uysrc/django-dynamicsites/src/e3c6cad807f0328ed3020d28158b3d6ba0b67025/dynamicsites/middleware.py?at=default
>
>
> https://bitbucket.org/uysrc/django-dynamicsites/src/e3c6cad807f0328ed3020d28158b3d6ba0b67025/dynamicsites/utils.py?at=default
>
>
> I took that idea there.
>
>
> C
ot of domains, it's easier to do it this
> way.
>
> I could share the code, if you were interested. It isn't published
> anywhere yet.
>
>
> Cheers,
> Tom
>
> Dne Thu, 1 Aug 2013 06:41:20 -0700 (PDT)
> "J. Cliff Dyer" > napsal(a)
Is there a way to set the SESSION_COOKIE_DOMAIN for multiple domains,
possibly using the contrib.sites framework?
We deploy on AWS, and when we roll out an update to one of our site, we
first create a new cloudformation stack, and attach a domain name to it
like prod-oursite-20130801.devstacks.
It looks like what you want to do is create a templatetag. Then you can
just include a snippet like: {% gig_schedule %} in your template. The
documentation can point you in the right direction.
On Thu, 2012-06-28 at 15:20 -0700, grimmus wrote:
> Hi,
>
>
> I am doing a site for a DJ that lists
> settings.DATABASES
[?]
>>> _
Cheers,
Cliff
On Wed, 2012-04-04 at 10:11 -0700, maxim wrote:
> When I try to run the command:
> python manage.py syncdb
>
>
> I get the following error:
> Traceback (most recent call last):
> File "manage.py", line 10, in
Well the first suspicious thing was that you were testing to see if it
was equal to the string "0". That tells me you don't understand how
equality works in python. Python is strongly typed. Strings and
integers are not the same thing, and will never be equal to one another.
Without more informa
On Wed, 2012-02-08 at 09:53 -0500, Dennis Lee Bieber wrote:
> On Tue, 7 Feb 2012 21:23:58 -0800 (PST), akaariai
> wrote:
>
> >I think you could do
> >Customer.objects.annotate(tot_invoice=Sum(invoice_set__total_invoice)).order_by('tot_invoice')
> >[0:10].
>
> NOTE: the OP needs a /descendi
it's a good habit to get into. You never know when you're going to
want to know where the user was referred from, or what browser they're
using, for instance.
Cheers,
Cliff
On Tue, 2012-01-24 at 05:32 -0800, coded kid wrote:
> Hi guys, I’m trying to let this form display but
You need to use {% url videos video.id %} or {% url videos pk=video.id
%}
On Wed, 2012-01-18 at 07:46 -0800, Mark Stahler wrote:
> Can someone explain how to link using url names to class-based views
> that include parameters?
>
> Example:
>
> url(r'^video/(?P\d+)/$', VideoView.as_view()),
>
Your URLconf is broken.
The (?P) regex fragment gives you a keyword argument of jobkey,
but it only matches a zero length string. You need to include a regex
to specify what you want jobkey to match.
(?P[0-9a-fA-F]*)
Cheers,
Cliff
On Thu, 2012-01-12 at 09:50 -0800, John DeRosa wrote:
>
On Tue, 2012-01-10 at 23:49 -0800, coded kid wrote:
> Hi guys, whenever I signup for my django form, my database is only
> saving the id no and not names, username, email etc. | #sorry for
> posting it like this. I'm on mobile. Okay. In my views.py, this ( | )
> means next line.@csrf_exe
can.
Otherwise, remove all non-ascii characters from it. If you do this, but
you need non-ascii characters to show up in your web pages, you'll need
to use HTML escape sequences, like “
Cheers,
Cliff
On Thu, 2012-01-05 at 06:20 -0800, Hassan
s the page I'd have to pick up from. So to that effect you could make
negative pagination work something like negative indexing in python.
Cheers,
Cliff
On Wed, 2012-01-04 at 15:03 -0500, Dennis Lee Bieber wrote:
> On Wed, 4 Jan 2012 17:23:12 +, Tom Evans
> wrote:
>
> >O
哈哈,等正式发布的时候大家一起把它翻译下作为社区福利。
2011/12/23 Mário Neto
> Great, very very good! \,,/_ Congratulations!!!
>
>
> 2011/12/23 James Bennett
>
>> Tonight as part of the 1.4 development process, we've released the
>> first alpha for Django 1.4. You can read all about it on the blog:
>>
>> https://www.djan
The answer you're looking for is the "templatetag" template tag.
Essentially, it lets you specify escaped characters by name.
https://docs.djangoproject.com/en/dev/ref/templates/builtins/#templatetag
For example:
>>> from django.template import Template, Context
>>> t = Template('{% templatet
and can submit answers.
You will want to look into the documentation on ModelForms for help in
setting up the teacher quiz-creation view.
Cheers,
Cliff
On 11/03/2011 11:21 AM, Mauricio Mercado wrote:
I would like to be able to make a user create forms to a section of a
site from the
relationships are
designed to handle. If you want to use another method, you have to
figure out the details for yourself.
Cheers,
Cliff
--
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
On 10/25/2011 11:34 AM, eaman wrote:
I'm developing a web site in django to manage guides / howtos
that I've been writing in reStructuredText.
I'd like to display each section of them in a single page,
how can I parse the reStructuredText to get titles / context of single
sections?
What have you
On 10/19/2011 12:56 PM, h3 wrote:
Doesn't work..
Error: Usage is runserver [optional port number, or ipaddr:port]
And if I do the opposite:
$: python manage.py runserver --settings=settings_dev --
Same problem comes back.
On Oct 19, 12:52 pm, James Pyrich wrote:
It might be attempting to
On 10/19/2011 10:49 AM, Guy Nesher wrote:
I have an odd problem tracking errors in a for loop
I assign a loop counter to each error and print them at the end of the
loop, but all the errors are numbered to the last iteration.
The code goes something like this :
error = [0,[]]
counter = 0
Try putting manouche at the bottom of your installed apps list. It looks like
it depends on the site app being installed, but when django loads the
manouche.models file, it hasn't loaded sites yet.
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Leonardo Giordani wrote:
Sorry. The link for that project is
https://github.com/ecometrica/django-dbarray
Cheers,
Cliff
On Mon, 2011-09-19 at 11:15 -0400, J. Cliff Dyer wrote:
> You might want to look into django-dbarray on github. It seems to add
> support for postgresql array fields.
>
> I haven'
Do you work with Kabir Kukreti? He just asked the same question. Look
for my answer on that thread.
Cheers,
Cliff
On Mon, 2011-09-19 at 05:01 -0700, Arihant wrote:
> How can i store Postgress array types in Django models
>
--
You received this message because you are subscribed
Field(max_length=64)
times = dbarray.FloatArrayField()
Hope that helps.
Cheers,
Cliff
On Mon, 2011-09-19 at 04:58 -0700, Kabir Kukreti wrote:
> Hi
> I have a legacy system, which uses Postgres array datatypes.We are
> now migrating to Django, can any one suggest a method to
s actually the thing
slowing your app down.
Cheers,
Cliff
On Thu, 2011-09-15 at 15:24 +0200, Thomas Weholt wrote:
> Ok, this might sound a bit off-topic but bear with me.
>
> I got a templatetag in an app that generates thumbnails (
> django-photofile ). In my templates it might look l
cters to strip off.
>>> username = ' abcd .,.'
>>> username = username.strip('.,')
>>> username
' abcd '
You should really check out the python tutorial at
http://docs.python.org/tutorial/
Cheers,
Cliff
--
You received this message beca
Is one server 32 bit, while the other is 64 bit? It may be that on the old
server, your representations of the number were precise enough to be identical,
but on the new server, there is enough precision in the database to represent
different numbers.
"Reinout van Rees" wrote:
>On 08/25/20
was confused, because you posted to a django mailing
list. You might want to try another list that deals with wxPython
directly.
Cheers,
Cliff
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-
@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
If I understand your issue correctly, in ran into something similar a while
back. The problem is not in subprocess, but in how stdout works. The output is
buffered by default, so
gotcha
I'm missing?
Traceback (from fabric) http://dpaste.com/200153/
routers.py http://dpaste.com/200154/
Many thanks,
Cliff
--
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...@googleg
I believe you're confused. Your reply is to Tomasz, not to me. Also,
my solution requires no model changes. Go back and look at it again.
Cheers,
Cliff
On Mon, 2010-05-24 at 06:58 -0700, omat wrote:
> @cliff: you are right, but i am writing an extension to an existing
> app. i
)])
Note that the problem is not with the 'in' operation.
Cheers,
Cliff
On Mon, 2010-05-24 at 05:15 -0700, omat wrote:
> ops, a small correction. i meant:
>
> User.objects.filter(id__in=[q.user.id for q in
> Quiz.objects.filter(score__gt=90)])
>
> --
> oMat
&
On Wed, 2010-05-05 at 08:08 +0800, Russell Keith-Magee wrote:
> On Wed, May 5, 2010 at 1:43 AM, J. Cliff Dyer wrote:
> > I'm having trouble working with multi-db using mysql replication. When
> > I run our test suite, I'm getting several hundred errors if I have m
f.db_list):
return True
return None
def allow_syncdb(self, db, models):
"""All writes go to the primary db."""
return db == self.primary_db
The first error that comes out of the test suite is a duplicate username
in auth during a testcase's setUp,
, they can right click the link,
just like they do other places on the web.
Cheers,
Cliff
On Tue, 2009-09-22 at 01:19 -0700, luca72 wrote:
> i Have solved using this:
> luca = HttpResponse(open('/home/luca72/webapps/django/myproject/
> disegni/'+nome, 'rb').read()
ature on your save method, but
that should get you pointed in the right direction.
Cheers,
Cliff
On Tue, 2009-09-15 at 14:33 -0700, Sonal Breed wrote:
> Hi all,
>
> I have a model wherein I want to put a validation as
> You must enter Field1 or Field2, but not both.
>
> This
ebframework/'
+ 'off_bert/disegni/'+nome_file+'.pdf','application/x-download',
'attachment')
return cherrypy_to_HttpResponse(served_file)
Or figure out a way to do it directly in django.
I'm not sure exactly what you're trying
like:
for obj in serializers.deserialize('json', gantt_data)['ganttgroups']:
start = obj['start']
for gantt in obj['gantts']:
for row in gantt['rows']:
print row['own']
In short, you're getting your dicts and lists mi
atic images?
* What does the URLConf and view look like for the page that's
getting rendered?
Cheers,
Cliff
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
g database for unittests?
Cheers,
Cliff
--~--~-~--~~~---~--~~
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
e(self):
> print 'hello'
>
>
> How can I load database during tests from defined fixture? I tried
> putting simplefix.json in myapp/ in main project folder, in fixtures
> directory in main project folder and none of that worked
>
You need to put in in $yo
times.
>
> So, still not sure what I should do, but thanks for the tips.
>
I would vote for taking the python course, and learning Django online.
Mostly because the django docs are fantastic.
Cheers,
Cliff
--~--~-~--~~~---~--~~
You received this message because
Yes. That is a fair assumption.
On Fri, 2009-08-14 at 10:09 -0400, Joshua Williams wrote:
> Quick question in regards to building portable apps: Should an
> application rely on the app being on the PYTHONPATH to work properly?
> That is, is having a app directory on the PYTHONPATH so commo
do need to import each module.
If you are worried about having too many imports in your urls.py
configuration file, see if you can break it up somewhat by giving each
app its own urlconf with only the urls relevant to that particular app.
Cheers,
Cliff
--~--~-~--~~~---~-
y. Se the documentation here:
http://docs.djangoproject.com/en/dev/howto/custom-template-tags/
Cheers,
Cliff
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
Does django provide any conveniences for this?
Failing that, I can probably manually instantiate a Request object, just
call the view function, and test the condition of the response object,
but I wanted to get some feedback on what others are d
On Wed, 2009-06-17 at 12:55 -0500, Dan Sheffner wrote:
> I have this in my model:
>
> class Machine(models.Model):
> name = models.CharField(max_length=100)
> cpuInfo = models.ForeignKey(Cpu, blank=True, null=True)
>
> class Cpu(models.Model):
> l = models.CharField(max_length=50)
>
gt; clause I always get this error:
>
> cannot resolve keyword 'title_icontains' into field. Choices are:
> authors, id, publication_date, publisher, title
>
> Can anyone enlighten me. I'm new to programming, so I'm sure it's just
> a stupid mistake, but I can&
On Tue, 2009-04-07 at 10:24 -0500, James Bennett wrote:
> On Tue, Apr 7, 2009 at 9:33 AM, garyrob wrote:
> > I'm doing the .96 tutorial because my company is using version 96.1
> > for now.
>
> Well, first things first, you should upgrade both yourself and your
> company to 0.96.3, because there
:
> Longitude:
>
>
> Thanks,
>
> Al
{{ Point.y }}
{{ Point.x }}
should do the trick.
Cheers,
Cliff
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to t
On Fri, 2008-11-14 at 11:41 -0500, Karen Tracey wrote:
> On Fri, Nov 14, 2008 at 11:28 AM, J. Cliff Dyer <[EMAIL PROTECTED]>
> wrote:
>
> Using Django 1.0, devel server, on RHEL5, with python 2.4.
>
> I have two apps, venues and con
On Fri, 2008-11-14 at 11:41 -0500, Karen Tracey wrote:
> On Fri, Nov 14, 2008 at 11:28 AM, J. Cliff Dyer <[EMAIL PROTECTED]>
> wrote:
>
> Using Django 1.0, devel server, on RHEL5, with python 2.4.
>
> I have two apps, venues and con
g
down the
Any thoughts?
--
Oook,
J. Cliff Dyer
Carolina Digital Library and Archives
UNC Chapel Hill
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
s there is method like presave() that can be used to solve this
problem? It has stuck me for a while now.
Thank you,
Cliff
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post t
On Wed, 2008-07-02 at 11:52 -0700, Bobby Roberts wrote:
> > On Jul 2, 2:50 pm, "Juanjo Conti" <[EMAIL PROTECTED]> wrote:
> > You mean in the views?
> >
> > del request.session['somedata']
>
> Well If i have 15 session variables I don't want to have to do it for
> each variable.
>
for key in req
s are added and some get inserted
in the middle of the list rather than at the end. Setting `ordering =
['field-name']` on the model for the table pointed to by the foreign key
doesn't seem to affect its presentation in the referring table's admin
page.
Many thanks.
--
Oook,
J. Cl
Maybe you're looking for
MyModel.__name__
>>> from apps.myapp import models as m
>>> m.Display.__name__
'Display'
>>>
Cheers,
Cliff
On Mon, 2008-06-23 at 12:57 -0700, mwebs wrote:
> Hi,
>
> thanks for your answer but I already tried thi
Hi,
I really like the inline editing option, but found that sometimes I
don't want to list all the attributes of an object for inline editing.
I guess there is a way to do this, but I cannot find it. Really
appreciate if someone can help me out.
Thanks
://code.djangoproject.com/ticket/3288
and said to be fixed in this changeset
http://code.djangoproject.com/changeset/7477#file19
Please if someone can throw some insight? Really appreciate your help.
Cliff
On Jun 7, 6:28 pm, Cliff <[EMAIL PROTECTED]> wrote:
> Hi,
> This is the simplified versio
object, grand child object and so on until it reaches the upper limit
of recursion. What I really want to do is just one level of recursion,
so I get a structure of the following if know what I mean:
test(parent)
--test1(child)
--test2(child)
--test3(child)
Is there a way to achiev
Hi Cory,
Thanks for your reply. Can you please be more precise? I am still on
the level of trying to understand how the Django classes are
organized. Which file is that tag in?
Thanks
Cliff
On Jun 6, 3:03 pm, cory <[EMAIL PROTECTED]> wrote:
> By default, required fields are shown in b
Thank you.
On Jun 6, 1:19 am, Jeff Anderson <[EMAIL PROTECTED]> wrote:
> Cliff wrote:
> > Hi Jeff,
> > Thanks a lot for you reply. I guess now I need to look into how to set
> > my own forms and views.
> > Do you know some good tutorials online? I guess this
Hi Jeff,
Thanks a lot for you reply. I guess now I need to look into how to set
my own forms and views.
Do you know some good tutorials online? I guess this official one
should be what I look at first: http://www.djangobook.com/en/1.0/chapter17/.
Best regards,
Cliff
On Jun 6, 12:41 am, Jeff
ns. I'm
guessing it's probably an existing feature in Django, but only because I'm a
new starter I haven't found a way of doing it?
Many thanks,
Cliff
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Hi jonknee
Thanks a lot for your reply. I'll give it a try now.
By the way, I'm happy with incrementing IDs, however, it will cause
conflicts when I need to import data from another database.
Thanks
Cliff
On Jun 4, 10:50 pm, jonknee <[EMAIL PROTECTED]> wrote:
> On Jun 4, 5:
elf):
return self.name
class Admin:
fields = (
(None, {'fields':('name',)}),)
Let's say the random string generation function is getRandom().
Many thanks
Cliff
--~--~-~--~~~---~--~~
You received this message b
I've got an LDAPBackend.py implementing a class for LDAP
authentiction. But I can't seem to get it to be used in my Django
project.
I am putting the LDAPBackend.py in the root directory of my project,
right next to the settings.py file.
In settings.py, I set
AUTHENTICATION_BACKENDS = (
eg <[EMAIL PROTECTED]> wrote:
> Cliff,
> I just looked at my table and the type is varchar(100). Not sure why
> the type is a varchar when the field is a DateTime. I tried changing
> the table but wasn't able to change the type to date. I'll brush up
> on my SQL and hopefu
le_name);`. If you're unsure what your table is
named, you can find it from the shell with `.tables` (no semicolon).
Make sure the database is using the correct column type for your date
field. For sqlite this should be "datetime" or just "date".
Cheers,
Cliff
hat you no longer have a query set, so
whether this will work for you depends on your use case.
Cheers,
Cliff
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send em
On Mon, 2008-04-28 at 13:01 -0700, Chris wrote:
> Anyone see what I am doing wrong here?
>
Yes. You're not asking good questions. You neither tell us what
happens when you run your code, nor what you expect to have happen.
Please revise and repost.
> http://dpaste.com/47296/
>
> Thanks in
Did you recompile your .po files on the server?
On Mon, 2008-04-14 at 17:31 +0200, Boris Ozegovic wrote:
> I recently translated Django on croatian language, it works like a
> charm, but only on my computer? :) Today when I deployed application
> to server, hr localization didn't worked. In se
r, just to be sure, I cleaned up the models, deleted the pyc
again, and re-dpasted my models and a fresh interactive session.
http://dpaste.com/41467/ -- models.py
http://dpaste.com/41468/ -- complete interactive session (via django's
manage.py shell)
Python 2.3.4 (#1, Nov 20 2007, 15
On Wed, 2008-03-26 at 15:08 -0400, Karen Tracey wrote:
> On Wed, Mar 26, 2008 at 2:43 PM, J. Cliff Dyer <[EMAIL PROTECTED]>
> wrote:
>
> On Wed, 2008-03-26 at 14:08 -0400, J. Cliff Dyer wrote:
> > I've got a funky error when
On Wed, 2008-03-26 at 14:08 -0400, J. Cliff Dyer wrote:
> I've got a funky error when traversing a m2m relationship.
>
> TypeError: Cannot resolve keyword 'display' into field
>
> Code snippet and full traceback here: http://dpaste.com/41417/
>
> Anyone
I've got a funky error when traversing a m2m relationship.
TypeError: Cannot resolve keyword 'display' into field
Code snippet and full traceback here: http://dpaste.com/41417/
Anyone have any ideas where this is coming from?
--~--~-~--~~~---~--~~
You received
Except, I think with the svn version it's:
def __unicode__(self)
return self.id
I'm working with 0.96, but I've come across something about that in the
docs. Does it need to be "return u'%s' % self.id" to convert if self.id
is an int?
Cheers,
Cliff
Stephen Mizell wrote:
>> Try this:
>>
>> x = [ {'id': 1, 'title': 'test1'}, {'id': 2, 'test2'} ]
>> if x:
>> d = x[0]
>> q = Q(id=d['id']) & Q(title=d['title'])
>> for d in x[1:]:
>> q = q | (Q(id=d['id']) & Q(title=d['title']))
>> query = MyModel.obj
Guillermo wrote:
> It doesn't work. :-(
>
> Two things, though I suppose it was a typo:
>
> Instead of:
>
> python/libs/site_packges/django/contrib/admin/templates
>
> ... i only found:
>
> python/libs/site_packges/django/contrib/admin/templatetags
>
> Is that correct? There are no html files in t
Have you re-synced your database?
Nader wrote:
> I have define the following model:
>
> class Ingestqueue(models.Model):
> ingestQueueId = models.IntegerField(primary_key=True)
> datasetID = models.IntegerField()
> filename = models.CharField(maxlength=100)
> timeOfRemoteMOD = mode
is way, more advance
> formating is available but a lot of users just want to see their data
> come out in something other than a text file.']]
>
The example returns doc--you are returning doc.Sections. Most likely
that is a list, or a list-like object. I've never used pyr
;s faster
> to just count on the id column.
I would expect any non-broken database server to optimize this to count
using the primary key, so I doubt that change will make any difference.
Regards,
Cliff
--~--~-~--~~~---~--~~
You received this message becau
83 matches
Mail list logo