I think I have found a workaround but it will probably blow up in my
face due to encoding/decoding things I don't fully understand.
Can anyone comment on the robustness of calling the following method in
a model's save() ...
"""
def subscript(self):
formula = u''
if self.formula:
The reason I'm POSTing after the direct upload to S3 I need to create
the model with extra data. As far as I can tell S3's
success_action_redirect doesn't allow you to pass additional
information.
Additionally, since this is an ImageField, I can't set the key
directly. At the moment, I've resorted
Does anyone know of a Django widget for representing molecula formulae?
For example, entering h2o would display with the 2 subscripted and the h
and o both uppercased.
Thanks
Mike
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to t
On Thu, Jan 5, 2012 at 11:39 PM, Anshuman Aggarwal
wrote:
> Russ,
> Just wanted to pick up an old thread about loading fixtures without
> PK ...isn't this now a natural extension of the natural_key support
> that was included in Django 1.2? Anybody else for whom this is a big
> enough itch?
It's
On Jan 6, 2012, at 12:13 AM, Chris Kavanagh wrote:
> I believe, thanks to your (previous) post, I was confused as to the
> difference between SQL and Database in general. I had thought learning
> SQL was learning database design. When in actuality, it's just the
> language used to access database
On Thursday, January 05, 2012 2:21:30 PM, Demetrio Girardi wrote:
I have two apps which are inter-dependent and import stuff from one
another; if I decide to go for the project.app route, is there a way
to import
things without a reference to the project name? otherwise the imports
would
have
On Jan 5, 2:54 pm, Lie Ryan wrote:
> On 01/06/2012 02:35 AM, Dennis Lee Bieber wrote:
>
> > Django's models are just a means to define those independent of engine
> > specific notation.
>
> while introducing django-specific notation, which generally maps more
> neatly to the theoretical foundati
You dont mention the database you use if mysql you could do
SELECT * FROM WHERE DATE_FORMAT(, "%u") =
DATE_FORMAT(curdate(), "%u")
dont know if there is a django orm way to do it, but could always use a
raw query.
Am 05.01.2012 21:14, schrieb Tim Sawyer:
Hi Folks,
Does anyone have a stra
On Jan 5, 10:35 am, Dennis Lee Bieber wrote:
> On Wed, 4 Jan 2012 17:50:41 -0800 (PST), Chris Kavanagh
>
> While my comment regarding MVC has been shot down by others, I'll
> still stand by the comment regarding relational database theory: the
> first three Codd Normal Forms and related
On Jan 5, 3:58 am, Lie Ryan wrote:
> On 01/05/2012 01:01 PM, Chris Kavanagh wrote:
>
>
> While learning SQL could be helpful for writing fine-tuned SQL queries,
> IMO it doesn't really help much to design an effective database. To
> design an effective database schema, you need to learn about da
On Thu, Jan 5, 2012 at 2:35 PM, Dennis Lee Bieber wrote:
> That would have to be a very erratic clock setting -- are there
> systems that don't use an NTP server to synchronize the clock? (I think
> all of my computers synchronize on a weekly basis).
virtual machines can have terribly erra
Thanks again everyone
The solution was a quick adjustment in memcached.conf.
Changing
-l 127.0.0.1
to
-l 0.0.0.0
Matt
On Dec 5 2011, 1:27 pm, mattym wrote:
> Thanks all -
>
> I stepped away from this issue for a few days. I am confident this
> thread will point me in the right direction.
>
>
Upon reading the django tutorial, I was under the impression that you should
have the project root folder in your pythonpath, so that each app is available
for import in modules, e.g. you can do
import myapp
However, my IDE seems to prefer putting its root in the pythonpath, so you'd
have to
You can generate a random number for the year, random number for the day,
and query with them.
Regards,
Sherif.
On Thu, Jan 5, 2012 at 10:14 PM, Tim Sawyer wrote:
> Hi Folks,
>
> Does anyone have a strategy for selecting from a database where the date
> is this week, but a random year in the pas
Hi Folks,
Does anyone have a strategy for selecting from a database where the date
is this week, but a random year in the past?
I have ~100 years of events in a database, each with a datefield - I
would like to do a "this week in history" box that lists one or two on
the homepage, randomly t
I have written a small patch that will add this feature (i.e., the
ability to register a model in the admin and stop it from showing up
in the index). If your problem was the same as mine, then this can
get the plus signs where you want them without changing your preferred
admin view. See https:/
On 01/06/2012 02:35 AM, Dennis Lee Bieber wrote:
Django's models are just a means to define those independent of engine
specific notation.
while introducing django-specific notation, which generally maps more
neatly to the theoretical foundation than SQL (while SQL maps more
neatly to the imp
Hello,
The error you're seeing is due to Django not being installed in your
virtual environment.
virtualenv is the way to go, unless you have an incredibly good reason not
to use it.
It couldn't possibly break anything as it installs virtual environments
alongside your system wide Python.
If yo
It sounds like you installed the Django/Satchmo/other packages globally.
If you switch out of the virtualenv by running
c:\path\to\virtualenv\bin\deactivate, those packages should be available
again.
I try to never install packages globally, with tools like pip or hg being
the only exceptions. I a
Good morning,
On my system (Windows 8 Developer Preview x64 with Python 2.7.2 x64) I
painstakingly installed all the dependencies for Django, Satchmo and a
few other large scale projects.
(about 10% couldn't be installed with pip, which is why I use the word
'painstakingly')
Recently though I ne
Is there a way one could take the dump of just a few sample fields using
mysqldump or some other similar tool. ?? Such that you can use it similar
to fixture data
--
A-M-I-T S|S
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this g
Dear Javier,
Am 03.01.2012 20:05, schrieb Javier Guerra Giraldez:
On Tue, Jan 3, 2012 at 2:02 PM, Javier Guerra Giraldez
wrote:
On Tue, Jan 3, 2012 at 11:54 AM, Carsten Fuchs wrote:
How can I find only those blogs where *all* entries were (co-)authored by
123?
Blog.objects.exclude(entry__
On Jan 5, 12:38 pm, Rainy wrote:
> On Jan 5, 12:35 pm, Guy Nesher wrote:
>
> > Thanks,
>
> > I've initially tried to use a dictionary but was still unable to pull
> > the data in the template.
>
> > I'm using your updated context processor:
> > def swiss_context_processors(request):
> > add
On Jan 5, 12:35 pm, Guy Nesher wrote:
> Thanks,
>
> I've initially tried to use a dictionary but was still unable to pull
> the data in the template.
>
> I'm using your updated context processor:
> def swiss_context_processors(request):
> added_context = { 'mytest': 'aaa', }
> return add
Thanks,
I've initially tried to use a dictionary but was still unable to pull
the data in the template.
I'm using your updated context processor:
def swiss_context_processors(request):
added_context = { 'mytest': 'aaa', }
return added_context
and trying to call {{added_context.mytest}} i
Two things:
1) make sure the context processor is installed in your settings file.
2) context processors should return dicts. Try:
def swiss_context_processors(request):
added_context = { 'mytest': 'aaa', }
return added_context
On Jan 5, 12:03 pm, Guy Nesher wrote:
> Hi,
>
> I've crea
On Thu, Jan 05, 2012 at 09:03:56AM -0800, Guy Nesher wrote:
I've created a simple context processor which simply returns a
variable, however I'm unable to retrieve it from my template.
"Each context processor must return a dictionary."
https://docs.djangoproject.com/en/1.3/ref/templates/api/#w
Hi,
I've created a simple context processor which simply returns a
variable, however I'm unable to retrieve it from my template.
The context processor is quite simple :
def swiss_context_processors(request):
mytest = "aaa"
return mytest
and I am calling the context processor in my view
thnx mate its working now ;)
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more o
Russ,
Just wanted to pick up an old thread about loading fixtures without
PK ...isn't this now a natural extension of the natural_key support
that was included in Django 1.2? Anybody else for whom this is a big
enough itch?
Regards,
Anshuman
--
You received this message because you are subscrib
Your problem is the curly quotes around “Times New Roman”. First, they
will prevent CSS from seeing the font as Times New Roman, and second,
they are encoded with the byte 0x93, which is how they show up in the
various Windows code pages (cp1252, for instance). Convert your file to
UTF-8, if you
Could an incorrect computer clock contribute to this kind of issue?
On Thu, Jan 5, 2012 at 10:35 AM, Dennis Lee Bieber
wrote:
> On Thu, 5 Jan 2012 08:56:57 +0530, Arun P wrote:
>
>>That’s a lot of education Dennis. Thanks.
>
> Pardon, but just who were you replying to? Consider whose
> at
Yes (and sorry for getting your name wrong before, Brett).
str(self.document) works.
On Jan 4, 6:26 pm, Brett Epps wrote:
> Oh, I think the problem is in the __unicode__() method of your Quiz8
> model. You're returning self.document, which is a Document8 object and
> not a unicode string. Try r
I would hazard a guess that your index.html file is actually not ascii
or utf-8 but some other encoding - probably cp1252
0x93 in cp1252 is a "smart quote" ( see
http://en.wikipedia.org/wiki/Windows-1252 ) so that would look like it
fits with the line quoted below.
Open it in an editor that knows
The only case in which you can have issues with double brackets is
when a '{{' appears in the same line and before than a '}}'.
On Jan 4, 10:18 pm, Bill Freeman wrote:
> Good point. But you can run into double braces in JS.
>
>
>
>
>
>
>
> On Tue, Jan 3, 2012 at 3:29 PM, Christophe Pettus wrote
http://www.adobe.com/go/getflash";>
http://www.adobe.com/images/shared/
download_buttons/get_flash_player.gif" alt="Get Adobe Flash player"/>
About Us
Lorem ipsum dolor sit amet, consectet
i will post my index page now
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more
Also, don't forget about the magic functions provided by django:
smart_unicode and smart_str
On Jan 5, 2:27 pm, Karen Tracey wrote:
> On Thu, Jan 5, 2012 at 8:16 AM, César Frias wrote:
> > I guess you have some files without the # -*- coding: utf-8 -*- on the top
> > of the file
>
> > You will n
That worked, tho i was already making all based on cx_oracle. Thanks ;:)
--
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/-/h-KISDJysLkJ.
To post to this group
On Thu, Jan 5, 2012 at 8:16 AM, César Frias wrote:
> I guess you have some files without the # -*- coding: utf-8 -*- on the top
> of the file
>
> You will need this if you want to use some letters like é or ç...
>
>
No, you get a different exception if you are missing the encoding
declaration in
I guess you have some files without the # -*- coding: utf-8 -*- on the top
of the file
You will need this if you want to use some letters like é or ç...
Att,
César Frias
Linux user: #506849
Twitter: twitter.com/cesarFrias
2012/1/5 Piotr Zalewa
> Please attach the index.html - there might b
On Thursday, 5 January 2012 11:18:52 UTC, Hassan wrote:
>
> Dear ALL,
>
> i am trying to do render_to_response('index.html') , and i keep geting
> this dont know why ? its a normal html page ??!! what to do ?
>
You need to post some code.
However 99 times out of 100, when you see this error
Please attach the index.html - there might be an unknown unicode character
zalun
On 01/05/12 12:18, Hassan wrote:
Dear ALL,
i am trying to do render_to_response('index.html') , and i keep geting
this dont know why ? its a normal html page ??!! what to do ?
UnicodeDecodeError at /
'utf8' code
Hi Tom,
thanks for the link, in case of 'datetime.date.today' the callable makes a lot
of sense.
I changed my class field so that the value is not more a class definition, now
it is wrapped by some kind of a proxy instance to avoid the callable effect.
--
Best Regards
Sven
On Thursday
I think Fabric is the easiest solution, the tutorial is pretty good
[http:/fabfile.org], Katie wrote about how she uses Fabric
[http://therealkatie.net/blog/2011/nov/28/katie-finally-talks-about-her-fabfiles/],
and I tried to extend the idea a little to setup a server from scratch just
with a
I wrote a Fabric script to automate Django deployment, in my tests with
Ubuntu servers (actually, virtual machines running under KVM) the script
took 14 minutes from a clean Ubuntu install to a running Django environment.
You can get the code in GitHub:
https://github.com/alexisbellido/The-Djan
I don't think you need different braches in your code repository for your
development and production (and don't forget staging) environments. The
main differences are in the settings.py values and the database used. You
can even use the same settings.py for different environments with clever
us
Dear ALL,
i am trying to do render_to_response('index.html') , and i keep geting
this dont know why ? its a normal html page ??!! what to do ?
UnicodeDecodeError at /
'utf8' codec can't decode byte 0x93 in position 3197: invalid start
byte
Request Method: GET
Request URL:http://127.0.0.1:800
This might help:
http://drumcoder.co.uk/blog/2010/apr/23/output-parameters-cx_oracle-and-plsql/
Tim.
> Hello.
> Im trying to get Oracle SPs working in django.
>
> Procedure recives in_param and out_param
>
> in get_data function i do
>
> [code]
> def get_data(self, in_param):
> cursor = conn
On Wed, Jan 4, 2012 at 5:25 PM, sassman wrote:
> Hi,
>
> i'm using Django Version 1.3.1, can anyone say me why is the value
> function in BoundField (FormField) makes a check if the value is
> callable?
>
> def value(self):
> """
> Returns the value for this BoundField, using the
Hi,
I wanted to mention that if you are OK with using EC2 you can also use
the public BitNami DjangoStack AMI (I'm part from the BitNami team).
It includes preconfigured version of Apache with mod_wsgi, django
1.3.1 and Python 2.6.5. It also includes PostgreSQL and MySQL.
Alternatively you can als
On 01/05/2012 01:01 PM, Chris Kavanagh wrote:
On Jan 4, 8:20 am, Andre Terra wrote:
I'm sorry, folks, but I'll have to *vehemently **disagree *with a lot of
what has been said in this thread. To the OP, I'm sorry I didn't reply any
sooner.
No, you *don't need *to go reading about what MVC me
i did this in the WSGI file :
import os
import sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()
and i added the path for my website and when i did syncdb it created
my tables but i cant access the
53 matches
Mail list logo