Javascript:
document.getElemnetById(’textareacontent’).value.replace(/\n/
g,’’);
PHP:
preg_replace(”/\n/”,””,$_REQUEST['t1']);
Ruby:
(teaxtareacontent).gsub(/\n/,””)
( reference -
http://rkutti.wordpress.com/2008/01/31/display-textarea-content-with-line-breaks-in-html-page/)
--~--~-~--
i can send emails easily using django.
I want to set up an email address, where users can send email to the
app (designated email address) and my django application receives it,
parses it and stores it in database.
What would be the easiest way to do it. ie " To receive email from
users in Djan
I have tiny mce editor instead of text area for description field. For
rich text markup it generates and stores text with HTML markup in
database.
Now When I display this field data as {{form.description}}, I think
django automatically converts <> to < > for security reasons.
Any way to stop it
I am using django-tinymce widget instead of text are widget. It is
displaying the formatting menu bar on bottom instead of top of the
field?
Anyway to tell it to show formatting menu bar on top of the editor
area?
--~--~-~--~~~---~--~~
You received this message beca
I have two html forms on a page. Each html form has a django form
associated.
One form has validations.
When I submit the form (form1) which does not have validations, it
submit the other form (form2) on page as well and triggers the
validation on the form2. I do not want the form2 to validate on
I can add the field uploadedfile in model. what type is it and What
should I store in it?
On Jun 21, 8:56 pm, Kenneth Gonsalves wrote:
> On Monday 22 June 2009 09:16:59 ydjango wrote:
>
> > 2) How do I dynamically get the url of the uploaded file? is it as
> > simple as /site_media//
> > where
What book or resource would you recommend to learn advanced Python?
(other than python docs)
On Jun 30, 7:49 am, James Bennett wrote:
> On Mon, Jun 29, 2009 at 5:19 PM, Mark Jones wrote:
> > What is the python Magic going on here to make this possible?
>
> So, you want to read up on how Python d
i just increased the size of username in auth_user table to 100 and I
enter email as user name from my register user web page.
Django auth is working fine. I use my own form and view but django's
authenticate and login methods.
It did not give me any errors saying I cannot enter or use (at) sig
I also agree this is a needed feature.
On Jul 3, 5:17 pm, maplye wrote:
> I also agree that
>
> 2009/7/3 ristretto.rb :
>
>
>
> > Hello,
>
> > I have stepped through code, and cruised the django docs, forums, and
> > internet in general looking for how to setup an empty label with
> > TypedChoic
I am on mac os x and linux. I use mysql
How does the TIME_ZONE='UTC" in django settings.py work?
If i enter date time from web page and store it in mysql db. And no
timezone is associated with the datetime, does django assumes datetime
is in UTC and saves it without changing or does it assume it
When I convert from Pacific time to UTC
to db local Timzone: America/Los_Angeles
to db local_dt 2009-09-07 00:00:00-08:00
to db utc_dt 2009-09-07 08:00:00+00:00
when convert from UTC to Pacific time
utc_dt 2009-09-07 08:00:00+00:00
local_tz America/Los_Angeles
local_dt 2009-09-07 01:00:00 Ameri
Is there any way to know if for a timezone , on a praticular date
time, is DST active or not?
it is required by localize command of pytz. How to find it
programatically?
>>> est_dt = eastern.localize(loc_dt, is_dst=True)
>>> edt_dt = eastern.localize(loc_dt, is_dst=False)
--~--~-~--~~
Converting from local to utc:
local Timzone: America/Los_Angeles
local_dt 2009-09-17 00:00:00-08:00
utc_dt 2009-09-17 08:00:00+00:00 ( after converting from local to utc)
when I convert back from UTC to America/Los_Angeles, I get back
local_dt 2009-09-24 01:00:00
which is one hour from where I
,dt.second))
On Sep 5, 2:47 pm, zweb wrote:
> Converting from local to utc:
>
> local Timzone: America/Los_Angeles
> local_dt 2009-09-17 00:00:00-08:00
> utc_dt 2009-09-17 08:00:00+00:00 ( after converting from local to utc)
>
> when I convert back from UTC to America/Los_Angeles,
Externalizing text for I18N is a great idea. But size of the text can
vary quite a lot depending on the language. How do you make sure space
for the text on web page resizes appropriately so that string does
not get cutoff or page does not look ugly.
How do you design and build such a page/form
Hi,
I am also looking at Qooxdoo. What has been your experience so far?
Will it integrate with Django templates and views?
On Apr 8, 2:19 pm, Raymond Cote
wrote:
> Rob Madole wrote:
> > The reason I'm posting is to ask the community if they have know of
> > anything that is at a higher level
What would you consider a very good language? What is missing or
irritating in python that makes you think python is not a very good
langauge.
I have been using python for couple of years, mainly as Django, and I
am at this point neutral to it.
On Jun 14, 4:23 am, Joshua Partogi wrote:
> On Jun
Can you please refer me to any good images for Linux, Django 1 or 1.1,
mysql, apache images?
or alternatively any good blog or instruction on how to host a django
based web application on EC2 with mysql backend.
--~--~-~--~~~---~--~~
You received this message becau
When I try to download a file through django in IE , I get
[Sun Sep 20 05:34:20 2009] [error] [client 127.0.0.1] response =
func(request, response), referer: http://www.com
[Sun Sep 20 05:34:20 2009] [error] [client 127.0.0.1] File "/home/
pmc/webapps/test/lib/python2.5/django/http/util
When I try to download a file through django in IE , I get
[Sun Sep 20 05:34:20 2009] [error] [client 127.0.0.1] response =
func(request, response), referer: http://www.com
[Sun Sep 20 05:34:20 2009] [error] [client 127.0.0.1] File "/home/
pmc/webapps/test/lib/python2.5/django/http/util
When I try to download a file through django in IE , I get
[Sun Sep 20 05:34:20 2009] [error] [client 127.0.0.1] response =
func(request, response), referer: http://www.com
[Sun Sep 20 05:34:20 2009] [error] [client 127.0.0.1] File "/home/
pmc/webapps/test/lib/python2.5/django/http/util
I have a tinymce field like this...
When I tab, the cursor just skips the tinymce text area and moves to
next field. ie it jumps from field tabindex 1 to field with tabindex
3. tinymce editor has tabindex 2. I am using django tinymce.
If anyone has come across this problem and know answer or see
Has anyone used django wikiapp in production.
Any reviews of this app - Features you liked?
Any major issues or shortcomings one should be aware of?
Any alternatives you can recommend, I should evaluate as well.
--~--~-~--~~~---~--~~
You received this messag
I want to serve whole of my site on HTTPS.
But HttpResponseRedirect is sending to http by default.
Any way to tell django that it should use https and not http
I am using mod_python on one site and mod_wsgi on another. Both need
to go to HTTPS
--~--~-~--~~~---~--~
for me this worked
SetEnvIf X-Forwarded-Proto https HTTPS=1
as specified in this thread
http://groups.google.com/group/django-users/browse_thread/thread/cdece5ef2e7fd280
On Oct 26, 6:01 am, "Tim Sawyer" wrote:
> I still can't get this to work (original thread
> athttp://groups.google.com/
I have
description|safe|striptags
but description has some " " in addition to html tags. How do I
strip that off?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
What is the best way to show site down for maintenance page ?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubsc
Is there a django or python equivalent of php json_encode?
the data I am converting to json has text fields that have quotes,
double quotes, newlines and html tags. Creating json manually in my
program without escaping or converting these special characters is
causing problem on javascript side.
"Permissions are set globally per type of object, not per specific
object instance. For example, it's possible to say "Mary may change
news stories," but it's not currently possible to say "Mary may change
news stories, but only the ones she created herself" or "Mary may only
change news stories th
I have
{% if perms.core.add_project %} which is expected to be false but it
is returning true.
I am running it on webfaction (mod_wsgi, python 2.5 , django 1,1,1).
I do {{perms.user}} in my html on webfaction and I get - perms:
set([u'core.view_project']) which is correct.
and {{perms.core.add_
I displayed following values in my html template. I am running it on
wsgi, python 2.5 and Django 1.1.1 on webfaction.
{{perms.user}}Value displayed: set([])
{{perms.core}}Value displayed: set([])
{{perms.core.add_project}} Value Displayed: True ( BUG: should be
false as perms.user and per
On Mon, May 10, 2010 at 3:52 PM, zweb wrote:
> > I displayed following values in my html template. I am running it on
> > wsgi, python 2.5 and Django 1.1.1 on webfaction.
> > {{perms.user}} Value displayed: set([])
> > {{perms.core}} Value displayed: set([])
> >
I am using a model form to edit (change) an exisiting row in db.
in clean_xxx() method I want to compare the old (existing) value
versus new value.
I can get new value from cleaned_data.
How do I get the old (existing) value?
If I do a db query to get the existing row from DB how do I get the
I am doing this
form = ContactForm(request.POST) # A form bound to the POST data
if form.is_valid(): # All validation rules pass
As clean is called by is_valid() and at this point form in bound to
POST data, I cannot use self.instance unless I do this
form = ContactForm(request.POST,
I am using DJango CSV module and doing writerrow() on some text data
generated through tinyce text editor.
I am getting following error
ascii' codec can't encode character u'\\u2019' in position 337:
ordinal not in range(128)
for some reason it cannot handle the single quote in text. How do I
I am looking to provide search. All content is in MYSQL DB in innodb
tables. That rules out Mysql full text search option, which would have
been my first choice.
Other option I am looking at it is Sphinx search with django-sphinx.
Any experiences with it good and bad?
Other thing I looked at is H
I want users of my app to be able to define their own fields in
addition to the already existing fields.
These fields will be displayed on webpage, in form and saved in
database.
Fields can be of any of the standard types.
Any way to do it in django?
--
You received this message because you ar
I thought Chase Paymentech uses authorize.net. Please correct me...
so any sample code to integrate django based web app to authorize.net
without going to chase or authorize.net hosted pages?
On Jun 18, 11:09 am, surtyaar wrote:
> Hi Bobby,
>
> You might be interested in a django clone of the
I need to implement search solution over models in mysql.
Anyone has experience with both or has gone through same decision
making?
What should I consider before choosing one or other?
(Mysql text search will not work as I use INNODB. Solr is powerful but
I heard it is very memory hungry and it
one.
My views are based on quick reading of material and opinions on web
and not on my experience yet. Once I will try haystack xapian this
weekend and let you know.
On Jun 19, 10:54 am, Nick Arnett wrote:
> On Sat, Jun 19, 2010 at 9:21 AM, zweb wrote:
>
> > (Mysql text search w
ch engine. Risk is
search index result could return stale data or I might get duplicates.
2) Use an appoach like yours - " copy of the
searchable text in a MyISAM table and using the MySQL search on it."
On Jun 19, 10:54 am, Nick Arnett wrote:
> On Sat, Jun 19, 2010 at 9:21 AM, zw
Has anyone used Jaspersoft or Pentaho with DJango or Python in
production?
Are there any Python equivalent of Jaspersoft/Pentaho?
Any experiences?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us..
On my web pages I have labels for text fields. I want user to be able
to personalize the labels.
Example :
default label: Employee, alternative is that user can choose -
Associate or Staff Member.
Depending on which label an user chooses, all screens should show that
label for that user. Other us
On my web pages I have labels for text fields. I want user to be able
to personalize the labels.
Example :
default label: Employee, alternative is that user can choose and
save- Associate or Staff Member as label to be shown on all screens.
Approach I can think of:
1. When user logs in - gets
I am seeing unexpected strange behaviour.
I have two tables: student and study_class which have many to many
relationship.
1. when user A (student a) logs in, in run time he does,
student_a.study_classs = [class_physics] #in DB, this student does
not have class_physics
#does not Save.
2. U
if i do,
request.user.groups = [group1]
Sometimes it saves this in DB auth_user_group , sometimes it does not.
I do not have any save() stmt.
What is the expected behavior?
I do not want it to save it in DB without explicit save, How do I
achieve that?
--
You received this message because you
if i do,
request.user.groups = [group1]
Sometimes it saves this in DB auth_user_group , sometimes it does not.
I do not have any save() stmt.
What is the expected behavior?
I do not want it to save it in DB without explicit save, How do I
achieve that?
--
You received this message because you
Assume there is many to many between publication and article. (example
from django docs)
By default following stmt will auto save the relationship between
a_publication and article11 in database.
a_publication.articles = [article11]
how do I get that so that it changes only in memory (for sessio
I want to provide a method as follows,
def update_some_model_field(key, field_name, value):
'''user provides the primary key of row, field name in model and the
value and the method updates the field for that row with the value'''
1. model_obj = Some_model.objects.get(pk = key)
2. model_obj."
in fire bug I see my program issue
http://localhost:8000/readme?startIndex=0&results=25 301 MOVED
PERMANENTLY
http://localhost:8000/readme/?startIndex=0&results=25 200 OK
Any way to avoid this 301 MOVED PERMANENTLY ?
--
You received this message because you are subscribed to the Google Grou
I am planning to drop unique key constraint on "name" column of
auth_group table.
Any possible issues it may cause?
thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To
Since all my looks up are by id and I am not using admin, I should be
ok.
I was not sure if django auth framework used it internally anywhere.
On Jan 19, 6:03 am, Karen Tracey wrote:
> On Tue, Jan 19, 2010 at 3:17 AM, zweb wrote:
>
> > I am planning to drop unique key constra
I have one django app using Mysql which I want to package and install
easily on various servers.
I want it be to be easy non tech user kind of installer.
1) Would you know of any open source or commercial software I can use
for this purpose?
2) What is the best way to push upgrades to the servers
What is the best way to build installer for python/django based
software product ?
Like in Microsoft world you can have .exe and installshield?
I need to way which can guide user to setup database, run DB script,
set up parameters and guide him through installation. Also want to
give the option to
Is it possible to have a read only django admin, ie user cannot add,
delete or update. User can only view data.
or may be one user can be view only and other user has add/delete /
update as well in Django admin.
How to do that?
--
You received this message because you are subscribed to the Goog
Upgraded to 1.1.1
added admin for first time per instructions in settings.py and urls.py
after upgrading to 1.1.1. No admin.py at this point.
created new super user
logged in to admin console for first time. and got the following
error:
In template /Library/Python/2.5/site-packages/django/contr
after login to admin, now I get this error, any clues on what to look
for?
using django 1.1.1
Ashish
TemplateSyntaxError at /admin/
Caught an exception while rendering: 'module' object has no attribute
'rindex'
Original Traceback (most recent call last):
File "/Library/Python/2.5/site-packa
In my urls.py I see only two possible places where I do not have
quotes,
1.(r'^admin/', include(admin.site.urls)),
I tried putting include('admin.site.urls')) but it could not find
'admin.site.urls'
2. (r'^register/$', register,{'opensource':True}),
True is not in quotes. But it is workin
What are best practices to regress django views?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegr
after some debugging, just found out that
filter method does not throw DoesNotExist while get does.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this grou
To Summarize, two options are,
1) Template method pattern which Thierry suggested
http://en.wikipedia.org/wiki/Template_method_pattern
2) Django Decorators
On Apr 10, 11:38 pm, Thierry Chich wrote:
> I have written my functions as méthods of classes. Then it allow to
> use inheritance.
>
> L
how do i do this kind of condition in django orm filter:
( 1 < a < 5) or ( 20 < b < 70)
select * from table where (a between 1 and 5) or (b between 20 and 70)
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email t
I am using Django 1.3.1
I want to know in my application how much time is taken by a) database
access b) creation of XML c) other parts of code. What would be some good
tools to profile my application?
The code to be profiled is in django view and uses Django ORM and Python
2.6 and lxml to ge
I am writing an Python application which will expose REST API. It will be
client agnostic. In future I will provide a Web client and a mobile client
and may be a rich desktop client. These clients will connect to application
using the REST api only.
Should I use Django for this? or is Django
s [2].
>
> I am planing to use Django with one of the above rest frameworks to serve
> RESTful APIs and a web client in backbone.js which will consume the APIs
> as well.
>
> [1] - https://github.com/aregee/moksaya
> [2] - http://sugarlabs.org
> On Jun 30, 2013 12:13 PM, &qu
I have a web page that is loading very slow.
It uses a Javascript tree grid component - data loaded via XML - XML
generated by LXML - Django view - Django ORM - MYSQL DB.
I need to find out where is the performance bottleneck. It could be one or
more of the above components.
What are the best
Are web frameworks useful in mobile first world of today?
With apps required to support multiple front ends including Mobile and Web,
is using a web framework like ROR or Django more of a liability.
Would not a light weight rest framework be better?
( Note: I really like Django. It is an aweso
Can we use "with LOCK" in django views. I am using Apache, mod_wsgi,
Django 1.3.1, mysql.
Any conflicts or Known issues.
--
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,
I am planning to use django rest as rest API server. In one presentation I
read, that stripped Django as REST server outperforms some other
microframeworks.
What would be stripped django?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To uns
I am planning to use django-storages. It uses django settings, as
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
I read it is bad practice to change django settings during runtime. I am
not using Django's FileField.
During run time, based on file size and type, I want to use
I was looking at Angular and looks like it does many of the thing Django
Templates does but on the client side.
Are you using Angular with Django? How is the experience? What are the
/pros/cons? What are using django for and what are you using angular for?
Is django pretty much a rest framewor
71 matches
Mail list logo