Re: Weird problem in common_settings include

2012-12-14 Thread Bill Freeman
On Fri, Dec 14, 2012 at 8:39 AM, florian wrote: > > > On Friday, December 14, 2012 11:17:07 AM UTC+1, ke1g wrote: >> >> >> How are you combining INSTALLED_APPS from the two files? Note that >> simply "setting" it to what you want to add in the file that includes the >> other *replaces* the value

Re: Weird problem in common_settings include

2012-12-14 Thread florian
On Friday, December 14, 2012 11:17:07 AM UTC+1, ke1g wrote: > > > How are you combining INSTALLED_APPS from the two files? Note that simply > "setting" it to what you want to add in the file that includes the other > *replaces* the value you have imported from the other. Be sure to use += >

Re: Weird problem in common_settings include

2012-12-14 Thread Bill Freeman
On Thu, Dec 13, 2012 at 7:47 AM, florian iragne wrote: > Ok, i've get rid of my "special" mobile_manage.py and pass the --settings > option when i start the fcgi process (i use nginx+fcgi, no mod_wsgi). > > Using manage.py, with each settings file, i can verify that the > INSTALLED_APPS is correc

Re: Weird problem in common_settings include

2012-12-13 Thread florian iragne
Ok, i've get rid of my "special" mobile_manage.py and pass the --settings option when i start the fcgi process (i use nginx+fcgi, no mod_wsgi). Using manage.py, with each settings file, i can verify that the INSTALLED_APPS is correct and complete. However, i still get the error any idea? th

Re: Weird problem in common_settings include

2012-12-13 Thread florian
Hi, On Thursday, December 13, 2012 1:02:10 PM UTC+1, Tom Evans wrote: > > Er, why have two versions of manage.py? One of the arguments manage.py > takes is the name of your settings module. > > Put all your common settings into 'settings_default.py'. > > Add your mobile settings as 'settings_mo

Re: Weird problem in common_settings include

2012-12-13 Thread Tom Evans
On Thu, Dec 13, 2012 at 8:24 AM, florian wrote: > Hi, > > for my project, i hav a mobile_manage.py and a manage.py. Each has its > specific settings, but has also lots of sommon settings. Er, why have two versions of manage.py? One of the arguments manage.py takes is the name of your settings mod

Weird problem in common_settings include

2012-12-13 Thread florian
Hi, for my project, i hav a mobile_manage.py and a manage.py. Each has its specific settings, but has also lots of sommon settings. Thus, i've created a common_settings.py and included it in the specific settings (settings.py and mobile_settings.py). Howerver, it doesn't work. There's no error

Weird problem

2012-06-20 Thread Patrick Edwards
Just starting out and had no problems at first. Starting yesterday, when I type django-admin.py startproject asitename, all that happens is notepad opens the source file. This was working on Monday. I can't figure out what I did. Using 32 bit Windows 7 Pro, the current Active Python version

Re: Weird problem generating forms on the fly

2012-03-09 Thread Steven Smith
I like it. Thanks, Tom! On Mar 9, 11:19 am, Tom Evans wrote: > On Fri, Mar 9, 2012 at 4:05 PM, Steven Smith wrote: > > I think I figured it out. My TYPE_MAPPING thing was causing the form > > fields to be initialized *once*. So, I made the contents of > > TYPE_MAPPING into strings, and I'm usi

Re: Weird problem generating forms on the fly

2012-03-09 Thread Tom Evans
On Fri, Mar 9, 2012 at 4:05 PM, Steven Smith wrote: > I think I figured it out. My TYPE_MAPPING thing was causing the form > fields to be initialized *once*. So, I made the contents of > TYPE_MAPPING into strings, and I'm using eval(). > > Unless there's a better way, I'm leaving it like this in >

Re: Weird problem generating forms on the fly

2012-03-09 Thread Steven Smith
I think I figured it out. My TYPE_MAPPING thing was causing the form fields to be initialized *once*. So, I made the contents of TYPE_MAPPING into strings, and I'm using eval(). Unless there's a better way, I'm leaving it like this in production :-) On Mar 9, 10:01 am, Steven Smith wrote: > I

Weird problem generating forms on the fly

2012-03-09 Thread Steven Smith
I have data that looks like this: formfields = [{'label': u'IP address of hacker', 'type': u'String', 'name': u'locationIp'}, {'label': u'Created end date', 'type': u'Date', 'name': u'createdEndDate'}, {'label': u'Created start date', 'type': u'Date', 'name': u'createdStartDate'}] I want to genera

Aw: Re: Weird Problem: Template Shows Templatevariable's Name Instead Of It's Value

2011-08-15 Thread Schmidtchen Schleicher
What is the advantage in using a context? You only put the content i would put directly into the render_to_response arguments in an own dict, like context = {'foo':'bar'} return context is equal to return {'foo':'bar'} ??? But thanks to your code -- it's much better than mine ;-) -- You rec

Re: Weird Problem: Template Shows Templatevariable's Name Instead Of It's Value

2011-08-14 Thread Oliver Schmidt
Thank you very much!! I know my code needs to be tidied up xD. I'vd tried many things to solve the problem that's why my code looks so awful. And I'm glad there is an easy solution for my problem (and I didn't saw it *wall*) And @bruno desthuilliers: It's good for a newbie like me to see how ot

Re: Weird Problem: Template Shows Templatevariable's Name Instead Of It's Value

2011-08-14 Thread Jonas H.
On 08/14/2011 09:57 PM, bruno desthuilliers wrote: {% for current, entry, month, n in months %} Please think about what "months" is here... Yes, a list of dicts. So this line is the equivalent of: current = months[0] # first dict in the list entry = months[1]# second dict in the list month

Re: Weird Problem: Template Shows Templatevariable's Name Instead Of It's Value

2011-08-14 Thread Landy Chapman
Hi, your template is missing a closing double-quote this line >     "month{% endif %} > should be >     "month"{% endif %} > Also by reformatting a little I noticed you close a with a {% for current, entry, month, n in months %} {% if entry %}{% endif %} http://foo.bar/"

Re: Weird Problem: Template Shows Templatevariable's Name Instead Of It's Value

2011-08-14 Thread bruno desthuilliers
On 14 août, 20:11, Schmidtchen Schleicher wrote: > Hey Guys, > my problem is, as shown in the subject, that the template-engine puts in the > name of the templatevariable instead of the value: > > my view: > > def YearlyView(request, calid, year): The convention is to use all_lower names for func

Weird Problem: Template Shows Templatevariable's Name Instead Of It's Value

2011-08-14 Thread Schmidtchen Schleicher
Hey Guys, my problem is, as shown in the subject, that the template-engine puts in the name of the templatevariable instead of the value: my view: def YearlyView(request, calid, year): lst = [] k = get_object_or_404(Kalender, pk=calid) now_year, now_month = datetime.date.today().year

Re: Weird problem with rendering a Variable in a custom tag

2011-05-25 Thread bruno desthuilliers
On May 25, 4:43 am, stevedegrace wrote: > And you are absolutely correct, using a local variable in the render > method and not rebinding self,ip resolves the problem. Thank you very > much. Can you explain why this is? "Once a node is parsed, its render method may be called any number of times"

Re: Weird problem with rendering a Variable in a custom tag

2011-05-24 Thread stevedegrace
And you are absolutely correct, using a local variable in the render method and not rebinding self,ip resolves the problem. Thank you very much. Can you explain why this is? On May 23, 5:34 am, bruno desthuilliers wrote: > On May 23, 5:37 am, stevedegrace wrote: > > > I developed a custom tag to

Re: Weird problem with rendering a Variable in a custom tag

2011-05-24 Thread stevedegrace
Thanks for the advice. I'm actually using this tag on a private moderation page to quickly satisfy my curiosity about which countries generate the most spam in my comments (FYI: Russia is winning hands down so far). On May 23, 10:24 am, Brice Leroy wrote: > Be careful will computing location on r

Re: Weird problem with rendering a Variable in a custom tag

2011-05-23 Thread Brice Leroy
Be careful will computing location on rendering. IPs will change in time. The pattern is not clear but expect the information to expire. As you only extract the country, it shouldn't be an issue, but if you drill down to Zip code I would commend you to store it with the comment's author (less e

Re: Weird problem with rendering a Variable in a custom tag

2011-05-23 Thread bruno desthuilliers
On May 23, 5:37 am, stevedegrace wrote: > I developed a custom tag to look up the country of a certain IP > address using an IP to country database. It's sort of rough and ready, > but it should work. The idea is that you read the comment.ip_address, > feed it to the {% country %} tag, which then

Weird problem with rendering a Variable in a custom tag

2011-05-22 Thread stevedegrace
I developed a custom tag to look up the country of a certain IP address using an IP to country database. It's sort of rough and ready, but it should work. The idea is that you read the comment.ip_address, feed it to the {% country %} tag, which then spits out the two letter country code. The intere

Re: Weird problem after schema change

2010-11-30 Thread chris
Nope, haven't defined anything interesting for admin. The field name matches, as far as I know. Frankly, though, given the length of time it takes for the server to reply (owing to the huge number of entries for the m2m field), I guess this really isn't worth fixing if it's more involved than a si

Re: Weird problem after schema change

2010-11-25 Thread Venkatraman S
On Fri, Nov 26, 2010 at 6:30 AM, Chris Tandiono wrote: > How can I get the date field to show up in the admin interface? > Couple of checks: - have you defined any custom forms for admin? - Do the field names match properly? A good practice generally is : do a 'sqlall' before you make the change

Weird problem after schema change

2010-11-25 Thread Chris Tandiono
Hi, I'm using sqlite3 and django-evolution (and sometimes manual ALTER TABLE commands) for this website I'm making. Recently I added a new date field to one of my models, but it's not showing up in the admin interface. (I'm also having a problem in which the admin interface is taking taking a l

Re: python threading admin actions weird problem

2010-08-14 Thread rahul jain
Sorry one more thing Sometimes it starts with check = False Its happening at random time. --RJ On Sat, Aug 14, 2010 at 7:36 PM, rahul jain wrote: > Hi there ! > > Some weird problem happening with admin actions. > > My admin action create threads which access a shared va

python threading admin actions weird problem

2010-08-14 Thread rahul jain
Hi there ! Some weird problem happening with admin actions. My admin action create threads which access a shared variable. Those threads change the state of the variable for ex check = False (a boolean) One of the thread sets it to True At this time I am done with that entire request. Now if

Re: weird problem with django admin models and webfaction

2010-02-22 Thread Simon Davies
Duh!! yeah restarting apache did it. How did I forget something so simple!! Thanks Simon On 22 Feb, 15:04, Shawn Milochik wrote: > Did you manually restart the Apache instance for this app? > > I had a similar problem, and it turned out that I had a bit of code in one of > my model that was

Re: Record is saved, but no join table entry is created - weird problem

2010-02-22 Thread Tom
Ah! Thanks Tom, that fixed it. Tom On Feb 22, 3:27 pm, Tom Evans wrote: > On Mon, Feb 22, 2010 at 3:11 PM, Tom wrote: > > Hi all, > > > I have a view that takes data from a form and saves it in the db.  One > > of the fields is a M2M linking to another model.  The record itself > > saves fine,

Re: Record is saved, but no join table entry is created - weird problem

2010-02-22 Thread Tom Evans
On Mon, Feb 22, 2010 at 3:11 PM, Tom wrote: > Hi all, > > I have a view that takes data from a form and saves it in the db.  One > of the fields is a M2M linking to another model.  The record itself > saves fine, but no entry in the M2M join table is created.  I am > passing the form initial data

Record is saved, but no join table entry is created - weird problem

2010-02-22 Thread Tom
Hi all, I have a view that takes data from a form and saves it in the db. One of the fields is a M2M linking to another model. The record itself saves fine, but no entry in the M2M join table is created. I am passing the form initial data for the M2M in the form of a list of id numbers specifyi

Re: weird problem with django admin models and webfaction

2010-02-22 Thread Shawn Milochik
Did you manually restart the Apache instance for this app? I had a similar problem, and it turned out that I had a bit of code in one of my model that was pulling from a table that was no longer defined. Check for that as well. -- You received this message because you are subscribed to the Go

weird problem with django admin models and webfaction

2010-02-22 Thread Simon Davies
Hi I'm still developing my app and I have just refactored my models in my django app. I dropped most of the existing tables on my local dev machine and then completely rebuilt everything using syncdb, everything worked fine, including the admin, no probs at all. Then I updated everything on my w

Re: weird problem with templates

2009-12-25 Thread gryzzly
Problem is solved. For utf-8 encoded templates you should avoid using BOM (byte order mark). Just turned it off in Komodo Edit and now everything is okay. On Dec 25, 1:50 am, gryzzly wrote: > hi, > while working on templates weird problem occured: > > when templates are being rende

weird problem with templates

2009-12-24 Thread gryzzly
hi, while working on templates weird problem occured: when templates are being rendered (i guess), in code, right before the doctype, strange character is being placed. I call it "strange" because if I select it, copy it and try to paste nothing is pasted. This "dot" is see

Re: Weird problem in url resolving after restarting django dev. server

2009-05-27 Thread Steve Howell
On May 27, 8:23 am, Konstantin S wrote: > On May 26, 9:28 pm, Steve Howell wrote: > > [...] > > Perhaps you can try to step through the code in the debugger.  The top- > > level method involved in reversing URLs are not super complicated. > > You can set a breakpoint in django/core/urlresolver.

Re: Weird problem in url resolving after restarting django dev. server

2009-05-27 Thread Konstantin S
On May 26, 9:28 pm, Steve Howell wrote: > > From the docs you might want to take advantage of the name= parameter > in your URLS setup and do something like {% url 'add_media_action' > %}.  Not sure about the quoting, as the docs are vague about quoting > literals. > > ''' > New in Django 1.0: Pl

Re: Weird problem in url resolving after restarting django dev. server

2009-05-26 Thread Steve Howell
On May 26, 6:43 am, Konstantin S wrote: > On May 20, 2:02 pm, Konstantin S wrote: > > > Hello! > > > I have a very strange problem and really don't know where to start in > > hunting it down. My app uses django-registration, all works fine but > > if I been logged in restart django dev. server

Re: Weird problem in url resolving after restarting django dev. server

2009-05-26 Thread Konstantin S
On May 20, 2:02 pm, Konstantin S wrote: > Hello! > > I have a very strange problem and really don't know where to start in > hunting it down. My app uses django-registration, all works fine but > if I been logged in restart django dev. server I immediately get > TemplateSyntaxError: > > Caught an

Re: Weird problem in url resolving after restarting django dev. server

2009-05-20 Thread Konstantin S
On 20 май, 22:48, Steve Howell wrote: > On May 20, 10:49 am, Konstantin S wrote: > > > > > On 20 май, 19:43, Steve Howell wrote: > > > > To elaborate on Karen's suggestion, one way to see which URLs are > > > among the candidates for resolving the reverse match is to > > > deliberately hit a ba

Re: Weird problem in url resolving after restarting django dev. server

2009-05-20 Thread Steve Howell
On May 20, 10:49 am, Konstantin S wrote: > On 20 май, 19:43, Steve Howell wrote: > > > > > To elaborate on Karen's suggestion, one way to see which URLs are > > among the candidates for resolving the reverse match is to > > deliberately hit a bad URL like the following: > > >http://localhost:800

Re: Weird problem in url resolving after restarting django dev. server

2009-05-20 Thread Konstantin S
On 20 май, 19:43, Steve Howell wrote: > > To elaborate on Karen's suggestion, one way to see which URLs are > among the candidates for resolving the reverse match is to > deliberately hit a bad URL like the following: > > http://localhost:8000/something_that_does_not_match_urls > > If you have ap

Re: Weird problem in url resolving after restarting django dev. server

2009-05-20 Thread Steve Howell
On May 20, 6:41 am, Karen Tracey wrote: > On Wed, May 20, 2009 at 7:28 AM, Konstantin S wrote: > > > On 20 май, 14:02, Konstantin S wrote: > > > Hello! > > > > I have a very strange problem and really don't know where to start in > > > hunting it down. My app uses django-registration, all works

Re: Weird problem in url resolving after restarting django dev. server

2009-05-20 Thread Konstantin S
On 20 май, 17:41, Karen Tracey wrote: > There's got to be some difference between your server > environment and the shell environment you are using that is causing that. > All works fine until I restart django dev. http server. If at that moment I was logged in into my site then next hit after r

Re: Weird problem in url resolving after restarting django dev. server

2009-05-20 Thread Karen Tracey
On Wed, May 20, 2009 at 7:28 AM, Konstantin S wrote: > > On 20 май, 14:02, Konstantin S wrote: > > Hello! > > > > I have a very strange problem and really don't know where to start in > > hunting it down. My app uses django-registration, all works fine but > > if I been logged in restart django

Re: Weird problem in url resolving after restarting django dev. server

2009-05-20 Thread Konstantin S
On 20 май, 14:02, Konstantin S wrote: > Hello! > > I have a very strange problem and really don't know where to start in > hunting it down. My app uses django-registration, all works fine but > if I been logged in restart django dev. server I immediately get > TemplateSyntaxError: > > Caught an e

Weird problem in url resolving after restarting django dev. server

2009-05-20 Thread Konstantin S
Hello! I have a very strange problem and really don't know where to start in hunting it down. My app uses django-registration, all works fine but if I been logged in restart django dev. server I immediately get TemplateSyntaxError: Caught an exception while rendering: Reverse for 'myapp.add_medi

Re: Weird problem with request.POST, correct data not coming out from request.POST

2007-12-18 Thread Jan Rademaker
On Dec 18, 7:14 pm, shabda <[EMAIL PROTECTED]> wrote: > I am trying to get a value from request.POST. After form submit, > request.POST contains the values of the ids from the checkbox > selected. I want the list of those ids. SO I am doing something like, > entry_ids = request.POST['delete'] ,

Weird problem with request.POST, correct data not coming out from request.POST

2007-12-18 Thread shabda
I am trying to get a value from request.POST. After form submit, request.POST contains the values of the ids from the checkbox selected. I want the list of those ids. SO I am doing something like, entry_ids = request.POST['delete'] , but this doesnot pick the list, but instead gets me the last val

Weird problem with Flatpages

2007-09-12 Thread shabda
I have deployed a app on Apache with mod_python. I have the flat pages app+middleware installed. If I let debug = True in my settings.py and try to access any flatpage url they work fine. But if I put the debug = False in settings.py, the flatpages return 500 http respnse. Any way I can try to deb

Re: Weird problem with memcached enabled

2007-08-15 Thread Jeremy Dunck
On 8/15/07, TheMaTrIx <[EMAIL PROTECTED]> wrote: > > This with v1.38 of python-memcached. (still didn't get cmemcached to > build first gona learn some python so I can work my end of running > Django sites a bit better aka systems administration) > > It was released a couple days ago and seems to h

Re: Weird problem with memcached enabled

2007-08-15 Thread TheMaTrIx
Extra note, eventhough Iarsholm's suggestion fixed one problem, I immediately got another error. (2 params passed to a function while it requires 3) This with v1.38 of python-memcached. (still didn't get cmemcached to build first gona learn some python so I can work my end of running Django sites

Re: Weird problem with memcached enabled

2007-08-14 Thread larsholm
Hi What the error says is that it cannot add this together "time.time() + cache_timeout" because on is float and the other is a string, so I suspect that you somewhere have specified *cache_timeout* as a string in quotes instead of just a number (without quotes). Either in the settings.py or in m

Weird problem with memcached enabled

2007-08-14 Thread TheMaTrIx
Firefox = All pages OK Internet Explorer = http://www.domain.com gives HTTP500 error with info: [error] PythonHandler django.core.handlers.modpython: Traceback (most recent call last): [error] PythonHandler django.core.handlers.modpython: File "/usr/lib/ python2.4/site-packages/mod_python/apac