Display Video inside a Text field -Django Templates

2012-04-27 Thread Nikhil Verma
Hi All I have a TextField to which after applying css it looks like a markup editor where i write some text, paste file links upload image etc.Now if the user paste a video link to that editor the video should display inide that editor/TextField like in other websites eg: facebook(On click Video

Re: outdated django book

2012-04-27 Thread Jonathan D. Baker
You need to import User from django.contrib.auth.models and login_required from django.contrib.auth.decorators. Hope this helps. Sent from my iPhone On Apr 27, 2012, at 8:09 PM, knowledge_seeker wrote: > My Django book (from the university library) said to add

outdated django book

2012-04-27 Thread knowledge_seeker
My Django book (from the university library) said to add the label "@login_required" to views that I wish to restrict user access on. Django 1.4 does not allow this; obviously the book is dated! Is there a more modern way to get the same effect? Similarly, admin does not allow access to my

Re: Cache for individualt request.user???

2012-04-27 Thread Nikolas Stevenson-Molnar
I realize this post is a bit old now. But I believe you could resolve this issue by adding @vary_on_cookie like so: @login_required @vary_on_cookie def webapp(request): ... You'll want to test it, of course, but that should create a different cache for each user (since session info is stored

Re: deploying django - including third party apps

2012-04-27 Thread Babatunde Akinyanmi
Asides Shawn's answer, alwaysdata's documentation educates how to install packages on the host On 4/26/12, Shawn Milochik wrote: > There's no reason a user couldn't run virtualenv, regardless of permissions. > > Download the virtualenv tarball and extract it. It contains a

Re: Django Database

2012-04-27 Thread Daniel Sokolowski
(Your site's contact us emails don't seem to work, hence below is a copy of my response to you) Mr Everett, It's unfortunate about your past developer but their loss could be an opportunity for the KL Insight that I work for. My name is Daniel Sokolowski and I can proudly tell you that I am

Django Database

2012-04-27 Thread ActNow
I am not sure I asking the right question. I need help with my website. The person use Django and now is no were to be found. I need someone to contact me that knows Django. The website www.theblackchurches.org. Anyone can reach me by e-mail or phone 972-987-6166. Thanks J. Everett -- You

Re: Django - Worldwide Developer Rates - Hourly Income - location and project duration specific

2012-04-27 Thread Raphael Reumayr
hello Kenneth, your way is a common practice - so do a lot of others even in Europe. But please extract the hourly rate in USD depending on project sum and spent hours. So you will be able to calculate the hourly rate. Link: http://develissimo.com/forum/topic/107887/ Thank you very much for

Re: Does adding editable=False to model require a data migration?

2012-04-27 Thread Micky Hulse
>From the docs: editable Field.editable If False, the field will not be editable in the admin or via forms automatically generated from the model class. Default is True. So, it reads like I can add the editable argument to the field without having to migrate my data? Thank you. Cheers, M --

Does adding editable=False to model require a data migration?

2012-04-27 Thread Micky Hulse
Quick question: Does adding editable=False to an existing model field require a data migration? Thanks! M -- 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

Re: keep models simple ? where to put the business logic ?

2012-04-27 Thread Daniel Sokolowski
Michael, I’m split on this – I think it really depends on the situation. If these access methods are like low level api to be used in higher end code I would then throw a custom error and use debug level log only, then in your view I would catch an error when NoDataReturned and log it as

Re: Django deployment practices -- do people use setup.py?

2012-04-27 Thread Daniel Sokolowski
Hi Simon, I read your blog and am wondering if you considered the ‘pip install –e’ (edit) option of pip? I use it and it does what you are trying achieve with git submodules. For example: $ pip install -e git+git://github.com/danielsokolowski/django-chunks.git#egg=danols-django-chunks

Re: How to serve files to client?

2012-04-27 Thread Daniel Sokolowski
Hey Atul, I’ve posted the internal code we use as base from project to project - https://github.com/danielsokolowski/django-filelibrary – hope that helps. From: atul khairnar Sent: Friday, April 27, 2012 1:18 AM To: django-users Subject: How to serve files to client? Hi all, I have a

Re: Error: 'module' object is not callable

2012-04-27 Thread Tom Evans
On Fri, Apr 27, 2012 at 4:03 PM, bruno desthuilliers wrote: > On Apr 27, 2:30 pm, Tom Evans wrote: >> >> The datetime class lives inside the datetime module. > > So far so good but! > >> You must have >> "import datetime" in that code,

Re: Error: 'module' object is not callable

2012-04-27 Thread bruno desthuilliers
On Apr 27, 2:30 pm, Tom Evans wrote: > > The datetime class lives inside the datetime module. So far so good but! > You must have > "import datetime" in that code, perhaps as well as "from datetime > import datetime". The first statement will import the datetime

Re: Django - Worldwide Developer Rates - Hourly Income - location and project duration specific

2012-04-27 Thread kenneth gonsalves
On Fri, 2012-04-27 at 08:47 +0200, Raphael Reumayr wrote: > thanks for sharing your project data - this should boost developers > income worldwide. Know what you are worth! In my country we do not charge by the hour - we try to guess how much the client is willing to pay, and quote a sum higher

Re: Error: 'module' object is not callable

2012-04-27 Thread Tom Evans
On Fri, Apr 27, 2012 at 6:46 AM, Gopi Kirupanithi wrote: > Actually I am using datetime object for comparing two date inputs. > > if datetime(fromdtpart[2],fromdtpart[1],fromdtpart[0]) < > datetime(todtpart[2], todtpart[1], todtpart[0]): > > while execute the above line, I

Re: Error: 'module' object is not callable

2012-04-27 Thread Timothy Makobu
How are you importing datetime? In python 2.7, import datetime datetime.datetime() is callable not datetime() by itself. On Fri, Apr 27, 2012 at 8:46 AM, Gopi Kirupanithi wrote: > Actually I am using datetime object for comparing two date inputs. > > if

Re: Custom commands for manage.py

2012-04-27 Thread bruno desthuilliers
On Apr 26, 11:50 pm, "." wrote: > Hello, > > I have several questions connected with custom commands. > > 1. How to delete anything from this dict? Is there a specific method > for this? [1] > > >>> Poll.objects.all() > > [] This is not a dict, it's a QuerySet containing one

join email group

2012-04-27 Thread fei li
i want to know everything about django. -- 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 email to

Error: 'module' object is not callable

2012-04-27 Thread Gopi Kirupanithi
Actually I am using datetime object for comparing two date inputs. if datetime(fromdtpart[2],fromdtpart[1],fromdtpart[0]) < datetime(todtpart[2], todtpart[1], todtpart[0]): while execute the above line, I got the " 'module' object is not callable " error. Anybody can explain why this error

Re: DeleteView example with template

2012-04-27 Thread Steve Kilbane
I'll take a look - many thanks, Ejah. steve On Apr 27, 9:17 am, Ejah wrote: > You might want to take a look at godjango.com for some nice short > intro videos on generic class based views, and the source code. -- You received this message because you are subscribed to

Re: ModelForms

2012-04-27 Thread bruno desthuilliers
On Mar 23, 12:46 am, hack wrote: > I think I shot myself in the foot using ModelForms to generate all of my > html forms.  Is there any way to use a stylesheet when your forms are > generated from ModelForms? Yes of course, why ? > I've tried everything and cannot get it

Re: Can't find module

2012-04-27 Thread bruno desthuilliers
On Apr 27, 3:56 am, Gerald Klein wrote: > Hi, I am having a strange problem, I have a search module named 'search' > but Django states ;No module named search full traceback please ? > here is my url > > url(r'^search/$', 'cms.search.views.search'), is the cms.search app in

Re: keep models simple ? where to put the business logic ?

2012-04-27 Thread bruno desthuilliers
On Apr 23, 3:45 pm, Javier Guerra Giraldez wrote: > On Mon, Apr 23, 2012 at 6:47 AM, bruno desthuilliers > > wrote: > > Models - like any other module - should indeed be "as simple as > > possible", _but not simpler_. If you concern is about

Re: keep models simple ? where to put the business logic ?

2012-04-27 Thread bruno desthuilliers
On Apr 24, 1:32 pm, Michael Palumbo wrote: > Hi guys, > > Thanks for your answers, it helps. > > - Anemic domain model : I didn’t know about this before, it is good to know. > - Daniel : if I split my models and import all of them in my __ini__.py > file, why do I

Re: Soap web services with Soaplib in Django

2012-04-27 Thread Meenakshi Ithape
I solve this issue On Friday, 27 April 2012 12:39:59 UTC+5:30, Meenakshi Ithape wrote: > > Thanks for the reply, > I already done this & i create client using suds,& also create the view > for that client, display message on the browser. > But now i have another issue, > I create the client,

Re: Soap webservice with soaplib & suds

2012-04-27 Thread Meenakshi Ithape
I done this, thanks for the reply On Friday, 27 April 2012 12:31:50 UTC+5:30, Meenakshi Ithape wrote: > > Thanks for the reply, i already done this, & my problem is solved. > But now i have another issue, > how to send the object to the web_service method or how to check the > methods

Re: Web services.

2012-04-27 Thread Tom Evans
On Thu, Apr 26, 2012 at 4:20 PM, Sherif Shehab Aldin wrote: > Hi All, > > I am developing some django apps, mostly they are adds to the django admin > interface... What I need to do a lot is adding some Ajax calls, but I am a > bit confused about weather It's better to

Re: DeleteView example with template

2012-04-27 Thread Ejah
As the docs mention, yes, it does. You provide a pk or slug via the url, identifying the object to be deleted. You can add a form_class to specify the content of the associated form, a model to tell django which model to use when looking for the object to delete and a template_name to layout your

Raw SQL and modelformset

2012-04-27 Thread David
Hi I have a known working rawsql queryset that I am trying to use in my modelformset formset = ModelFormSet(queryset=q). When trying this I receive the following error: 'RawQuerySet' object has no attribute 'ordered' Can Raw SQL querysets be used for modelformsets? Thank you -- You

RE: Developing first Django Site -- any advice on co-developing effectively with a professional?

2012-04-27 Thread Oscar Mederos
-Original Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Ejah Sent: Friday, April 20, 2012 11:29 AM To: Django users Subject: Re: Developing first Django Site -- any advice on co-developing effectively with a professional? Looking at

Re: Testing Google Charts within Django Unit Tests

2012-04-27 Thread Mario Gudelj
Yeah, selenium is your friend in this case On 27/04/2012 3:07 PM, "Jonas Geiregat" wrote: > > > > I'm looking for a way to test the data that a google chart displays on > > a web site with a unit test. Is this at all possible, and if so, where > > should I look to accomplish

Re: Django deployment practices -- do people use setup.py?

2012-04-27 Thread Simon Bächler
Hi > > We have been using git and git submodules and just started using virtualenv and pip. Submodules works well but you need a git repo of your packages. I wrote a blog post on using them: http://www.feinheit.ch/blog/2012/04/18/using-git-submodules/ Now we use pip for working packages like

Re: Soap web services with Soaplib in Django

2012-04-27 Thread Meenakshi Ithape
Thanks for the reply, I already done this & i create client using suds,& also create the view for that client, display message on the browser. But now i have another issue, I create the client, who access the web services from another url, but i didn't know how to send the object to the

Re: Soap webservice with soaplib & suds

2012-04-27 Thread Meenakshi Ithape
Thanks for the reply, i already done this, & my problem is solved. But now i have another issue, how to send the object to the web_service method or how to check the methods parameters type using suds? On Thursday, 26 April 2012 21:48:51 UTC+5:30, ovnicraft wrote: > > > > On Thu, Apr 26, 2012

Re: Soap webservice with soaplib & suds

2012-04-27 Thread Meenakshi Ithape
Thanks for the reply, i already done this, & my problem is solved. But now i have another issue, how to send the object to the web_service method or how to check the methods parameters type using suds? On Thursday, 26 April 2012 21:48:51 UTC+5:30, ovnicraft wrote: > > > > On Thu, Apr 26, 2012

Re: Django - Worldwide Developer Rates - Hourly Income - location and project duration specific

2012-04-27 Thread Raphael Reumayr
hello djangos, we have extended the django project information list to report by: + $ Working Hours per Day: xx hours (payed project working hours per day) + $ Project Total Cost: x USD (project total cost) Contribution Link: http://develissimo.com/forum/topic/107887/ thanks for sharing

Re: Can't get model to show up in admin interface

2012-04-27 Thread Jonathan D. Baker
Perhaps the Coltrane folder needs a blank __init__.py? Sent from my iPhone On Apr 27, 2012, at 12:00 AM, Mika wrote: > I'm working through James Bennet's Practical Django Projects 2nd > edition. I have a folder called "coltrane" which has a models.py file > with the

Can't get model to show up in admin interface

2012-04-27 Thread Mika
I'm working through James Bennet's Practical Django Projects 2nd edition. I have a folder called "coltrane" which has a models.py file with the following: from django.db import models class Category(models.Model): title = models.CharField(max_length = 250) slug =