Re: get_or_create gave IntegrityError: (1062, "Duplicate entry) error sometimes

2012-10-15 Thread Reinout van Rees
entry. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you are subscribed to the Google G

Re: Release considerations

2012-07-10 Thread Reinout van Rees
r. Make sure you've got example configurations on how to integrate it with a webserver (apache/nginx). Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, m

Re: JSONField: which app to choose ?

2012-07-10 Thread Reinout van Rees
t.org/schinckel/django-jsonfield/ on bitbucket. I looked at it with a colleague and it seemed to have a bit more validation than some others. Little things. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ &quo

Re: How to serve staticfiles with full URL for local development?

2012-05-14 Thread Reinout van Rees
ne of my messages something about "needing a full path name '/tmp/' for saved pages". What did you mean by that? Such a full path is different from a proper localhost:8000 url. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@van

Re: How to serve staticfiles with full URL for local development?

2012-05-05 Thread Reinout van Rees
ticfiles.urls.staticfiles_urlpatterns applies. You have to add that to your urls.py. But normally, you don't have to. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure wha

Re: template logic vs AJAX newbie seeks advice

2012-05-05 Thread Reinout van Rees
no problem: take a look. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you are subscr

Re: template logic vs AJAX newbie seeks advice

2012-05-05 Thread Reinout van Rees
them together too much. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you are subscribed t

Re: template logic vs AJAX newbie seeks advice

2012-05-04 Thread Reinout van Rees
inout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you are subscribed to the Google Groups "Djan

Re: How to get caller function from a function

2012-05-04 Thread Reinout van Rees
helper function, not returning its results. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message bec

Re: buildout development vs. deployment

2012-04-30 Thread Reinout van Rees
. That way you can also reuse them and be sure that everything you need is included. The core point is that setup.py's are "recursive" where buildouts are not. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org h

Re: @login_required do nothing

2012-04-29 Thread Reinout van Rees
django-13/ Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you are subscribed to the Google Group

Re: outdated django book

2012-04-29 Thread Reinout van Rees
the following link: http://www.caktusgroup.com/blog/2011/12/29/class-based-views-django-13/ You need to decorate the dispatch() method in the class-based-view case. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ &q

Re: Unable to get result using distance query

2012-04-29 Thread Reinout van Rees
hat treats points differently? Wild guesses... Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message be

Re: buildout development vs. deployment

2012-04-29 Thread Reinout van Rees
ything *within* your project directory, nothing beats the functionality of buildout. And it combines fine with tools like fabric that can handle everything outside of the project directory. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org

Re: Loading static files from a dev environment

2012-04-29 Thread Reinout van Rees
iour for development. The directory that collectstatic fills is just for your production environment where you've got a proper webserver to serve that directory. So... it is by design :-) Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org

Re: Django Book

2012-04-21 Thread Reinout van Rees
ok.html Most available books are quite old, so I'm doing my best to get this one out so that there's a current book. I'm targetting Django 1.4 so that's pretty current :-) Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org

Re: TestCase Client.login() fails

2012-03-28 Thread Reinout van Rees
s and returns a User. You're right, I was wrong :-) I overlooked that create_user is a special call and thought it was just a generic create statement. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.

Re: TestCase Client.login() fails

2012-03-28 Thread Reinout van Rees
veral mistakes with them already :-) Look at [1] for an example error. Reinout [1]: http://reinout.vanrees.org/weblog/2011/11/18/django_unicodedecodeerror.html -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ &

Re: myproject/wsgi.py vs. myproject.wsgi?

2012-03-26 Thread Reinout van Rees
-- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you are subscribed to the Google Groups "Django

Re: philosophy behind sites and applications in Django

2012-03-26 Thread Reinout van Rees
that just provides a layout. Use that in the apps. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this mess

Re: Pip install matplotlib error with virtualenv

2012-03-26 Thread Reinout van Rees
*does* mean you must have all xyz-devel packages installed. An alternative is to keep your global python clean and only install specific packages with your OS that are best handled by the OS. Don't "pip install" other stuff by hand. Reinout -- Reinout van Rees

Re: Accessing objects from a dictionary in templates

2012-03-23 Thread Reinout van Rees
n }} or so? Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you are subscribed to the Goo

Re: Accessing objects from a dictionary in templates

2012-03-23 Thread Reinout van Rees
thing like {{ my_dict.42 }}. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you are

Re: Pip install matplotlib error with virtualenv

2012-03-23 Thread Reinout van Rees
On 23-03-12 21:37, Reinout van Rees wrote: On 23-03-12 18:51, darwin_tech wrote: the weird thing is that matplotlib works fine on my system. If I have a Django project running outside of virtualenv, there is no problem and matplotlib is on the pythonpath. One of virtualenv's options

Re: Pip install matplotlib error with virtualenv

2012-03-23 Thread Reinout van Rees
ystem python. "virtualenv -s" or something like that. Perhaps you passed along that option? In that case, nothing in your virtualenv can find the system python's matplotlib. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org

Re: Pip install matplotlib error with virtualenv

2012-03-23 Thread Reinout van Rees
. Only reason I can think of is that it might be safer on the server or something like that. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- P

Re: Django log lines spamming syslog

2012-03-23 Thread Reinout van Rees
s/middleware.py for debug purposes. So check the django that your site is using and see if you have to beat someone with a stout stick. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're

Re: Django-1.4c2 logging issue on Snow Leopard

2012-03-23 Thread Reinout van Rees
u spot something wrong with sys.path or so. Or the `#!` python line at the top. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham"

Re: Weird stacktrace coming from manage.py test

2012-03-23 Thread Reinout van Rees
not quite right. In your geodjango case, do you perhaps miss django.contrib.gis in your INSTALLED_APPS list? Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make

Re: Request Context problem

2012-02-19 Thread Reinout van Rees
token. It won't even hit your "else add csrf token" code. The solution is simple: just add a {{ csrf_token }} somewhere in your form. That ought to do it. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nele

Re: sqlite3 error

2012-02-12 Thread Reinout van Rees
;, Just "sqlite3" by itself was fine in older django versions, so you might have picked up an example from there. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what

Re: how to lookup dictionary in filter return?

2012-01-27 Thread Reinout van Rees
dict: ... print my_dict[key] aaa bbb In your case: {% for itm in somevalue | dic_filter %} {{ somevalue.itm }} {% endfor %} (And I'd replace 'itm' with 'key') Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org

Re: Error with Apache + mod_wsgi

2012-01-27 Thread Reinout van Rees
ifferent libraries. I'd try looking at /usr/lib/pymodules/python2.6/django and figure out which Django version that is. And if python 2.6 is the same one as was running before. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http:

Re: CsrfViewMiddleware from a xml post?

2012-01-24 Thread Reinout van Rees
that takes care of including the csrf token: https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do,

Re: Can't make 404.html template to be used. Keep getting Apache 500 Internal Server Error instead.

2012-01-22 Thread Reinout van Rees
e latest Django doesn't have this requirement, btw. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this

Re: django-html5boilerplate error

2012-01-19 Thread Reinout van Rees
e /static/js/libs/modernizr-2.0.min.js So it is all relative to main.js and it somehow has a | and some number behind it. I think you've mis-configured something with that django-mediagenerator you mention. (or django-mediagenerator is defective, I don't know as I haven

Re: How I could reset django admin pass in a buildout project

2011-12-29 Thread Reinout van Rees
s normally impossible. You must have removed something by hand? Could you look inside the bin/django script? It ought to have a "sys.path" list in there that shows you where it thinks it can find the djangorecipe. Make sure it is still there. Or re-run your buildout, for instance. Reinout

Re: How I could reset django admin pass in a buildout project

2011-12-29 Thread Reinout van Rees
t enviroment variable to your settings file pre-set. So: "bin/django shell". Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul

Re: preventing data from getting saved to the backend database?

2011-12-27 Thread Reinout van Rees
the info from those files all the time seems a bit wasteful: use some low-level django caching and you'll be fine again. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not

Re: Django Upload Image Help

2011-12-12 Thread Reinout van Rees
don't have a meaning iirc, but %d means "render as an integer".). So I'd expect an "TypeError: not enough arguments for format string". Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuur

Re: Best way to upload and play a video

2011-12-11 Thread Reinout van Rees
Alternative is to upload it to youtube/smugmug/whatever and to just store a URL in your model, pointing at the correct embed URL. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're

Re: converting from function based views to class based views

2011-12-10 Thread Reinout van Rees
t article give you enough hints? Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you are

Re: urls.py?

2011-12-09 Thread Reinout van Rees
ide variables by accident that way. Better to explicitly import what you need. In this case the problem was that the original poster imported 'view' a few times from different places. Doing a "*" import would only make that problem worse :-) Reinout -- Reinout van Rees

Re: urls.py?

2011-12-09 Thread Reinout van Rees
times at the top. The last "from mysite.books import views" is winning :-) You cannot have one variable point to several things at the same time. Best thing you can do: import mysite.contact.views import mysite.books.views ... (r'^contact/$', mysite.contact.

Re: Any help regarding the SAAS based django-web application

2011-12-08 Thread Reinout van Rees
documentation or help on this topic if anyone has already developed in this way See Tom Evans' reply to your previous email. Your question is way too broad to give a meaningful answer. You'll have to give us more information. Reinout -- Reinout van Rees

Re: Deployment problem

2011-12-08 Thread Reinout van Rees
at is the structure of my files , what to upload ? mod_python is very outdated and unmaintained for years. Almost everyone uses wsgi (for apache: mod_wsgi) nowadays. Look a bit at the django documentation to get an idea. Reinout -- Reinout van Reeshttp://reinout.vanrees

Re: Query with no-correspondence results

2011-12-06 Thread Reinout van Rees
#x27; and user='Me' There still might be a way to do it with the ORM; but you can definitely use raw sql for this. Till two years ago I didn't touch an sql database for 8 years as I used zope's luxurious python object database :-) So I'm happily proven wrong in what

Re: Query with no-correspondence results

2011-12-06 Thread Reinout van Rees
not with a Django query). In case you want all contexts, you'll have to query for those specifically. And afterwards grab the results belonging to that context. So you won't escape a for loop and some manual work, I'm afraid. Reinout -- Reinout van Reesht

Re: Django E-Commerce Framework

2011-12-06 Thread Reinout van Rees
On 06-12-11 06:40, Md,Mehedi Hasan Kabir(Tanim) wrote: Can anyone give me some suggestion/link for Django E-Commerce Framework? No personal experience, but the one I see mentioned most often: django lightning fast shop. http://www.getlfs.com/ Reinout -- Reinout van Rees

Re: Management commands inside namespaced packages not found

2011-12-06 Thread Reinout van Rees
) and modules named companyname_product (with an underscore). - You still have the companyname prefix. - You get the full "companyname_product" in INSTALLED_APPS. - You visually see the difference between the package dir and the python module dir. Reinout -- Reinout van R

Re: Template filter with multiple non-string arguments?

2011-12-06 Thread Reinout van Rees
r template. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you are subscribed to the Goo

Re: Query with no-correspondence results

2011-12-06 Thread Reinout van Rees
arrot).values_list('thing', 'context', 'vote) should return a list of those lists. What do you get with a plain Vote.objects.filter(thing=carrot) ? Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen

Re: Can't figure out this Object Model error...

2011-12-05 Thread Reinout van Rees
syncdb (it will now contain the foreign key column). - Use south for database migrations. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something

Re: Query with no-correspondence results

2011-12-05 Thread Reinout van Rees
three specific values: Vote.objects.filter(thing=carrot).values_list('thing', 'context', 'vote) See https://docs.djangoproject.com/en/1.3/ref/models/querysets/#values-list for how that last trick works. Something like that? Reinout -- Reinout van Rees

Re: New design for class-based views

2011-12-05 Thread Reinout van Rees
"keep forever" option? Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you are s

Re: Django

2011-12-02 Thread Reinout van Rees
? Depends on how you want to edit. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you ar

Re: How to intercept password change in admin module ?

2011-12-01 Thread Reinout van Rees
list than Django's build-in apps? Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message becaus

Re: Nginx - How to configure the virtual.conf to serve a Django application

2011-11-30 Thread Reinout van Rees
ation / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; proxy_pass http://localhost:11000; } } Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org h

Re: A view associated with a lot of urls

2011-11-29 Thread Reinout van Rees
ink. So you probably have a start page that lists the categories and then a category page that lists the items. A 404 on /non/existing leads people to try /non/ which would also 404. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org

Re: django 1.3: how to use get_abolute_url in class based generic views

2011-10-15 Thread Reinout van Rees
?? Your get_absolute_url() returns a tuple instead of a url. You forgot to call reverse(): from django.core.urlresolvers import reverse ... def get_absolute_url(self): return reverse('article_detail', (), { 'year': ^^^

Re: forms.ChoiceField/forms.ModelChoiceField Needs a Lot of Love

2011-09-06 Thread Reinout van Rees
e's an easy solution, mayhap it suggests improvements to the generic choicefield? Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Gra

Re: logging django errors also on the server

2011-09-04 Thread Reinout van Rees
atches all messages, including the ones to the django.something.error logger. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham&qu

Re: logging django errors also on the server

2011-09-04 Thread Reinout van Rees
dlewar such as http://djangosnippets.org/snippets/421/ . I've used that one for almost a year. Works like a charm. But... hurray for django 1.3 for including it in the regular python logging :-) Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@van

Re: Template image display issue

2011-09-01 Thread Reinout van Rees
django 1.3, but available separate for earlier django versions). Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You recei

Re: Unable to have a template NOT show up

2011-09-01 Thread Reinout van Rees
ories loader is the one that you ought to use most of the time, so that's good. What's not good is that apparently only the admin's templates are found. Is your "polls" app a real app? Is it in your settings.py's INSTALLED_APPS list? Reinout -- Reino

Re: Setting up a PostGIS DB

2011-09-01 Thread Reinout van Rees
pes. You might need to add explicit type casts. Anyone have any advice or ideas? It seems you haven't installed the postgis database extras into your postgres database. It depends on your OS how you have to do that. Reinout -- Reinout van Reeshttp://reinout.vanr

Re: feed updates stopped working

2011-09-01 Thread Reinout van Rees
t weeks as it didn't seem to run :-) Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because y

Re: feed updates stopped working

2011-09-01 Thread Reinout van Rees
-c "import sys;print sys.path" Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message becau

Re: Unable to have a template NOT show up

2011-09-01 Thread Reinout van Rees
current URL, |polls/1/|, didn't match any of these. Such a "^polls/ ^polls/$" regex is incorrect. What's the extra "^polls/ " doing in front of the actual regex? That's the cause of your error, I think. Reinout -- Reinout van Rees

Re: feed updates stopped working

2011-09-01 Thread Reinout van Rees
On 01-09-11 15:11, vanderkerkoff wrote: Thanks for trying though, I will find the problem, eventually:-) Can you specify "it stopped working" a bit, btw? Do you get a traceback, for instance? Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@v

Re: feed updates stopped working

2011-09-01 Thread Reinout van Rees
Perhaps two months ago an OS update also updated the python version? So that the default /usr/bin/python isn't the same anymore as the version with the fact.pth in its site-packages folder? Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.or

Re: Unable to have a template NOT show up

2011-08-31 Thread Reinout van Rees
d. Why doesn't it show up? You probably forgot to add it to your INSTALLED_APPS list in your settings.py. At least, that happened to me a few times. "I can import it, why doesn't it work?!?" Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...

Re: Mystery... Faked Referrer Generates 500 Instead of 404 Error

2011-08-31 Thread Reinout van Rees
probably tell your webserver to immediately tell visitors to those specific pages that the page is gone (apache rewriterule, for instance, with a "410 GONE" response). Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://w

Re: Unable to have a template NOT show up

2011-08-31 Thread Reinout van Rees
think of right now: You mis-typed something in your urls.py. I'd expect there to be a "polls.view" in there instead of the customary "polls.views...", so with an 's'. The module is "views.py", not "view.py". Just guessing...

Re: How to run tests?

2011-08-30 Thread Reinout van Rees
with label vip_mobile could not be found Try "manage.py test data". Django doesn't really like those dot-separated namespace packages, sadly. Only the last part is used. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http:

Re: Unable To Delete Records

2011-08-30 Thread Reinout van Rees
the last value." Now you know why only the last item gets deleted. It bit my once, too. What you need to call is request.POST.getlist('del_id'): that will give you the list you're expecting. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@

Re: App namespace/packages?

2011-08-30 Thread Reinout van Rees
with an underscore (lizard_ui, lizard_map, lizard_shape). The only reason for the dash/underscore difference is that it makes it easier to spot in which directory you are (the dash is the one with the setup.py, the underscore is the directory with the code within that outer-one-with-the

Re: Media files not served automatically anymore in 1.3?

2011-08-29 Thread Reinout van Rees
On 27-08-11 17:22, Karen Tracey wrote: On Thu, Aug 25, 2011 at 7:21 AM, Reinout van Rees mailto:rein...@vanrees.org>> wrote: Only, with this 1.3 change django's 1.2's automatic serving of the media_url stuff has gone the way of the dodo. Django 1.2 never did auto

Re: django themes

2011-08-26 Thread Reinout van Rees
way to bundle css/js with your application. Works like a charm. Look into that one first. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul

Re: Media files not served automatically anymore in 1.3?

2011-08-25 Thread Reinout van Rees
On 25-08-11 12:08, Reinout van Rees wrote: Two questions: - "Breaking" automatic media_url serving seems worthy of a real note in the 1.3 changelog. That note isn't there. Is this bad? Or am I missing something? Yes, I am missing something... It turns out that django-st

Re: Media files not served automatically anymore in 1.3?

2011-08-25 Thread Reinout van Rees
recommended!) Nope, that's not it. Staticfiles works fine with runserver and serves the static_url stuff just fine. Only, with this 1.3 change django's 1.2's automatic serving of the media_url stuff has gone the way of the dodo. Reinout -- Reinout van Rees

Media files not served automatically anymore in 1.3?

2011-08-25 Thread Reinout van Rees
ving seems worthy of a real note in the 1.3 changelog. That note isn't there. Is this bad? Or am I missing something? - Serving static_url automatically but omitting media_url is a bit strange if you ask me. Is this a bug? Reinout -- Reinout van Reeshttp://reinout.vanre

Re: Problems on using multiple databases

2011-08-24 Thread Reinout van Rees
docs: syncdb only managed the main default database by default. You'll have to call syncdb on the second database separately. Often the second database is an existing one that django shouldn't touch, that's why the default is that way. Reinout -- Reinout van Rees

Re: mod_wsgi cannot load MySQLdb

2011-08-24 Thread Reinout van Rees
path. I don't see anything that looks like a virtualenv dir in there, unless it is the /Users/jianbao/pylib at the end. I personally don't know how wsgi+virtualenv works together (I use buildout normally). so you'll have to ask around for that. Reinout -- Reinout van Ree

Re: Drag and drop functionality?

2011-08-24 Thread Reinout van Rees
I don't know if that also works for items dragged from outside the browser window. But get step 1 working first. Step 2 will need that functionality in place to be able to do something :-) Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.

Re: Admin staticfiles stubbornly hiding behind 404s

2011-08-24 Thread Reinout van Rees
all getting the right js/css out of the box. Handy! Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this mess

Re: Error: cannot import name settings

2011-08-24 Thread Reinout van Rees
out -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this message because you are subscribed to the Google Groups &qu

Re: Problems on using multiple databases

2011-08-24 Thread Reinout van Rees
On 23-08-11 01:31, Jim wrote: django.db.utils.DatabaseError: no such table: django_content_type Which django version, btw? Early 1.2 beta versions had a bug: https://code.djangoproject.com/ticket/12999 Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein

Re: Admin staticfiles stubbornly hiding behind 404s

2011-08-24 Thread Reinout van Rees
e server? On the server, you need to tell apache (or whatever you're using) to look in the right directory given your STATIC_URL: # django-staticfiles: STATIC_URL = '/static_media/' Alias /static_media/ /path/to/your/collected/static/files/ Reinout -- Reinout van Re

Re: Problems on using multiple databases

2011-08-24 Thread Reinout van Rees
ent_type table that gives you problems!) should not end up in your special deatabase. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham&q

Re: mod_wsgi cannot load MySQLdb

2011-08-24 Thread Reinout van Rees
t; from your .wsgi script for instance. Just some brainstorming. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- Y

Re: why can't I access a dictionary with an initial form field value from my django template?

2011-08-23 Thread Reinout van Rees
tems and then apply that to the first item. That's the basic problem. Best solution probably: just do the MYDICT[myform.somefield.value] in your view and pass the value to the template? Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org

Re: Django 1.3 logging not working as I'd expect

2011-08-22 Thread Reinout van Rees
efore the logging is actually configured. Just as a simple test, put such a logging statement inside one of your view methods and hit it in your browser. Just to make sure your logging setup as such works. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@

Re: Django admin site and DEBUG flag.

2011-08-19 Thread Reinout van Rees
roups/* *did* work? Which ones don't? If it is for instance /admin/issues/*, look at that issues app and see if there's an 'if settings.DEBUG' somewhere in there. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.n

Re: Django admin site and DEBUG flag.

2011-08-19 Thread Reinout van Rees
DEBUG:" around where the admin site is mounted in your urls. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You rece

Re: problem with a graph image in template

2011-08-19 Thread Reinout van Rees
you can normally directly see the 500 error text. Seeing the traceback ought to show you the problem. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make som

Re: Anyone use mod_security with Django?

2011-08-18 Thread Reinout van Rees
s secure even though Django protects against that just fine ;-) Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- You received this me

Re: Anyone use mod_security with Django?

2011-08-18 Thread Reinout van Rees
need to gain knowledge on what mod_security actually does and how to configure it. Personally, I've never heard of anyone using it for Django and I'd be surprised if it is needed. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org

Re: 'dict' object has no attribute 'META'

2011-08-18 Thread Reinout van Rees
Apparently the request is now a 'dict' object instead of a real django request object. Do you have some middleware or so that does something to the request? Does your view modify the request, inadvertently modifying it into a dict? Just brainstorming about possible ca

Re: problem with a grph image in template

2011-08-18 Thread Reinout van Rees
;disk full" to "python syntax error". Perhaps there's a difference that your first example is a POST to that image? And means a GET request? by putting in the template a simple tag in the template That src attribute again doesn't seem to match your original url.

  1   2   >