Re: New to Django; walking through djangoproject tutorial; can't get poll to work

2012-12-18 Thread Jeff Tchang
My first guess is that {% for choice in poll.choice_set.all %} is empty. So you have no choices attached to the poll. You can verify this by looking at the generated HTML source and seeing if you have any radio buttons at all. Since you said you didn't that is my guess. I didn't go back and

Re: Strange behavior using ModelForms

2012-12-18 Thread Karen Tracey
On Tue, Dec 18, 2012 at 4:11 PM, Francisco Vianna < francisco.v.via...@gmail.com> wrote: > After some debugging, I realized they become the same after calling > "is_valid" to the bound form. Now, I'm not sure if I am missing something > conceptually about ModelForms binding. > Its very ackward to

New to Django; walking through djangoproject tutorial; can't get poll to work

2012-12-18 Thread Deron
Hi, First post here. I'm extremely new to Django and I have been fumbling my way through the DjangoProject "poll" app tutorial for a couple weeks now. I understand a lot of what's going on, but a lot of things are completely lost on me as well. That said, I'm to the point of actually using the

Re: Strange behavior using ModelForms

2012-12-18 Thread Chris Cogdon
The binding allows the modelform to read the current values of an instance, and also to write them back to the same instance when the values are changed. If you're only ever creating new instances, then you don't need to bind it. On Tuesday, December 18, 2012 6:19:45 PM UTC-8, fvianna wrote: >

Re: Django community, is it active?

2012-12-18 Thread Chris Cogdon
But I _want_ to drink the free bear. On Tuesday, December 18, 2012 3:19:59 PM UTC-8, Cal Leeming [Simplicity Media Ltd] wrote: > > Don't drink the free bear though, ... > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this

Re: Strange behavior using ModelForms

2012-12-18 Thread Francisco Vianna
Because unless I'm getting some real debbuging issues, request.user is also changed during the process. It happens as if all references were pointing to the same object, when i believe thet, as far as I understand these Django machanisms and functionalities, this should not happen. The basic

Re: Django community, is it active?

2012-12-18 Thread donarb
On Tuesday, December 18, 2012 1:36:42 PM UTC-8, sparky wrote: > > > ... I'm also finding it hard to find any user groups locally in the UK > (I'm based in Manchester, UK). > > Sometimes Django does not have enough of a user base in an area for its own group, you might want to check out the

Re: Django community, is it active?

2012-12-18 Thread Cal Leeming [Simplicity Media Ltd]
Hi Sparky, I've personally been using Django for approximately 3 years now - so I'll offer you my own opinion. In some ways, it is the most beautiful/perfect framework currently available.. and in other ways, it leaves a sense of disappointment and frustration. * Community - possibly one of the

Re: Templates not found

2012-12-18 Thread Sithembewena Lloyd Dube
Thank you Sergiy and @donarb - my urls.py file was wrng as described by @donarb. On Wed, Dec 12, 2012 at 6:38 PM, donarb wrote: > When you used the shell, you imported 'tracks.views' but in your urls.py, > you have musicsite.views.home. The two don't match. > > > On

Re: trouble with pre_delete signal method

2012-12-18 Thread Mike Dewhirst
Thomas Thanks for replying On 19/12/2012 12:06am, Thomas Orozco wrote: Hi, Could you provide the following information? - What's the relationship between A and B (model code of the field, if there is, would be great) There is no relationship at all. A and B are separately and

Re: Django community, is it active?

2012-12-18 Thread sparky
thanks Nik, On Tuesday, December 18, 2012 9:36:42 PM UTC, sparky wrote: > > I'm hoping this is the right place to ask such questions, please forgive > me if not. > > I'm making a real time investment in learning another server side > language. I have 10 years ColdFusion, 5 years PHP, JAVA.

Re: Django community, is it active?

2012-12-18 Thread Nikolas Stevenson-Molnar
I expect that most of the people on this list have chosen Django for their project(s), which would probably make our view a little skewed ;) That said, the thread you reference is basically a framework religion war. You may have noticed: there are extremely negative comments about every framework

Django community, is it active?

2012-12-18 Thread sparky
I'm hoping this is the right place to ask such questions, please forgive me if not. I'm making a real time investment in learning another server side language. I have 10 years ColdFusion, 5 years PHP, JAVA. Having never touched Python let alone the framework Django, for the past 4 weeks I

Re: invalid syntax inside urls.py

2012-12-18 Thread carlos
and coma before url admin !!! Cheers On Tue, Dec 18, 2012 at 3:32 PM, Chris Cogdon wrote: > Need a comma between the view name, and {'queryset...' and your > parenthesis are not nested properly. > > > On Tuesday, December 18, 2012 12:19:24 PM UTC-8, maiquel wrote: >> >> 'm

Re: Converting Django app into a Desktop app

2012-12-18 Thread Chris Cogdon
Personally, I'd prefer something that didn't require packaging up additional programs (xampp and python, in this example). It should be _perfectly possible_ to find a native-python moderate performance webserver, then wrap up that, django, the application and the python interpreter into a

Re: invalid syntax inside urls.py

2012-12-18 Thread Chris Cogdon
Need a comma between the view name, and {'queryset...' and your parenthesis are not nested properly. On Tuesday, December 18, 2012 12:19:24 PM UTC-8, maiquel wrote: > > 'm trying to do the following > > Artigo.objects.all () inside urls.py > > urlpatterns = patterns ('', > # url (r '^ blog

Re: Strange behavior using ModelForms

2012-12-18 Thread Chris Cogdon
Rather than comparing to instance, why not compare to request.user ? On Tuesday, December 18, 2012 1:11:21 PM UTC-8, fvianna wrote: > > Hello everyone, > > I want to apologize if I came to the wrong place to talk about this, but > I've been using Django for a while now, and crossed to a very

Strange behavior using ModelForms

2012-12-18 Thread Francisco Vianna
Hello everyone, I want to apologize if I came to the wrong place to talk about this, but I've been using Django for a while now, and crossed to a very strange behavior that hits me as bug, but I'm not quite sure. First time trying to get a little deeper and maybe report something to help the

invalid syntax inside urls.py

2012-12-18 Thread maiquel
'm trying to do the following Artigo.objects.all () inside urls.py urlpatterns = patterns ('', # url (r '^ blog / $', 'blog.views.archive_index.index') (r '^ $', 'django.views.generic.date_based.archive_index' {'queryset': Artigo.objects.all ()), # invalid syntax

Re: Converting Django app into a Desktop app

2012-12-18 Thread peter
On 12/18/2012 05:18 PM, Chris Cogdon wrote: No Python included with xampp... this makes me sad ;_; On Tuesday, December 18, 2012 11:43:56 AM UTC-8, peter_julian wrote: You can use xampp. Create a automatic installer that install xampp and django with your app. Just like Kordi

Re: Converting Django app into a Desktop app

2012-12-18 Thread peter
On 12/18/2012 05:18 PM, Chris Cogdon wrote: No Python included with xampp... this makes me sad ;_; On Tuesday, December 18, 2012 11:43:56 AM UTC-8, peter_julian wrote: You can use xampp. Create a automatic installer that install xampp and django with your app. Just like Kordi

Re: template caching context variables when no caching enabled.

2012-12-18 Thread Chris Cogdon
Parameter 2 to "render_to_response" is only expecting a dictionary, not a Context/RequestContext, so, it will grab your 'dictionary-like object' and wrap it in its own Context, meaning that none of your template context processors will run (since those require a RequestContext) I suggest

Re: Converting Django app into a Desktop app

2012-12-18 Thread Chris Cogdon
No Python included with xampp... this makes me sad ;_; On Tuesday, December 18, 2012 11:43:56 AM UTC-8, peter_julian wrote: > > You can use xampp. Create a automatic installer that install xampp and > django with your app. > Just like Kordi EDMS. http://www.kordil.net/. > -- You received

Re: problem with timeout

2012-12-18 Thread Chris Cogdon
Nice find! If you turn debugging on for "django.db.backends", it will show you what SQL queries are being issued, and the time taken for each. LOGGING['handlers']['console'] = { 'level':'DEBUG', 'class': 'logging.StreamHandler' } LOGGING['loggers']['django.db.backends'] = {

Re: cached template loader

2012-12-18 Thread Chris Cogdon
your two versions are actually identical :) The missing comma, I assume, was missing after django.template.loaders.app_directories.Loader ... without the comma there, python sees two strings right next to each other, and thus concatenates them, resulting in a single parameter :

Re: web gui for email server

2012-12-18 Thread Chris Cogdon
I don't know of any. (Nothing comes up on http://www.djangopackages.com/grids/g/email/) But I might be able to say why you might not find any. Desktop e-mail clients usually consist of the interface plus a local cache. The client connects to the mail storage and (via POP or IMAP) retrieves

Re: Converting Django app into a Desktop app

2012-12-18 Thread peter
On 12/18/2012 04:27 PM, Loai Ghoraba wrote: @ all thanks for your responses, I will try to investigate them @Chris: you got me right :) I can use runserver, but it would be too light, or make the client install and configure apache (which is not a good idea if the client is a normal user, not

Re: Converting Django app into a Desktop app

2012-12-18 Thread Loai Ghoraba
@ all thanks for your responses, I will try to investigate them @Chris: you got me right :) I can use runserver, but it would be too light, or make the client install and configure apache (which is not a good idea if the client is a normal user, not a programmer). On Tue, Dec 18, 2012 at 9:23

Re: Converting Django app into a Desktop app

2012-12-18 Thread Chris Cogdon
I think what Loai is asking for is a way to "wrap up" the python/django application, along with a light-weight webserver (not as light-weight as "runserver" though), so it looks like a stand-alone application... apart from needing to run a web browser to connect to it. I, too, am very

Re: Converting Django app into a Desktop app

2012-12-18 Thread acheraime
Use a module like tastiepy develop your desktop client in your preferred language and have it communicate to django via REST. Sent from my iPhone On Dec 18, 2012, at 1:43 PM, Jonas Geiregat wrote: > > >> Hi >> >> I am very comfortable with Django, and I was wondering

Re: Converting Django app into a Desktop app

2012-12-18 Thread Jonas Geiregat
> Hi > > I am very comfortable with Django, and I was wondering about whether there is > some way to convert a Django web app into a Desktop app (may be not 100%), so > that I can distribute it to users. May be wrapping it in a light web server > "if there is something like this". > > >

Re: template caching context variables when no caching enabled.

2012-12-18 Thread John Tipton
I believe I may have solved it, this is the view that kept causing it to happen: def document_revert(request, pk): version = get_object_or_404(reversion.models.Version, pk=pk) document_version = version.object_version.object context = RequestContext(request, {'document':

template caching context variables when no caching enabled.

2012-12-18 Thread John Tipton
I've got the following function that I include in my views to set context variables. Occasionally my templates start caching these variables, no matter what model my views are based on. def set_context_vars(context, model, request=None): """ Set Extra Context Variables """

Templates caching context when it shouldn't

2012-12-18 Thread John Tipton
I've got the following function that I include in my views to set context variables: http://dpaste.org/FIZnG/. Occasionally my templates start caching these variables, no matter what model my views are based on. I do not have any caching enabled as far as I know, and the console prints the

web gui for email server

2012-12-18 Thread davidjensen
I am using the mailgun emailserver which has an api but not a web gui. mailgun suggests using an desktop client. Are there web guis for email servers written for django? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion

Converting Django app into a Desktop app

2012-12-18 Thread Loai Ghoraba
Hi I am very comfortable with Django, and I was wondering about whether there is some way to convert a Django web app into a Desktop app (may be not 100%), so that I can distribute it to users. May be wrapping it in a light web server "if there is something like this". Thanks -- You

Re: 【HELP】AttributeError: 'AdminSite' object has no attribute 'urls'

2012-12-18 Thread Thomas Orozco
Haha indeed, silly me! Well I think that's the error cause then : the urls property apparently didn't exist in Django 1.0! Cheers, Thomas On Dec 18, 2012 3:14 PM, "Ramiro Morales" wrote: > On Tue, Dec 18, 2012 at 10:12 AM, Thomas Orozco wrote: > > What

Re: getting "DateTimeField received a naive datetime" error but have no DateTimeFields

2012-12-18 Thread bobhaugen
Tom, thank you for that very useful tip! My feeble python-fu has now been strengthened. On Monday, December 17, 2012 8:27:28 AM UTC-6, Tom Evans wrote > > > Following the thread I see that you have figured out where and why > this is coming from. There is a simple tip you can use to speed this

Re: 【HELP】AttributeError: 'AdminSite' object has no attribute 'urls'

2012-12-18 Thread Ramiro Morales
On Tue, Dec 18, 2012 at 10:12 AM, Thomas Orozco wrote: > What version of django are you using? > > admin.site.urls was introducd four years ago > (https://github.com/django/django/commit/1f84630c87f8032b0167e6db41acaf50ab710879), > but maybe you're running an older version? On

Re: 【HELP】AttributeError: 'AdminSite' object has no attribute 'urls'

2012-12-18 Thread vinoth kumar renganathan
1 . check whether u imported url in the file mysite/urls.py 2.make sure that you added url before the command(r'^admin/', include(admin.site.urls)) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: 【HELP】AttributeError: 'AdminSite' object has no attribute 'urls'

2012-12-18 Thread Thomas Orozco
What version of django are you using? admin.site.urls was introducd four years ago ( https://github.com/django/django/commit/1f84630c87f8032b0167e6db41acaf50ab710879), but maybe you're running an older version? Best, Thomas 2012/12/15 向浩 > Environment: > > Request

Re: trouble with pre_delete signal method

2012-12-18 Thread Thomas Orozco
Hi, Could you provide the following information? - What's the relationship between A and B (model code of the field, if there is, would be great) - The code of your pre_delete signal handler / the method it calls. I think you have a ForeignKey field that is required or limited and that

Re: cached template loader

2012-12-18 Thread Tom Martin
I had the same problem and discovered that I was missing a comma in the settings file: TEMPLATE_LOADERS = ( ('django.template.loaders.cached.Loader, ( 'django.template.loaders.app_directories.Loader', 'django.template.loaders.filesystem.Loader, )) ) should have been:

Python Django Rockstars- I need you

2012-12-18 Thread Seena Shah
I am currently urgently looking for some amazing Python Django Rockstars to join my client in Berlin. They offer great benefits and a fantastic working environment. please contact me on seena.s...@darwinrecruitment.com if you want to hear more. -- You received this message because you are

Re: Theming Django with Diazo/XSLT

2012-12-18 Thread 4 The good Life we work
Hallo Ariel, thank you for letting me know. I've looked at the site and will give it a try. Thanks, Michael On 12/18/2012 11:03 AM, Ariel Calzada wrote: > Hi Michael! > > Django doesn't use approach of DIAZO/XSLT theming by default. You can > use diazo in an indepedently way ( > WSGI

Re: Theming Django with Diazo/XSLT

2012-12-18 Thread Ariel Calzada
Hi Michael! Django doesn't use approach of DIAZO/XSLT theming by default. You can use diazo in an indepedently way ( WSGI http://docs.diazo.org/en/latest/quickstart.html ). Regards, ARIEL 2012/12/18 4 The good Life we work <4thegdl...@googlemail.com> > Hallo Derek, > > thank for your reply. I

Re: Theming Django with Diazo/XSLT

2012-12-18 Thread 4 The good Life we work
Hallo Derek, thank for your reply. I was thinking about the templates. The admin area is fine for now, though it could be changed through diazo too if needed. Thanks, Michael On Tue 18 Dec 2012 08:28:12 AM CET, Derek wrote: > You do not say which part of Django you need to theme. Assuming its

Re: IntegrityError

2012-12-18 Thread Satinderpal Singh
On Tue, Dec 18, 2012 at 12:25 PM, Sandeep kaur wrote: > On Tue, Dec 18, 2012 at 2:48 AM, Satinderpal Singh > wrote: >> I created a search box for searching the information about the client >> so that this information uses to create the report.

Re: IntegrityError

2012-12-18 Thread Satinderpal Singh
On Tue, Dec 18, 2012 at 11:21 AM, Chris Cogdon wrote: > Can you post the code for the model, and the complete exception trace? class head(models.Model): job = models.ForeignKey(Job, null=True) Header_column_1 = models.CharField(max_length=255,blank=True)