Re: django guru

2013-02-18 Thread Russell Keith-Magee
Hi Mike, Non-disclosure might prevent you from giving out specifics about the client and the project, but some basic, non-specific details will help you get much better responses -- Where is the job located? Are they open to telecommuting? If so, what timezone are they in? Is it a backend/server s

Re: Error passing data from views to template

2013-02-18 Thread Pankaj Singh
Hey Tiago, > Exception Value: 'str' object has no attribute 'update' It means that context_instance variable passed to render_to_string() is of str type. context_instance needs to be an instance of django.template.context.Context class. Example use of render_to_string - from django.template.l

Re: Conflict of admin applications for jquery

2013-02-18 Thread Pankaj Singh
Hey, By default, Django's Admin moves the jQuery namespace into a custom one, django.jQuery, to prevent conflicts[1]. So core of django admin won't get affected until and unless you override django.jQuery. I understand why developers plug in latest jquery version, but why Django > is stuck with j

Re: Django 1.5 AbstractBaseUser with char primary key not JSON serializable

2013-02-18 Thread Kaloian
Hi Russel, Great to see this documented. I will most probably go with the "api_key *in addition* to the integer primary key" solution to avoid additional problems. Thanks, Kaloian On Saturday, February 16, 2013 4:25:41 AM UTC+2, Russell Keith-Magee wrote: > > Hi Kaloian, > > Ah - you've just fi

Re: django guru

2013-02-18 Thread Mike Dewhirst
On 18/02/2013 6:50pm, Mike Dewhirst wrote: I'm looking for a Django guru to help with some debugging. As suggested by Russell here is some detail ... The design is moderately complex with all business rules built into model methods. The prototype is well advanced and based entirely on Django

Custom Http404 like exception

2013-02-18 Thread Serge G. Spaolonzi
Hi, How does the Http404 exception works internally? I want to make the same but with for a 401 code and a custom redirection according to the resource to be accessed. I have thought about using a middleware to archive this but I am not sure if it is standard way used by 'django.http.Http404'. Th

ask: user management for Single site, multi client apps

2013-02-18 Thread Bino Oetomo
Dear All. I'm trying to write a single site application that will used by multi client. it's about Cell Site Co-location management. So there will be some Network operators, and some cell-Site Providers Let's say that : 1. Network operators is : mno1, mno2, mno3, and 2. cell-site providers is :

Re: Jython + Django on JBoss

2013-02-18 Thread Jochen Breuer
This is something I'm particularly interested in too, since one of our clients has a "everything Java" policy. Now we could implement everything with Play!, but I would rather like to use Django and deploy to JBoss. Jython and Django seem to make it very easy: http://blog.leosoto.com/2008/08/de

Templates error on partial rendering

2013-02-18 Thread andrea crotti
I have a case where we use django templates, but it really makes no sense to render the templates if a value is not passed in the contentx, and it should just fail.. I don't find anywhere how to force that though, I understand the default of failing silently but there should be a way also to fa

Re: Custom Http404 like exception

2013-02-18 Thread Pankaj Singh
Hey Serge, Here is a brief description of how status code is set in request response cycle of Django. *Http404* inherits from *Exception* defined here - https://github.com/django/django/blob/1.4.3/django/http/__init__.py#L132-L133 *get_response() method of django.core.handlers.base.BaseHandler h

Is it necessary to restart server after a change?

2013-02-18 Thread frocco
Hello, In PHP, if I make a change to the database query, like adding a where clause to filter only active records, the user sees the change on the next browser refresh. In django, it seems I have to restart the server and knock everyone off. I am a newbie, so is there a better way? I just start

Re: Is it necessary to restart server after a change?

2013-02-18 Thread Pankaj Singh
Hey, Touching wsgi.py file is enough. Find more details at http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode#Reloading_In_Daemon_Mode Sincerely, Pankaj Singh http://about.me/psjinx On Mon, Feb 18, 2013 at 7:56 PM, frocco wrote: > Hello, > > In PHP, if I make a change to the database q

error in my templates

2013-02-18 Thread Avnesh Shakya
NoReverseMatch at / *Reverse for 'myapp_about' with arguments '()' and keyword arguments '{}' not found. i m adding here files, plz help me.. thanks in advance * -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this g

Re: Custom Http404 like exception

2013-02-18 Thread Serge G. Spaolonzi
Thanks Pankaj, In this case I could not use an HttpResponse because the helper method I am developing doesn't return a respose it returns a dict or raises an exception if the user is not authenticated. For example: def get_server_time(request): time_dictionary = helper_method() #Rest

Django Project on Heroku

2013-02-18 Thread Jingqiang Zhang
http://djangoproject.herokuapp.com/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email

Re: Templates error on partial rendering

2013-02-18 Thread Pankaj Singh
Hey Andrea, Please have a look at http://stackoverflow.com/questions/4300442/show-undefined-variable-errors-in-templates Put this in your debug settings: class InvalidString(str): def __mod__(self, other): from django.template.base import TemplateSyntaxError raise TemplateSyn

Re: Django Project on Heroku

2013-02-18 Thread Thiago Avelino
for that? Cheers, Thiago Avelino On Mon, Feb 18, 2013 at 11:42 AM, Jingqiang Zhang wrote: > http://djangoproject.herokuapp.com/ > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving email

Re: Custom Http404 like exception

2013-02-18 Thread Tom Evans
On Mon, Feb 18, 2013 at 2:41 PM, Serge G. Spaolonzi wrote: > Thanks Pankaj, In this case I could not use an HttpResponse because the > helper method I am developing doesn't return a respose it returns a dict or > raises an exception if the user is not authenticated. > For example: > > def get_ser

Re: Is it necessary to restart server after a change?

2013-02-18 Thread frocco
Thank you, so touching wsgi.py will make it reload? That's great, I am also learning linux. :-) On Monday, February 18, 2013 9:26:40 AM UTC-5, frocco wrote: > > Hello, > > In PHP, if I make a change to the database query, like adding a where > clause to filter only active records, the user sees t

Re: Is it necessary to restart server after a change?

2013-02-18 Thread Pankaj Singh
Hey, so touching wsgi.py will make it reload? Please have a look at http://en.wikipedia.org/wiki/Touch_(Unix) *touch* is a standard Unix program used > to change a file

Migrating existing auth.User users to Django 1.5 Custom User table

2013-02-18 Thread Ben Roberts
I assume, when Django 1.5 hits the public in 2014 >;) that many will want to take advantage of some facet of the new pluggable User models. You may, like me, want to add an additional column (field) or two in your custom User. E.g.: class SiteUser(AbstractUser): site = models.ForeignKey

Re: Migrating existing auth.User users to Django 1.5 Custom User table

2013-02-18 Thread Tom Evans
On Mon, Feb 18, 2013 at 4:33 PM, Ben Roberts wrote: > I assume, when Django 1.5 hits the public in 2014 >;) that many will want to > take advantage of some facet of the new pluggable User models. You may, > like me, want to add an additional column (field) or two in your custom > User. > > E.g.:

Re: Error passing data from views to template

2013-02-18 Thread Jason Arnst-Goodrich
return render_to_response('home/about.html', data, 'context_instance=RequestContext(request)') Change that to: return render_to_response('home/about.html', data, context_instance=RequestContext(request)) The context_instance is an optional keyword argument. Right now you're passing it as a po

Question about not hardcoding paths in settings.py

2013-02-18 Thread frocco
Hello, I have a site under apache www root. www mysite templates media static I am following the two-scoops book. The problem is that my app is looking for templates at www/templates Here is my settings. Thanks from unipath import Path PROJECT_ROOT = Path(__file__).ancestor(3) M

django-quickview v0.1 released - proof-of-concept/comments wanted

2013-02-18 Thread Thomas Weholt
Hi, I looked for django-announcements to post this in, but didn't find at groups.google.com. If this is not the place for such announcements I'm sorry. Anyway; Being somewhat underwhelmed by class based views due to the repetative coding in urls.py etc I tried to see if I could get generic scaffo

How can i run system level tests using djangos testing framework

2013-02-18 Thread calum mchaffie
I want to be able to run my system level integration tests using djangos LiveServerTestCase. It doesnt make sense to have the tests in the app as it uses more than just the app. So my problem is how do i get django to run the tests when they are in the project folder (not the app)? -- You

Re: How can i run system level tests using djangos testing framework

2013-02-18 Thread Nikolas Stevenson-Molnar
How about creating a 'testing' app specifically for full-project tests? _Nik On 2/18/2013 1:48 PM, calum mchaffie wrote: > I want to be able to run my system level integration tests using > djangos LiveServerTestCase. > > It doesnt make sense to have the tests in the app as it uses more than > j

Re: How can i run system level tests using djangos testing framework

2013-02-18 Thread calum mchaffie
I have thought about that, but would prefer not to if i can avoid it, seems alot of extras just for some tests On Tuesday, February 19, 2013 10:51:24 AM UTC+13, Nikolas Stevenson-Molnar wrote: > > How about creating a 'testing' app specifically for full-project tests? > > _Nik > > On 2/18/2013

Re: How can i run system level tests using djangos testing framework

2013-02-18 Thread Nikolas Stevenson-Molnar
True, but as far as I can tell, Django's testing framework seems to revolve around apps, and you need to group your system-wide test somewhere anyway, might as well be in an app. It doesn't need to have much, just a blank models.py file, and a tests.py with your tests. Alternatively, you could cre

Re: Increase sqlite3 database size

2013-02-18 Thread Hiral Shah
Thank you very much Mikolas and Dennis! I understand what are you trying to say but why is the data not going to the database? Regards, Hiral On Sunday, February 17, 2013 6:14:15 PM UTC-8, Hiral Shah wrote: > > Hi All, > > Thanks in advance for your help! > > I am working on back-end to fill

Re: Increase sqlite3 database size

2013-02-18 Thread Nikolas Stevenson-Molnar
Can you provide more info on how you're getting the data into the database (e.g., via the admin?), and the ORM expression you're using to try to find it? _Nik On 2/18/2013 2:14 PM, Hiral Shah wrote: > > Thank you very much Mikolas and Dennis! > > I understand what are you trying to say but why

Re: Error passing data from views to template

2013-02-18 Thread Tiago Carvalho
Thank you very much both (Jason and psjinx). It resolved my problem. This was my first post in this Django users group. Nice to see that Django has such a helpfull community users. On Monday, February 18, 2013 5:25:53 PM UTC, Jason Arnst-Goodrich wrote: > > return render_to_response('home/abo

does LiveServerTestCase work with gunicorn

2013-02-18 Thread calum mchaffie
I am running an app in django with gunicorn. I am trying to use selenium to test my app but have run into a problem. I need to create a test server like is done with djangos LiveServerTestCase that will work with gunicorn. Does anyone have any ideas of how i could do this? note: could also u

Re: Django Project on Heroku

2013-02-18 Thread Russell Keith-Magee
Hi Jingiqang Zhang, I'm not clear on what you've done here. If you're proposing this as a new format/style for the Django project website, I have to advise that this is not a good start - it doesn't match any of the Django project's style guidelines (our trademark colours and fonts, for example).

Re: How to make django's mysql connections to use utf8mb4 ?

2013-02-18 Thread Peter of the Norse
Triple check your encoding type on the database and table. MySQL is often stupid about encoding, and when Django tries to do the right thing, it fails. I once converted a MySQL database from PHP to Django, and ran into a similar problem. Everything on the old database was marked Latin1, but web

Re: Custom Http404 like exception

2013-02-18 Thread Serge G. Spaolonzi
Thanks, It worked. On Mon, Feb 18, 2013 at 1:00 PM, Tom Evans wrote: > On Mon, Feb 18, 2013 at 2:41 PM, Serge G. Spaolonzi > wrote: > > Thanks Pankaj, In this case I could not use an HttpResponse because the > > helper method I am developing doesn't return a respose it returns a dict > or > >

[no subject]

2013-02-18 Thread Zhao Quan
Hi all, I fish for django. So, I want to use some code to handle use login and registion issue. I find the code name "django-userena" But, after I follow the guide to setup. http://docs.django-userena.org/en/latest/installation.html I get exception like this: NameError: name 'UsernaBaseProfile' i

Re:

2013-02-18 Thread Pankaj Singh
Hey, You need to import UserenaBaseProfile in your models.py before defining MyProfile class. from userena.models import UserenaBaseProfile http://docs.django-userena.org/en/latest/installation.html#profiles Sincerely, Pankaj Singh http://about.me/psjinx On Tue, Feb 19, 2013 at 12:36 PM, Zhao

Re:

2013-02-18 Thread Zhao Quan
thanks Pankaj for replay my question so quickly. :) I already add this code in models.py code as below. I place it under path "mysite/accounts/models.py" models.py from django.db import models # Create your models here. f

Re:

2013-02-18 Thread Zhao Quan
thanks I resolve that issue, seems the parameter miss a 'e'. On Tue, Feb 19, 2013 at 3:15 PM, Zhao Quan wrote: > thanks Pankaj for replay my question so quickly. :) > > I already add this code in models.py > code as below. > I place it under path "mysite/accounts/models.py" > >

Re:

2013-02-18 Thread Pankaj Singh
Right. 'UsernaBaseProfile' should be 'UserenaBaseProfile'. Sincerely, Pankaj Singh http://about.me/psjinx On Tue, Feb 19, 2013 at 12:53 PM, Zhao Quan wrote: > thanks I resolve that issue, > seems the parameter miss a 'e'. > > > On Tue, Feb 19, 2013 at 3:15 PM, Zhao Quan wrote: > >> thanks Pan