Re: Best Django host

2009-05-19 Thread Zain Memon
http://djangofriendly.com/

On Tue, May 19, 2009 at 6:21 PM, LeonTheCleaner wrote:

>
> Hi,
>
> I currently use dreamhost, but the installation process is very slow.
> Is it me or this process is overly complicated? All I want is to
> install an already written django project but to do that it's like I
> have to write the app myself.
>
> I read about dreamhost being not the best, but it's listed at #2 on
> django website. Should I use that for my site or buy one of the
> packages that features 1-click install, like: http://djangohosting.ch?
>
> I would appreciate if someone can help me out.
>
>
>
>
> 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-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django version

2009-05-19 Thread Zain Memon
import djangodjango.get_version()

On Tue, May 19, 2009 at 10:47 AM, VidrSan  wrote:

>
> How can I see django version on my web-server? Just python's code,
> beaucause I can't find any information on hosting
>
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Introducing FirePy, a FirePHP server library for Django

2009-05-05 Thread Zain Memon
What's the difference between your project and FirePython?
http://firepython.binaryage.com/

On Tue, May 5, 2009 at 10:18 PM, Sung-Jin Hong wrote:

> Hello everyone!
>
> I've made a simple FirePHP server library for Django.
>
> For those who are not familiar with FirePHP, It's a Firebug extension that
> enables server logs to be shown at the Firebug console. You can find more
> information here ( http://www.firephp.org/ ). It's mainly for PHP
> language, but the protocol is platform independent. There are server
> librarys for Ruby on Rails and so on. So I've made a Django version of the
> server-side FirePHP. And thus, FirePy!
>
> Have a look. It has a simple documentation and screenshot ready for you.
>
> http://code.google.com/p/firepy/
>
> And those who are interested in development of this project, feel free to
> send patches!
>
> 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-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: How to add a customized validation/authorization to django.contrib.admin

2009-05-05 Thread Zain Memon
You're going to want to override a couple of ModelAdmin methods. Take a look
at this blog post.
http://www.b-list.org/weblog/2008/dec/24/admin/

On Tue, May 5, 2009 at 5:19 AM, topcoder...@gmail.com  wrote:

>
> Hello everyone,
>
> In my application, I heavily used django.contrib.admin to manage my
> data, especially add/edit them. Now I need a quite customized
> validation feature added into it. Certain user may have no authority
> to edit some fields of some instances of a Model, and whether or not
> she/he can edit it depending on her/his user name, current system time
> and/or the field she/he attempts to edit.
>
> When user who has no authority attempts to edit something, she/he
> should received a user-friendly error message just like she/he entered
> invalid email address or leaved required field empty.
>
> How to hook this customized validation/authorization feature into
> admin site?
>
> Thanks a lot.
>
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: tinymce not displaying on admin template

2009-05-04 Thread Zain Memon
Your TINYMCE_JS_URL is .../site_media/js/tiny_mce/tiny_mce.js while the file
apparently is at .../site_media/tiny_mce/tiny_mce.js.
Zain

On Mon, May 4, 2009 at 9:59 AM, Jesse  wrote:

>
> Hello,
>
> I'm trying to implement django-cms.  The CMS pages in admin display,
> but not with the editing someone without html knowledge will be able
> to use.  I see no tinymce options. I've placed tinymce in several
> places hoping somehow it would display where I need it.
>
> Using this statement in a firefox browser:
> http://127.0.0.1:8000/site_media/tiny_mce/tiny_mce.js
>
> I see this displayed:
> var tinymce=
>
> {majorVersion:"3",minorVersion:"2.3",releaseDate:"2009-04-23",_init:function
> (){var o=this,k=document, etc.
>
> My setting.py file:
> MEDIA_ROOT = 'c:/django/myprograms/site_media/'
> MEDIA_URL = 'http://127.0.0.1:8000/site_media/'
>
> TINYMCE_JS_URL = 'http://127.0.0.1:8000/site_media/js/tiny_mce/
> tiny_mce.js'
> TINYMCE_JS_ROOT = 'c:/django/myprograms/site_media/js/tiny_mce'
> TINYMCE_DEFAULT_CONFIG = {
>'plugins': "table,spellchecker,paste,searchreplace",
>'theme': "advanced",
>'cleanup_on_startup': True,
>'custom_undo_redo_levels': 10,
> }
>
> TINYMCE_SPELLCHECKER = False
> TINYMCE_COMPRESSOR = False
> TINYMCE_FILEBROWSER = True
>
> CMS_USE_TINYMCE = True
>
> INSTALLED_APPS = (
>'cms',
>'tinymce',
>'filebrowser',
> )
>
> I''ve not found any download files with the uppercase TinyMce, but
> only tinymce
> or tiny_mce.
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Ajax and https

2009-05-01 Thread Zain Memon
You cannot make cross-site requests in Javascript, for security reasons.
See: https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript

This has nothing to do with Django, however, so if you need further
information, you should take your question to the JQuery mailing lists.

Zain

On Thu, Apr 30, 2009 at 7:01 AM, shi shaozhong wrote:

>
> Hi, there.  I will be interested as well.
>
> Regards,
>
> David
>
> 2009/4/30 ruben.django :
> >
> > Hi,
> >
> > i've got a template with a jquey ajax call. Before, the web service
> > (Apache) always redirects to a http direction and the ajax call worked
> > perfectly, but from now, it redirects to a secure https direction and
> > the ajax call has stopped working. The browser shows me the next
> > message:
> >
> > Security error: the content in https://mysite/foo/34 can't load data
> > from http://mysite/foo/34.
> >
> > Can anybody help me?
> >
> > 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-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: New site: www.portaltotheuniverse.org

2009-04-23 Thread Zain Memon
Cool! Mind sharing the names of any open source django apps you used?

On Thu, Apr 23, 2009 at 6:09 AM, larsholm  wrote:

>
> Dear all,
>
> Allow me to advertise for our new Django based site:
> http://www.portaltotheuniverse.org
>
> Keeping up-to-date with cutting-edge astronomy and space science
> breakthroughs has just become that much easier, thanks to the Portal
> To The Universe, the latest Cornerstone project of the International
> Year of Astronomy 2009 (IYA2009).
>
> On the tech side it basically boils down to a content-specific feed
> aggregator with a number of important add-ons:
> - human moderation to feature high quality content.
> - embargoed press releases for journalists with login (works in much
> the same way as when journalists can be invited to watch new movies a
> day before everybody else).
> - the RSS crawler is fast and updated very often to keep up-to-date
> with the news development during the day.
>
> This is our third major Django-based website we have done here at ESO
> - European Southern Observatory (located in Munich, Germany), and we
> naturally have more websites with astronomy content in the pipeline.
>
> Thanks for viewing!
>
> Lars Holm Nielsen 
> ESO - European Southern Observatory
>
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Hierarchy menu system

2009-04-23 Thread Zain Memon
It sounds like you're trying to build a CMS app; check out django-cms if you
haven't already. http://django-cms.org/

On Wed, Apr 22, 2009 at 9:50 AM, tdelam  wrote:

>
> What's the best way to build a hierarchy menu system? e.g: Page items
> can have sub-pages and sub-pages can have sub-sub-pages and so on
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: graph tools

2009-04-23 Thread Zain Memon
You might find it easier to go with a Javascript library to render the
graphs instead; for example, the excellent flot plugin for jQuery.
http://code.google.com/p/flot/

On Thu, Apr 23, 2009 at 12:10 AM, Lars Stavholm  wrote:

>
> Hi All,
>
> looking to produce graphs within a django application,
> preferably within the admin site.
>
> django-graphs might be a contender, but it seems to be
> not fully completed yet. Anyone using it?
>
> Other django graph app's?
>
> Any advice appreciated
> /Lars Stavholm
>
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Only show field in admin for superuser

2009-04-23 Thread Zain Memon
In that case, try overriding ModelAdmin.get_fieldsets(); add the owner field
to self.fieldset if request.user.is_superuser, and then call
super.get_fieldsets().
For reference, you can find get_fieldsets() (and other beautiful things you
can override) in django/contrib/admin/options.py.

On Thu, Apr 23, 2009 at 3:32 AM, phoebebright wrote:

>
> Zain,
>
> Thanks for responding.
> I would really prefer not to show the field at all - I don't want
> ordinary users being able to see a list of all the users on the
> system!
>
> Phoebe
>
> On Apr 23, 9:42 am, Zain Memon  wrote:
> > You can override the ModelAdmin.save_model() method to check if the
> current
> > user has permission to change the owner.
> > Take a look athttp://www.b-list.org/weblog/2008/dec/24/admin/to see an
> > example.
> >
> > On Thu, Apr 23, 2009 at 1:37 AM, phoebebright  >wrote:
> >
> >
> >
> >
> >
> > > I have a model with an owner field that I only want a superuser to be
> > > able to change.  I can't change the list of fields in form in admin.py
> > > because there is not request.user to test at that time.  If I were
> > > using custom templates I could put it in the template, but would
> > > rather stick to the standard admin.
> >
> > > If I add the field by default, Is there somewhere I could remove the
> > > field as it's being loaded if the requesting user is not a superuser?
> > > Any ideas gratefully received!
> >
> > > THIS DOES NOT WORK:
> >
> > >if request.user.is_superuser:
> > > fieldsets = [
> > > (None,   {'fields':
> > > ['tourism','community','cat','name','is_live','paid','owner']}),
> > > ('Contact', {'fields':
> > > ['phone','mobile','fax','email','web','address']}),
> > > ('Details', {'fields':
> > > ['description','pic1','pic2','pic3','pic4']}),
> > > ]
> > >else:
> > > fieldsets = [
> > > (None,   {'fields':
> > > ['tourism','community','cat','name','is_live','paid','owner']}),
> > > ('Contact', {'fields':
> > > ['phone','mobile','fax','email','web','address']}),
> > > ('Details', {'fields':
> > > ['description','pic1','pic2','pic3','pic4']}),
> > > ]
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Only show field in admin for superuser

2009-04-23 Thread Zain Memon
You can override the ModelAdmin.save_model() method to check if the current
user has permission to change the owner.
Take a look at http://www.b-list.org/weblog/2008/dec/24/admin/ to see an
example.

On Thu, Apr 23, 2009 at 1:37 AM, phoebebright wrote:

>
> I have a model with an owner field that I only want a superuser to be
> able to change.  I can't change the list of fields in form in admin.py
> because there is not request.user to test at that time.  If I were
> using custom templates I could put it in the template, but would
> rather stick to the standard admin.
>
> If I add the field by default, Is there somewhere I could remove the
> field as it's being loaded if the requesting user is not a superuser?
> Any ideas gratefully received!
>
>
> THIS DOES NOT WORK:
>
>if request.user.is_superuser:
> fieldsets = [
> (None,   {'fields':
> ['tourism','community','cat','name','is_live','paid','owner']}),
> ('Contact', {'fields':
> ['phone','mobile','fax','email','web','address']}),
> ('Details', {'fields':
> ['description','pic1','pic2','pic3','pic4']}),
> ]
>else:
> fieldsets = [
> (None,   {'fields':
> ['tourism','community','cat','name','is_live','paid','owner']}),
> ('Contact', {'fields':
> ['phone','mobile','fax','email','web','address']}),
> ('Details', {'fields':
> ['description','pic1','pic2','pic3','pic4']}),
> ]
>
>
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Problem in tutorial

2009-04-23 Thread Zain Memon
Your SQL is wrong. Look up the correct syntax for changing a column in the
MySQL docs.

On Thu, Apr 23, 2009 at 12:54 AM, 83nini <83n...@gmail.com> wrote:

>
> Hi guys,
>
> I'm working on django tutorial that is in "www.djangobook.com", I'm in
> chapter6 where i'm in the process of creating an admin Web site.
> The site is created and it works just perfectly, the thing is I'm
> trying to make some date and numeric fields optional, so I modified
> the models.py folder and added the "null=True" statement as follows:
>
> publication_date = models.DateField(blank=True, null=True)
>
> now according to what's written in the book, it is my responsibility
> to ALTER TABLE statement whenever such a change is made in the
> models.py file, so I did the following:
>  1. called python manage.py dbshell from the command line
>  2. when i got the dbshell "mysql>", i wrote the following statement
> ALTER TABLE books_book ALTER COLUMN publication_date DROP NOT
> NULL;
>
> I'm getting "ALTER is not an internal command, external command,
> program or commandfile"
>
> WHY???
>
> thanks for explaining,
> cheers,
> Lina
>
>
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django turns?

2009-04-22 Thread Zain Memon
django-schedule is another option you can look at.
http://github.com/thauber/django-schedule/tree/master


On Wed, Apr 22, 2009 at 1:39 PM, Sergio Durand  wrote:

>
> Hi,
>
> Visit swingtime project:
> http://code.google.com/p/django-swingtime/
> Maybe it's what you are looking for...
>
> --
> Sergio Durand
>
> Juanjo Conti escreveu:
> > Hi!
> >
> > I wonder know if there is a Django app suitable to handle turns as the
> > ones given by a doctor to his pacients.
> > Thanks in advance,
> >
> > --
> > Juanjo Conti
>
>
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: basic-profile install error

2009-04-22 Thread Zain Memon
Does the file /home/username/webapps/sms/sms/basic/__init__.py exist? If
not, create it. That file is required for Python to treat the directory as
containing packages.
Zain

On Wed, Apr 22, 2009 at 12:23 AM, Denhuang  wrote:

>
> The project setting files are here /home/username/webapps/sms/sms/
> settings.py
>
> On Apr 21, 10:13 pm, zayatzz  wrote:
> > Shouldnt there be another sms in your pythonpath since there are 2 in
> > file path?
> >
> > Which folder holds your project settings?
> > /home/username/webapps/sms
> > or
> > /home/username/webapps/sms/sms ?
> >
> > Alan
> >
> > On Apr 22, 6:47 am, Denhuang  wrote:
> >
> > > I am getting an error when I type:
> >
> > > [unix]$ python manage.py syncdb
> > > Error: No module named basic
> >
> > > The files are under
> > > /home/username/webapps/sms/sms/basic/profiles/
> >
> > > PythonPath '/home/username/webapps/sms'
> >
> > > INSTALLED_APPS = (
> > > 'django.contrib.auth',
> > > 'django.contrib.contenttypes',
> > > 'django.contrib.sessions',
> > > 'django.contrib.sites',
> > > 'django.contrib.admin',
> > > 'sms.registration',
> > > 'sms.basic.profiles',
> > > )
> >
> > > Anyone have any idea what is wrong? Probably something stupid in my
> > > setup.
> > > Dennis
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django admin page hangs in django server - where is web server error log?

2009-04-11 Thread Zain Memon
Since no messages are shown in the log, the connection is most likely being
blocked somewhere upstream. Check that you've allowed port 8001 through any
firewalls or routers you have set up.
Zain

On Sat, Apr 11, 2009 at 5:23 PM, adelein  wrote:

>
> This is the server output:
>
>
> [r...@bellatrix djangoblog]# python manage.py runserver
> 93.186.171.54:8001
> Validating models...
> 0 errors found
>
> Django version 1.1 beta 1 SVN-10504, using settings
> 'djangoblog.settings'
> Development server is running at http://93.186.171.54:8001/
> Quit the server with CONTROL-C.
>
>
> So no errors. Yet admin page is blank as you can see if you go to
> http://93.186.171.54:8001/admin.
>
> On Apr 11, 5:21 pm, adelein  wrote:
> > Yes, and I see no errors there. Still the admin page does not load at
> > all. I cant find any similar problems through google.
> >
> > On Apr 11, 5:17 pm, Malcolm Tredinnick 
> > wrote:
> >
> > > On Sat, 2009-04-11 at 17:09 -0700, adelein wrote:
> >
> > > > Hi,
> >
> > > > Sorry, I meant to say urls.py of course. So, given I did put the code
> > > > in the right file, the problem still remains.
> >
> > > If you're following the tutorial, then you will be running the
> > > development server. So all "server log" style output will be printed to
> > > the terminal that you used to start the server.
> >
> > > Regards,
> > > Malcolm
> >
>

--~--~-~--~~~---~--~~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---