thanks! dumb mistake
On May 23, 7:42 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Fri, May 23, 2008 at 10:36 PM, skunkwerk <[EMAIL PROTECTED]> wrote:
>
> > I'm quite puzzled by this... I have a line of code that is supposed to
> > strip a variable of any non-alphanumeric characters (such a
Hello!
I have an app that uses the User object as a ForeignKey, and as a
ManytoMany field. I am integrating this app into a project that doesn't
use django authentication, and doesn't have a User object that is a model.
My first idea was to just store the User's uid in the database as a
stri
Of course... That was a dumb question.
On May 24, 2008, at 5:16 AM, [EMAIL PROTECTED] wrote:
>
> We have groups and permissions because the User model is meant for all
> users, not just trusted users.
>
> On May 23, 3:49 pm, "Patrick J. Anderson" <[EMAIL PROTECTED]>
> wrote:
>> On Thu, 22 May 20
Peter & Baxter,
I did not realize how easy this was. I work primarily in ColdFusion
and you cannot pass a ColdFusion variable into Javascript directly. I
never even tried to just put a template variable in for the latitude
and longitude. Wow, this is awesome!
Thanks for you help guys!
--~--~-
On Fri, May 23, 2008 at 10:36 PM, skunkwerk <[EMAIL PROTECTED]> wrote:
>
> I'm quite puzzled by this... I have a line of code that is supposed to
> strip a variable of any non-alphanumeric characters (such as
> whitespace):
>
> in my python shell, this works fine:
> >>>key4cache = '!yahoo'
> >>>re
I'm quite puzzled by this... I have a line of code that is supposed to
strip a variable of any non-alphanumeric characters (such as
whitespace):
in my python shell, this works fine:
>>>key4cache = '!yahoo'
>>>re.sub(r"[^A-Za-z0-9]", "",key4cache)
'yahoo'
in django, however:
logger.debug('key4cac
Gene Campbell wrote:
Is there a web template source, like http://www.templatemonster.com/,
that provides templates ready to use with Django. I'm imagining a
site that has different templates from which to choose and download,
but is implemented with the django template language. For example, i
There is also this thread:
http://groups.google.com/group/django-users/browse_thread/thread/a26d805427aa643f/249463a6f63958f7
[]s
Diego Ucha
On 23 maio, 21:56, "Juanjo Conti" <[EMAIL PROTECTED]> wrote:
> I do it with jquery (client side) getJSON funcion (tamplate exmaple):
>
>
>
> jQue
I do it with jquery (client side) getJSON funcion (tamplate exmaple):
jQuery(document).ready(function($){
var prefix = "{{ prefix }}"
var opcionnula = {{ opcionnula }} //incluir la opción
nula en la lista de localidades y provincias
var provincia =
Is there a web template source, like http://www.templatemonster.com/,
that provides templates ready to use with Django. I'm imagining a
site that has different templates from which to choose and download,
but is implemented with the django template language. For example, it
could be a drop in r
http://www.youtube.com/watch?v=n7e0r2OE6ig
http://www.youtube.com/user/SFAproductions
http://www.youtube.com/profile_favorites?user=filistin4life
http://rahmana4.piczo.com/?cr=7&rfm=y#
http://www.youtube.com/user/muhajidin
http://www.ahmed-deedat.net/
http://www.youtube.com/watch?v=5Pudt9L9mi
I finally found that the problem was coming from another middleware of
mine:
class AuthRequiredMiddleware(object):
def process_view(self, request, view_func, view_args,
view_kwargs):
if request.path.startswith(settings.MEDIA_URL) or request.path
in settings.PUBLIC_PATHS:
r
Someone recommended http://mochikit.com/ recommended as a good ajax
toolkit. I don't think you'll find design patterns there - like how
to design software.
I'm a noob, and only trying to help.
On Fri, May 23, 2008 at 5:14 AM, unixdude_from_mars
<[EMAIL PROTECTED]> wrote:
>
> Being new to web d
Please ignore the "if DEBUG == True: blabla" statement, that was for
testing. Just consider the list of middlewares above that.
Don't understand why it doesn't work...
On May 24, 8:41 am, Julien <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm using the middleware from a snippet [1] so I could debug
> ex
Hi,
I'm using the middleware from a snippet [1] so I could debug
exceptions raised by ajax calls. That snippets simply displays the
traceback in the console when an exception occurs:
class ConsoleExceptionMiddleware:
def process_exception(self, request, exception):
import traceback
James Tauber wrote:
On May 22, 2008, at 11:56 PM, Jeff Anderson wrote:
django isn't designed to be a mass-emailing system. It can do it,
but it is very slow compared to using mailing list software. Mailman
is written in python, and you can have django send off the one e-
mail to the mailm
sebey wrote:
mailman seens to be aimed at something like google groups and I doing
a newletter so I just mailing list and stats thanks for you suggestion
Mailman is mailing list software. Newsletters are simply a type of
mailing list. The following describes how to set up the type of list you
We have groups and permissions because the User model is meant for all
users, not just trusted users.
On May 23, 3:49 pm, "Patrick J. Anderson" <[EMAIL PROTECTED]>
wrote:
> On Thu, 22 May 2008 09:32:40 -0700, jonknee wrote:
> > On May 21, 9:33 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
>
> >>
I want to create a new multiple choice field that has choices based on
data in the database, but has a query that is too complicated to put
into a simple queryset. I don't see how to do this. The code below
is what I have attempted to do. It first selects the students that
have the active field
Karen Tracey wrote:
> So what's changed, I'm guessing, to introduce this problem is you added this
> import to to your project's __init__.py file.
Karen,
Thanks - while I was trying to get my head wrapped around
newforms-admin, I put some stuff in __init__.py and then forgot to take
it out. I
On Thu, 22 May 2008 09:32:40 -0700, jonknee wrote:
> On May 21, 9:33 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
>
>> Well, newforms-admin is being written to make the HttpRequest object
>> available as an argument to the various ModelAdmin methods, which means
>> that when you set up your ow
http://www.meb.gov.tr/baglantilar/okullar/yonlendir.asp?KOD=711531
--~--~-~--~~~---~--~~
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 unsubscrib
On Fri, May 23, 2008 at 4:08 PM, David Robinson <[EMAIL PROTECTED]> wrote:
>
> Karen Tracey wrote:
> > manage.py doesn't set the environment variable, it just imports settings
> > assuming it is in the current directory. Since you don't get an error
> > message that that failed, presumably it wor
I am using Postgresql :)
On Fri, May 23, 2008 at 5:21 PM, Diego Ucha <[EMAIL PROTECTED]> wrote:
>
> It is not your question, but it may come in handy, in the future, for
> you.
> The same way you can generate automatically a Class Diagram, you can
> also generate an ER Diagram using MySQL Workben
On May 23, 4:35 am, Scott SA <[EMAIL PROTECTED]> wrote:
> It seems, the problem _can_ be in how PIL is installed into the site-packages
> directory.
> The alternative is that your environment (i.e. sys.path) does not contain the
> correct path
> to the correct python site-packages directory. I h
Hello all.
When I say keeping it clean, I mean being as lazy as possible.
I have a bunch of models, and for each I want a search form.
So, to keep it simple I'm using a ModelForm for each (see form code
below). Wonderful, instant form, thankyou Django.
Now, in my view, instead of accessing the
It is not your question, but it may come in handy, in the future, for
you.
The same way you can generate automatically a Class Diagram, you can
also generate an ER Diagram using MySQL Workbench.
First get your CREATE TABLE statements with: python manage.py sqlall.
Then, make your MySQL Workbench g
Karen Tracey wrote:
> manage.py doesn't set the environment variable, it just imports settings
> assuming it is in the current directory. Since you don't get an error
> message that that failed, presumably it worked so the question is why is
> some subsequent code trying to use the environment va
Hi, I have this few line of code:
parametar = msgid=1###userid=1102###nav_status=1###rot=100.0###sog=10.0
params = urllib.urlencode({'report': parametar})
conn = httplib.HTTPConnection("localhost:8000")
conn.request("POST", "/proba/", params, headers)
reportHTTP = conn.getresponse().read()
And I
> Firebug is where you will get django's errors, if you are using an async
> call to django (AJAX, XHR, etc..)
You are absolutely correct.
That's the second post I've misread this morning. I got rear-ended
pretty hard yesterday and I think my neurons aren't working too well
today. Sigh.
--~--~--
> I think you just want something like:
> {% for p in precinct_list %}
> point = new GLatLng({{p.precinct_lat}}, p.precinct_lng{});
> map.addOverlay(createMarker(point, "{{p}}"));
> {% endfor %}
Oops, brain fade on my part -- I didn't read your question carefully
enough. Baxter is cor
I would also be interested in any advice on this. Every time I
implement a search I seem to hit a dead end.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
Firebug is where you will get django's errors, if you are using an async
call to django (AJAX, XHR, etc..)
-richard
On 5/23/08, Peter Rowell <[EMAIL PROTECTED]> wrote:
>
>
> > The debug information is available from firebug. You will see the
> reuest,
> > right click on it and select 'Open in N
On May 23, 12:31 pm, jeffself <[EMAIL PROTECTED]> wrote:
What
> do I need to do to pass the values that are stored in my table to the
> javascript?
>
I think you just want something like:
{% for p in precinct_list %}
point = new GLatLng({{p.precinct_lat}}, p.precinct_lng{});
map.ad
Thanks:
http://code.google.com/p/django-command-extensions/
http://django-command-extensions.googlecode.com/svn/trunk/extensions/management/modelviz.py
It'll check it out.
--
Juanjo Conti
--~--~-~--~~~---~--~~
You received this message because you are subscribe
Firebug to the rescue; I got the error as
...filter() keywords must be strings...
so I changed the below
query = str(request.POST['query'])
qfld = str(request.POST['qtype'])
(it was earlier unicode(request.POST['query']) )
and it works.
I'm afraid that now it will not support
> The debug information is available from firebug. You will see the reuest,
> right click on it and select 'Open in New Tab'
Richard: I love Firebug, but I was talking about debugging Django, not
Javascript.
Joseph: You also need to have you IP in the INTERNAL_IP list in
settings.py. If you hav
Nope. You were right. It was running, but I didn't have it configured
right.
--~--~-~--~~~---~--~~
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
>What
> do I need to do to pass the values that are stored in my table to the
> javascript?
I see this as app-logic so I would create the URL in the view and then
use simple variable substitution in the template.
Look at urllib and urllib2 (standard Python modules) for functions
that do nice stu
I'm trying to get an understanding of using maps with Django. I've
installed Geopy and totally understand how it works. I also can
produce a Google map with data I provide in the javascript. My
question is how do I get the data from Django into the Google Maps
javascript?
Example:
I have a cla
I am trying to merge 2 QuerySet objects with the following function:
qs_user = queryset.filter(user=user)
qs_favorites = Favorite.objects.get_by_user(queryset.model, user)
combined = qs_user | qs_favorites
But I get:
"KeyError: 'favorites_favorite'"
raised from the depths of db-api (query.py lin
This could also be done with Generic Relationships:
http://www.djangoproject.com/documentation/models/generic_relations/
I use this for similiar object references. I also sometimes use
intermediary tables between the base model and the generic_relationship to
limit the types of objects that can be
The debug information is available from firebug. You will see the reuest,
right click on it and select 'Open in New Tab'
-richard
On 5/23/08, Joseph <[EMAIL PROTECTED]> wrote:
>
>
> Peter: Thanks for the reply.
>
> I do have DEBUG=True.
> I have tried both 1/0 and assert false; but both times I
On Fri, May 23, 2008 at 12:11 PM, David Robinson <[EMAIL PROTECTED]>
wrote:
>
> I have run into a problem that I don't understand - when I try to run
> "shell manage.py shell" I just started getting an error about the
> DJANGO_SETTINGS_MODULE environment variable not being defined.
>
You mean "py
Peter: Thanks for the reply.
I do have DEBUG=True.
I have tried both 1/0 and assert false; but both times I don't get the
debug information rather just 'Processing ' from jquery and it is
just blank.
This happens in both firefox and IE.
I'm puzzled on this. Let me see if I can debug jQuery
I have run into a problem that I don't understand - when I try to run
"shell manage.py shell" I just started getting an error about the
DJANGO_SETTINGS_MODULE environment variable not being defined.
I found the information I needed to work around the problem (on this
list - thank you, Evert Ro
> Thoughts on this approach?
I do this all the time. I call them objrefs (Object References).
My syntax is ..id. If the model_name is unique
across the project (which is normally true), then .id is
also accepted. I also allow for .id..
I have three apps I am getting ready to post that make stro
Yup. memcached is running. Pretty sure.
--~--~-~--~~~---~--~~
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 ema
السلام عليكم ورحمة الله وبركاتةبعد التحية
فيه موقع حلو جداً تقوم بالاشتراك فيه مجانا
عن طريق بيانات بسيطة (( سوف اشرح لكم البيانات بالتفصيل ))وبعد الاشتراك
و صنع حساب جديد خاص بك يقدم لك الموقع صفحة خاصة بك تقوم بتقييم
الموقع وتحصل على دولارات اون لاين التقييم الأول
السلام عليكم ورحمة الله وبركاتةبعد التحية
فيه موقع حلو جداً تقوم بالاشتراك فيه مجانا
عن طريق بيانات بسيطة (( سوف اشرح لكم البيانات بالتفصيل ))وبعد الاشتراك
و صنع حساب جديد خاص بك يقدم لك الموقع صفحة خاصة بك تقوم بتقييم
الموقع وتحصل على دولارات اون لاين التقييم الأول
> However when I get the query from
> request.POST, it throws up server error (500).
Well, I kind of doubt that jQuery in the browser is causing a 500
error on the server.
I strongly recommend setting DEBUG=True in your settings.py file.
Django gives you a perfectly lovely, formatted stack trace
[EMAIL PROTECTED] wrote:
> I think I this would be a great plan if I could get caching to work in
> the template tag. Even this returns None:
>
> def render(self, context):
> cache.set('mykey', 'hello world', 30)
> return cache.get('mykey')
Sounds like you have caching disabl
I am not sure if this is a jQuery (flexigrid) issue or a Django issue.
Hopefully one of you will help me.
I am able to display the flexigrid and populate the rows. However, I'm
encountering an error at search. If I do the below:
query = 'cep'
qfld = 'publisher'
if (query
I think I this would be a great plan if I could get caching to work in
the template tag. Even this returns None:
def render(self, context):
cache.set('mykey', 'hello world', 30)
return cache.get('mykey')
--~--~-~--~~~---~--~~
You received this
Thanks. You are right, my actual code ordered by a specific field but
I kept the example simple because it shows the same problem. Thanks
for the link to the ticket because I could not find a ticket for it
myself.
Rudolph
--~--~-~--~~~---~--~~
You received this mes
On Fri, May 23, 2008 at 8:08 AM, Rudolph <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I encountered a change in the ordering when using Django after the
> queryset-refactor branch merged. When ordering by a foreignkey which
> can be null, all items with this key being null get excluded. Example:
>
> cla
> > On May 21, 3:30 am, James Tauber <[EMAIL PROTECTED]> wrote:
> >> I find myself being inconsistent in whether I put model helper
> >> methods
> >> on a custom manager or just as top-level functions in models.py
> >> [...]
> >> Any thoughts on best practices? Heuristics for deciding which to use
OMG. I can't believe I missed the trailing slash when I set up the
get_absolute_url for the results page. I need sleep.
Thanks Karen,
Brandon
On May 22, 4:19 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Thu, May 22, 2008 at 3:21 PM, Brandon Taylor <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > Hi
On May 22, 9:10 pm, emy_66 <[EMAIL PROTECTED]> wrote:
> Hi Rajesh,
>
> I checked that and it is...Any other suggestions?
Can you share your settings.py?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django user
On May 22, 2008, at 11:56 PM, Jeff Anderson wrote:
> django isn't designed to be a mass-emailing system. It can do it,
> but it is very slow compared to using mailing list software. Mailman
> is written in python, and you can have django send off the one e-
> mail to the mailman-driven list.
A small clearification to the previous post: by disappear I mean they
are not in the queryset. They stay in the database ofcourse.
Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
Hi,
I encountered a change in the ordering when using Django after the
queryset-refactor branch merged. When ordering by a foreignkey which
can be null, all items with this key being null get excluded. Example:
class Foo(models.Model):
name = models.CharField...
class Bar(models.Model):
mailman seens to be aimed at something like google groups and I doing
a newletter so I just mailing list and stats thanks for you suggestion
On May 23, 4:56 am, Jeff Anderson <[EMAIL PROTECTED]> wrote:
> sebey wrote:
> > OK so as you may see I have a lot of questions in helping build my
> > djang
On May 22, 2008, at 9:29 AM, Rajesh Dhawan wrote:
> On May 21, 3:30 am, James Tauber <[EMAIL PROTECTED]> wrote:
>> I find myself being inconsistent in whether I put model helper
>> methods
>> on a custom manager or just as top-level functions in models.py
>> [...]
>> Any thoughts on best pract
django-notification[1] is a django app for managing the notification
of events like "Jacob has accepted your friend request" over multiple
media (email, feeds, web page) regardless of which app was responsible
for the app.
At the moment the notification message is just a text field but I'd
In Django admin, foreign key fields are automatically accompanied by a
little plus icon to add an item to the related table via a popup. Is
there a convenient way to replicate this functionality in a custom
form? Is there a parameter that I can add to the (newforms) form field
or will I have to ma
There is one common problem with PIL: if you tried to install it
*before* you install JPEG and other libraries, it won't recompile C
extensions with newer headers and libraries.
The solution is to rebuild PIL with -f switch:
python setup.py build_ext -f
(sudo) python setup.py install
Hope this h
On May 23, 2008, at 3:10 PM, Matthias Kestenholz wrote:
>>> Well no. It's not even possible to pull the books and the categories
> (ManyToMany) out of the database in a single query. IIRC
> select_related() only follows ForeignKeys. If you need to optimize the
> querying of the categories, you n
Hi Omat,
Sorry it took me a while to answer, but if you have not yet found the
answer to your problem, maybe this will help:
The clean_date() method will only be called when the compress() method
did not raise any ValidationErrors (cleaned_data is only available
when all fields validate, and onl
On 5/23/08, Austin Govella ([EMAIL PROTECTED]) wrote:
>Does anyone have any insights on how to work around the bug noted in
>#7019?
>
>I need to add/edit a path somewhere, yes? But where?
>On May 20, 12:42 am, Austin Govella <[EMAIL PROTECTED]> wrote:
>> It was a PYTHONPATH problem. I fixed it us
I figured it out:
unique query is referring to distinct() and to combine two QuerySets,
they should both be distinct() or non-distinct.
On May 23, 12:17 pm, omat <[EMAIL PROTECTED]> wrote:
> I was able to track down the problem a little further and I saw that
>
> Tag.objects.get_for_model(Not
I was able to track down the problem a little further and I saw that
Tag.objects.get_for_model(Note, 'foo') |
Note.objects.filter(tag='bar')
results in a:
"Cannot combine a unique query with a non-unique query"
exception.
Does anybody have any idea what that means? What is a unique query?
You might wanna look into using the [1]Test Client. It allows you to
build the request and see what the response is, pretty nice actually.
[1] http://www.djangoproject.com/documentation/testing/#the-test-client
On May 22, 9:31 pm, "Viktor Nagy" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've a ver
On Fri, 2008-05-23 at 02:19 +0800, Eric Abrahamsen wrote:
>
> On May 23, 2008, at 12:27 AM, jonknee wrote:
>
> >
> > On May 22, 11:08 am, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> >
> > > I tried using select_related('categories') on the original book
> > > query,
> > > but that seemed to
Does anyone have any insights on how to work around the bug noted in
#7019?
I need to add/edit a path somewhere, yes? But where?
On May 20, 12:42 am, Austin Govella <[EMAIL PROTECTED]> wrote:
> It was a PYTHONPATH problem. I fixed it using this tutorial:
> *http://emmby.blogspot.com/2008/05/ins
75 matches
Mail list logo