Re: superuser has no rights with newforms admin

2008-07-19 Thread Jon Atkinson

> Figured out what went wrong.  You now have to register your models
> with the admin app, which will give you access.
>
> If anyone else that is completely awful at Django is running into the
> same problem let me know and I'll go in to more depth.

Could you let me know what you did to fix this?

My urls.py is very simple, and contains:

-8<---

from django.conf.urls.defaults import *
from django.contrib import admin
from os import path

admin.autodiscover()

urlpatterns = patterns('',
# Uncomment this for admin:
('^admin/(.*)', admin.site.root),

# Index page.
(r'^/?$', 'vmanager.frontend.views.index'),
)

-8<---

My models.py file in my applicaion folder contains the following (I've
snipped aprts of the model definition, as they're not relevant)

-8<---

from django.db import models
from django.contrib import admin

class Person(models.Model):
"""This models a person machine"""
(details omitted here)

-8<---

I've tried alternating between using admin.autodiscover() in my
urls.py, and manually registering my models using
admin.site.register(Person), but I still get the permission error in
the admin site. I've also tried flushing the database, but that
doesn't seem to solve anything. FWIW, my user has is_superuser,
is_staff and is_active all set to true in my database.

The exact message I get in the admin site is "You don't have
permission to edit anything".

Any help would be much appreciated.

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: superuser has no rights with newforms admin

2008-07-20 Thread Jon Atkinson

On Sun, Jul 20, 2008 at 2:01 AM, stryderjzw <[EMAIL PROTECTED]> wrote:
>
> Strange, I'm getting the message "You don't have permission to edit
> anything." on the admin homepage. I've done admin.autodiscover() on
> the project urls page, I've created admin.py files for my models and
> registered the classes with admin.site.register().

Same here (having followed the earlier advice on the list). Is there
any more useful information which I could post to help debug this?

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: superuser has no rights with newforms admin

2008-07-20 Thread Jon Atkinson

>> > > I'm installing it from SVN and got "You don't have permission to edit
>> > > anything", I made it work before, but now when I try to follow the
>> > > book can't. Could you tell me what should I add to have full
>> > > permissions?
>>
>> > I have no idea what is going on in cases where people have
>> > admin.autodiscover() in their urls.py yet still get this "You don't have
>> > permission to edit anything" message.  I'd suggest you put a print 
>> > statement
>> > in django/contrib/admin/__init__.py after the __import__ in autodiscover()
>> > and verify that the auth app, at a minimum, is being found by
>> > autodiscover(). If not put a print in before the import and ensure
>> > adutodiscover() is really being called and attempting to import the admin
>> > module for each installed app.

Okay, I've spent a little time on this. There seem to be a few problems.

First of all, I'm a little confused about where to use
admin.site.register(). A few months ago I checked out the
newforms-admin branch to try to get a head start, and I followed the
instructions on this wiki page[1], which recommended importing
django.contrib.admin at the top of models.py in a given app, then
registering the models at the bottom of the same file. Of course, I
realise that the documentation is in flux, but at the time, doing that
worked.

I've now moved that code into admin.py in my app folder. It looks
something like this:

-8<-

from django.contrib import admin
from myproj.people.models import Person

class PersonAdmin(admin.ModelAdmin):
pass

admin.site.register(Person, PersonAdmin)

-8<-

However, when I *also* include admin.autodiscover() in my project-root
urls.py, the following exception is raised:

ImproperlyConfigured at /admin/
Error while importing URLconf 'myproj.urls': The model Person is
already registered

If I comment out the contents of my admin.py file, then that exception
is not raised, and also if I comment out the call to
admin.autodiscover(), the exception is not raised, however I cannot
have both active at the same time. A little googling brought up ticket
6776 [2], which seems to have been closed, with the introduction of
admin.autodiscover() as the resolution. I'm not entirely sure what is
going on there.

Regardless, I took Karen's advice, and modified the __init__.py in
django.contrib.admin, and added a print statement to see which
applications were being loaded. In my case, the output was this:

django.contrib.auth
django.contrib.contenttypes
django.contrib.sessions
django.contrib.sites
django.contrib.admin
myproj.people

... which looks reasonable to me (auth is being loaded before admin,
which would suggest that the permissions would be available to the
admin app), but I still see the same 'you don't have permission to
edit anything' message in the admin application.

Any help debugging this would be much appreciated - now that
newforms-admin is in trunk, I can't justify continuing development
without it, so I'd really like to solve this :-)

--Jon

[1] http://code.djangoproject.com/wiki/NewformsHOWTO
[2] http://code.djangoproject.com/ticket/6776

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: superuser has no rights with newforms admin

2008-07-20 Thread Jon Atkinson

> It sounds like your admin.py file has already been imported by something
> else before the autodiscover() is called.  Did you add an import of your
> app's admin into your models.py? That shouldn't be necessary. Also make sure
> you don't have an import for it in your __init__.py file; that was the
> recommendation when I first migrated to newforms-admin but it led to
> multiple registrations like this so was replaced by autodiscover().  You
> should not have an explicit import of your app's admin anywhere;
> autodiscover() is, I believe, the only thing that should be doing the import
> thus ensuring registration is only run once.

No, I don't. I should clarify that when I previously had
newforms-admin working correctly, it was in a different project. The
trouble that I'm having is with a project which I started after the
newforms-admin merge.

> Alternatively, you are sure you removed the registration calls from your
> models.py file?

Yep.

> I'm pretty stumped by this myself.  I can't recreate it (and actually right
> now am away from home so unable to even try anything for several hours).
> Maybe if you can figure out and solve what is causing the multiple
> registration exception that will shed some light

I've uploaded my complete project tree (it's fairly small, and I've
included the sqlite database). The admin username and password is
'test'. It's available at:

http://jonatkinson.co.uk/static/junk/myproj.zip

FWIW, I'm using SVN trunk at revision 7951. I realise that asking
anyone to download and run my project just to help me fix a problem is
quite a presumptious request, but I live in hope :-)

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: superuser has no rights with newforms admin

2008-07-20 Thread Jon Atkinson

> Does that mean it works for you as well if you update to latest?  I only
> knew nfa was not part of trunk at that point because I looked it up after
> trying reverting to 7951 to test your environment.  I found the
> autodiscover() caused an exception because it didn't exist...so if you were
> running 7951 it must have been a newforms-admin branch version?  Not sure
> why that wouldn't have worked but if it's fixed in latest it's probably not
> worth tracking down.

Yes, it does work for me. I had both the newforms-admin and an older
trunk checked out on my machine, but it appears that I updated my nfa
branch, and not my trunk, but then went ahead and installed my (old)
trunk code. PEBKAC.

Sorry for wasting your time, but thanks a lot for your help anyway, Karen.

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: superuser has no rights with newforms admin

2008-07-20 Thread Jon Atkinson

> You can't really be using trunk 7951 -- that's from before newforms-admin
> merge which was 7967??  Try updating to latest trunk?

So I feel slightly ... foolish :-)

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



SuspiciousOperation exception on ImageField upload

2008-08-19 Thread Jon Atkinson

Hello,

I'm trying to work with a model which accepts a logo image upload via
an ImageField. My a cut down version of my model is below:

class Promoter(models.Model):
name = models.CharField(max_length=100)
logo = models.ImageField(upload_to="/images/promoters/%Y/%m/%d/")

When I try to upload the logo via the built-in admin interface, I get
the following error:

SuspiciousOperation at /admin/promoters/promoter/add/
Attempted access to '/images/promoters/2008/08/19/kitten.jpg' denied.

In settings.py, my MEDIA_ROOT is set to an accessible directory in my
home folder: '/home/username/projectname/media/', and this folder has
it's permissions set to 777.

I'm currently using the ./manage.py webserver, which (I assume) runs
as the same user which starts the process; this is the same user as
owns the folder specified above.

Any ideas what I'm doing wrong here?

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: SuspiciousOperation exception on ImageField upload

2008-08-19 Thread Jon Atkinson

Marty,

That was the problem, thank you for you help.

--Jon

On Tue, Aug 19, 2008 at 2:13 PM, Marty Alchin <[EMAIL PROTECTED]> wrote:
>
> On Tue, Aug 19, 2008 at 8:47 AM, Jon Atkinson <[EMAIL PROTECTED]> wrote:
>> I'm trying to work with a model which accepts a logo image upload via
>> an ImageField. My a cut down version of my model is below:
>>
>> class Promoter(models.Model):
>>name = models.CharField(max_length=100)
>>logo = models.ImageField(upload_to="/images/promoters/%Y/%m/%d/")
>
> Drop the first slash in your path name.
>
>> When I try to upload the logo via the built-in admin interface, I get
>> the following error:
>>
>> SuspiciousOperation at /admin/promoters/promoter/add/
>> Attempted access to '/images/promoters/2008/08/19/kitten.jpg' denied.
>>
>> In settings.py, my MEDIA_ROOT is set to an accessible directory in my
>> home folder: '/home/username/projectname/media/', and this folder has
>> it's permissions set to 777.
>
> But with that leading slash, you're trying to save to
> /images/promotors/%Y/%m/%d/, not
> /home/username/projectname/media/images/promotors/%Y/%m/%d/ like you
> want. That path probably doesn't exist, and Django would need
> unrestricted access to your system in order to create it for you.
> Needless to say, not a good situation.
>
> That SuspiciousOperation is in place to help prevent Django from
> trying to accidentally read or write from places on your filesystem it
> shouldn't have access to. Just drop the first slash in the path name
> (so it reads upload_to="images/promoters/%Y/%m/%d/") and you'll be all
> set.
>
> -Gul
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Can i add initial admin user?

2009-08-01 Thread Jon Atkinson

On Sat, Aug 1, 2009 at 10:38 AM, Mirat Can
Bayrak wrote:
>
> i am playing a lot with my models in my project nowadays. On every change i 
> am deleting my
> sqlite3 file and running syncdb again..

You don't need to delete your entire database; it might be worth
checking out the management commands ./manage.py sqlreset and
./manage.py reset. These commands drop the tables for a single app and
re-creates them, but will leave your auth tables intact, so you don't
need to re-create your superuser.

--Jon

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Django job in Manchester, UK

2009-08-10 Thread Jon Atkinson

Hello,

We're a 70% Django, 30% PHP shop in Manchester, in the UK. We're
looking to recruit a Django developer in the near future. This might
be of interest to some people on this list.

Job description and application information:

http://bit.ly/qlguI

Cheers,

--Jon

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Emacs/yasnippet bundle for Django 1.0

2009-04-16 Thread Jon Atkinson

Hello,

I've been wanting a better set of Django snippets to use with
yasnippet/Emacs for quite a while. I was at a bit of a loose end yesterday,
so I decided to do something about this :-) I've based this set of
snippets on Brian Kerr's excellent set of Django 1.0 snippets for
Textmate[1]. They've available on github at:

http://github.com/jonatkinson/yasnippet-djangotree/master

... and I've made the first release, a tarball is available here:

http://cloud.github.com/downloads/jonatkinson/yasnippet-django/yasnippet-django-1.0.zip

I hope someone finds this useful.

Cheers,

--Jon

[1] http://bitbucket.org/bkerr/django-textmate-bundles/wiki/Home

--~--~-~--~~~---~--~~
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: Emacs/yasnippet bundle for Django 1.0

2009-04-16 Thread Jon Atkinson

Hello,

> http://github.com/jonatkinson/yasnippet-djangotree/master

Somehow I managed to make a typo :-) The correct link to the github page is:

http://github.com/jonatkinson/yasnippet-django/tree/master

Cheers,

--Jon

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Django advocacy in a commercial environment

2007-07-19 Thread Jon Atkinson

Hello,

Having just finished a couple of large projects in PHP4, our
department (of 5 programmers) is looking to move to PHP5 - but me and
another on the team have been pushing towards using Python/Django in
future.

While everyone sees the benefits of moving to Python (namespaces!
enforced syntax! and more!), it would help us immensely if we could
find some resources to wow the other programmers here.

I was fortunate enough to attend Simon Willison's excellent talk at
LUGRadio Live 2006, which really inspired me to start using Django,
but short of inviting him here (and probably paying him), I'm not sure
I could recreate that kind of convincing argument myself. Which leaves
us with online resources, presentations, screencasts and suchlike.

If anyone has any good resources which show off the power of Django
(and by association, the benefits of PHP), then please share them with
us.

Thanks,

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django advocacy in a commercial environment

2007-07-19 Thread Jon Atkinson

Oops, a quick edit - that last sentence should of course read:

...'benefits *over* PHP'...

--Jon

On 7/19/07, Jon Atkinson <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Having just finished a couple of large projects in PHP4, our
> department (of 5 programmers) is looking to move to PHP5 - but me and
> another on the team have been pushing towards using Python/Django in
> future.
>
> While everyone sees the benefits of moving to Python (namespaces!
> enforced syntax! and more!), it would help us immensely if we could
> find some resources to wow the other programmers here.
>
> I was fortunate enough to attend Simon Willison's excellent talk at
> LUGRadio Live 2006, which really inspired me to start using Django,
> but short of inviting him here (and probably paying him), I'm not sure
> I could recreate that kind of convincing argument myself. Which leaves
> us with online resources, presentations, screencasts and suchlike.
>
> If anyone has any good resources which show off the power of Django
> (and by association, the benefits of PHP), then please share them with
> us.
>
> Thanks,
>
> --Jon
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django advocacy in a commercial environment

2007-07-20 Thread Jon Atkinson

Thanks for your reply, Rob.

Personally, the reason we're looking to push Django is that our
business needs very much match a statement Simon made in the talk I
mentioned above: 'Web development on journalism deadlines' (that might
not be entirely accurate).

I was also considering putting together a report, but we all know the
problems with code metrics - do we measure LoC, speed of development,
or the very nebulous 'simplicity' concept which will be quite
difficult to communicate to management.

I don't mean to pry, but at your workplace have you had any difficulty
hiring into Python/Django roles at your company (compared to PHP)? Do
you get less applicants? A better quality of applicant?

Cheers,

--Jon

On 7/19/07, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> On Jul 19, 1:19 am, "Jon Atkinson" <[EMAIL PROTECTED]> wrote:
> > If anyone has any good resources which show off the power of Django
> > (and by association, the benefits of PHP), then please share them with
> > us.
>
> Where I work we migrated away from PHP to Django with great success
> but it depends on your environment.
>
> For us the Django admin was a huge factor since we have teams entering
> content and the default Django admin was way better than anything we
> had going so far.
>
> There are some performance articles and blog posts, for example:
> http://wiki.rubyonrails.org/rails/pages/Framework+Performance
>
> We benefitted from the Django workflow with its built-in web server.
>
> There's also the fact that Django is improving everyday which
> translates into free new features or things that were hard to do are
> easy now.  For example, databrowse or djangosnippets.
>
> And we love Python and also love our jobs more because of the
> switch.  :)
>
> Those aren't really resources for you but depending on your in-house
> requirements it's not hard to find resources online to help guide the
> decision.  When I had to convince my superiors of the choice, I wrote
> a PDF document looking at the best choices in each language (Ruby,
> PHP, Python) and Django won out for our particular needs.
>
> -Rob
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Custom primary key using Oracle 10g

2007-08-14 Thread Jon Atkinson

Catriona,

I have very little Oracle experience, but also no reason to think that
setting a custom primary key would be different from any other
database backend.

The documentation is here:
http://www.djangoproject.com/documentation/models/custom_pk/

The primary key is set by using 'primary_key=True' in the model. A
simple model with a custom primary key:

class Employee(models.Model):
employee_code = models.CharField(max_length=10, primary_key=True)
first_name = models.CharField(max_length=20)
last_name = models.CharField(max_length=20)

I hope this helps.

--Jon

On 8/14/07, Catriona <[EMAIL PROTECTED]> wrote:
>
> Hello
>
> I am a beginning Django user and would appreciate help on the
> following issue.
>
> How do I specify a custom primary key in my model when using Oracle
> 10g
>
> I am using the lastest Django version from svn.
>
> Thanks for your help
>
> Catriona
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Questions regarding contrib.sitemaps

2007-08-14 Thread Jon Atkinson

Hello,

I'm trying to implement the a sitemap.xml file using the
contrib.sitemaps framework. It's pretty simple to use, but the output
I'm getting is not correct.

My code in sitemaps.py is as follows. Notice I've used the optional
location() method.:

from django.contrib.sitemaps import Sitemap
from jonatkinson.blog.models import Post

class BlogSitemap(Sitemap):
changefreq = "weekly"
priority = 0.5

def items(self):
return Post.objects.all()

def lastmod(self, obj):
return obj.date

def location(self, obj):
return "/blog/%s" % obj.slug

And a snippet of the output I'm getting is:




http://example.com/blog/ghetto-backup
2007-06-25
weekly
0.5





http://example.com/blog/removing-.svn-from-a-subversion-repository

2007-05-25
weekly
0.5


As you can see, the locations generated includes 'example.com', which
is not correct. According to the documentation, the location method is
supposed to "URL that doesn't include the protocol or domain"[1]. I'm
guessing that the sitemaps framework is somehow tied to the sites
framework. Has anyone else come across this issue before?

Thanks,

--Jon

[1] http://www.djangoproject.com/documentation/sitemaps/#location

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Questions regarding contrib.sitemaps

2007-08-14 Thread Jon Atkinson

On 8/14/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> On Tue, 2007-08-14 at 10:29 +0100, Jon Atkinson wrote:
> [...]
>
> > As you can see, the locations generated includes 'example.com', which
> > is not correct. According to the documentation, the location method is
> > supposed to "URL that doesn't include the protocol or domain"[1]. I'm
> > guessing that the sitemaps framework is somehow tied to the sites
> > framework.
>
> Yes, it is. Edit the site information via the admin interface to display
> the correct domain name and all will be well.
>

That worked perfectly. Thanks for your help, Malcolm.

--Jon

> --
> No one is listening until you make a mistake.
> http://www.pointy-stick.com/blog/
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Design plus admin question

2007-08-14 Thread Jon Atkinson

I've been experimenting with this too, and I've put a declaration of:

live = True

at the top of my urls.py file. Then the sections of my urls.py file
which change between development and live are just put inside an if
else block. Remember, all the files are interpreted, so this works
quite well. An example:

from django.conf.urls.defaults import *
from organisation.views import *

live = True

if live:
urlpatterns = patterns('',
(r'^/mis/?$', 'mis.organisation.views.index'),
)
else:
urlpatterns = patterns('',
(r'^/?$', 'mis.organisation.views.index'),
)

I've written post-commit and post-checkout hook scripts for git
(though you could do the same easily with SVN) which simple change the
live = True to live = False or vice-versa as necessary.

Hope this helps.

--Jon

On 8/14/07, Ritesh Nadhani <[EMAIL PROTECTED]> wrote:
>
> Well, I can do that. I just wanted to know if that is the right way. I
> have total control over the server as I am the admin. Just wanted to
> follow the right way :)
>
> On 8/14/07, Graham Dumpleton <[EMAIL PROTECTED]> wrote:
> >
> > Why can't you mount it at root on the development and personal
> > developer servers so it will match production? Use a different port
> > just for Django if you really must because of the personal developer
> > servers running other stuff. It is much easier to deal with it being a
> > different port number than it being mounted at a different URL.
> >
> > Graham
> >
> > On Aug 14, 3:45 pm, acidity <[EMAIL PROTECTED]> wrote:
> > > Hi
> > >
> > > This is more of a design question then anything.
> > >
> > > We are using Apache andmod_pythonin our development server. The
> > > whole Django project is kept as subfolder in the Apache data
> > > directory. So everybody out here can access it over:
> > >
> > > http://192.168.1.10/project
> > >
> > > The project is actually checked out from a subversion code repository.
> > > Now every developer checks out the project on his individual machine
> > > and works on it.
> > >
> > > A part of the urls.py:
> > >
> > > urlpatterns = patterns('',
> > > (r'^project/$', 'project.views.index'),
> > > (r'^project/login/$', 'django.contrib.auth.views.login',
> > > {'template_name': 'accounts/login.html'}),
> > > )
> > >
> > > Now each development server while running their local copy, need to
> > > access the project at:
> > >
> > > http://127.0.0.1:8000/projectand it works. Ideally, we would have
> > > wanted onlyhttp://127.0.0.1:8000but we can live with that.
> > >
> > > Now later on when we go live with, the website would be accessed 
> > > from:http://www.domain.com. Now, during our testing it fails as the 
> > > regular
> > > expression will not match for top level.
> > >
> > > How do you manage such settings? In the end we will just checkout the
> > > project in the data directory of Apache and it will go live.
> > >
> > > We dont want to change any settings between test and production so
> > > that we dont miss anything or do any unrequired changes.
> > >
> > > Also, it may happen that the DB settings might be different too so
> > > what would be the best way to manage such a setting?
> > >
> > > I am sure this is a very common setup.
> > >
> > > Ritesh
> >
> >
> > >
> >
>
>
> --
> Ritesh
> http://www.riteshn.com
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Using contrib.sitemaps with multiple domains

2007-08-14 Thread Jon Atkinson

Hello,

More on the contrib.sitemaps framework.

My personal site is available at three different URLs:

jonatkinson.org
jonatkinson.eu
jonatkinson.co.uk

The same code runs all the sites, though I have some code which
inspects the request object and prints a different title based on the
domain you hit.

I've recently installed a sitemap (eg. jonatkinson.co.uk/sitemap.xml),
but no matter which domain I hit, I always get URLs which start with
the .co.uk domain. I'm sure this is entirely normal behaviour, as this
is the SITE_ID which I have defined in my settings.py.

I'm pretty sure that serving an incorrect sitemap.xml for a domain is
worse than having no sitemap at all. If I could change the SITE_ID
based on the request, then I imagine that this would work correctly,
but I'm not even sure if that is possible. Any ideas?

Thanks,

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Using Django to generate Flash/Flex content

2007-08-14 Thread Jon Atkinson

I think there is a general reticence to move into this area, given
Django's roots in web publishing, where HTML is the lowest common
denominator.

I can't speak on behalf of any of the developers, but I'd imagine that
the news organisations which Django grew from were more concerned with
traditional HTML content than the rich plugin options.

I do believe that I've read on this list recently of someone using
Django to develop GUI applications with wxWidgets, so not everyone is
using Django to generate HTML.

I'd love to hear back from you if you do create anything using Django
with Flash.

Best,

--Jon

On 8/14/07, SamFeltus <[EMAIL PROTECTED]> wrote:
>
> I don't understand why none of the major Python frameworks embrace
> Flash/Flex wholeheartedly, especially with innovations such as
> Papervision3D, which will happen in HTML when monkeys fly.
>
> Oh well...
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django hosting companies

2007-08-15 Thread Jon Atkinson

I've just started running a Django friendly host (though I'm not sure
Django-friendly is the correct term - maybe Django *preferred* is
better).

We're currently looking for a few (maybe five) people to test our
service before we launch to the world. We offer Django SVN and Django
0.95, git, svn and lots of nice toys, along with Rails, Capistrano and
Mongrel if you're a fan of the /other/ framework.

Contact me off-list and we can talk about getting you into our testing
programme.

I hope this isn't considered a commercial posting :-)

--Jon

On 8/15/07, Matt Davies <[EMAIL PROTECTED]> wrote:
> Rimu Hosting's VPS offering is brilliant
>
> http://rimuhosting.com/
>
> Their support is the best.
>
>
>
>
> On 15/08/07, Jay Parlar <[EMAIL PROTECTED]> wrote:
> >
> > On 8/14/07, Ian Lawrence <[EMAIL PROTECTED]> wrote:
> > >
> > > ola
> > > i have said before on this list but these
> > > http://www.webfaction.com/
> > > guys are awesome...i have nothing to do with them i just respect their
> > > service and support
> > > []'s
> > > Ian
> >
> > I'll second this. Webfaction is the way to go. They're very
> > knowledgeable about Python *and* Django, you get your own Apache
> > process (so no FCGI to fight with).
> >
> > I have Django sites hosted with both DreamHost and Webfaction. While
> > Dreamhost is pretty good, once you get it working, I recommend
> > Webfaction. So much easier to setup, direct contact on the forums with
> > the people who run it, it's just fantastic. Get DreamHost if you want
> > to use all the other features it offers (they have a bunch of
> > one-click installs), but if Django is your main concern, then go
> > WebFaction.
> >
> > Jay P.
> >
> >
>
>
>  >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Design plus admin question

2007-08-15 Thread Jon Atkinson

I'd not seen that page before - there are some much better solutions
on there than my method. I particularly like Michael Radziej's
solution which uses the ConfigParser and a .ini file.

--Jon

On 8/14/07, larsholm <[EMAIL PROTECTED]> wrote:
>
> On top of above approach you can use ideas from
> http://code.djangoproject.com/wiki/SplitSettings to separate your
> settings into *common* and *deployment specific* settings. In this
> way, you won't need to edit the urls file (or have SVN to do it). Just
> setup a file on each deployment system specifying special settings,
> like db connection or live=true|false. Then just get settings.py to
> read the settings from this file.
>
> Cheers,
> Lars
>
> On Aug 14, 5:59 pm, "Ritesh Nadhani" <[EMAIL PROTECTED]> wrote:
> > Okay.
> >
> > That was most helpful. I think I will do the same. This is much more 
> > intuitive.
> >
> > On 8/14/07, Jon Atkinson <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> >
> > > I've been experimenting with this too, and I've put a declaration of:
> >
> > > live = True
> >
> > > at the top of my urls.py file. Then the sections of my urls.py file
> > > which change between development and live are just put inside an if
> > > else block. Remember, all the files are interpreted, so this works
> > > quite well. An example:
> >
> > > from django.conf.urls.defaults import *
> > > from organisation.views import *
> >
> > > live = True
> >
> > > if live:
> > > urlpatterns = patterns('',
> > > (r'^/mis/?$', 'mis.organisation.views.index'),
> > > )
> > > else:
> > > urlpatterns = patterns('',
> > > (r'^/?$', 'mis.organisation.views.index'),
> > > )
> >
> > > I've written post-commit and post-checkout hook scripts for git
> > > (though you could do the same easily with SVN) which simple change the
> > > live = True to live = False or vice-versa as necessary.
> >
> > > Hope this helps.
> >
> > > --Jon
> >
> > > On 8/14/07, Ritesh Nadhani <[EMAIL PROTECTED]> wrote:
> >
> > > > Well, I can do that. I just wanted to know if that is the right way. I
> > > > have total control over the server as I am the admin. Just wanted to
> > > > follow the right way :)
> >
> > > > On 8/14/07, Graham Dumpleton <[EMAIL PROTECTED]> wrote:
> >
> > > > > Why can't you mount it at root on the development and personal
> > > > > developer servers so it will match production? Use a different port
> > > > > just for Django if you really must because of the personal developer
> > > > > servers running other stuff. It is much easier to deal with it being a
> > > > > different port number than it being mounted at a different URL.
> >
> > > > > Graham
> >
> > > > > On Aug 14, 3:45 pm, acidity <[EMAIL PROTECTED]> wrote:
> > > > > > Hi
> >
> > > > > > This is more of a design question then anything.
> >
> > > > > > We are using Apache andmod_pythonin our development server. The
> > > > > > whole Django project is kept as subfolder in the Apache data
> > > > > > directory. So everybody out here can access it over:
> >
> > > > > >http://192.168.1.10/project
> >
> > > > > > The project is actually checked out from a subversion code 
> > > > > > repository.
> > > > > > Now every developer checks out the project on his individual machine
> > > > > > and works on it.
> >
> > > > > > A part of the urls.py:
> >
> > > > > > urlpatterns = patterns('',
> > > > > > (r'^project/$', 'project.views.index'),
> > > > > > (r'^project/login/$', 'django.contrib.auth.views.login',
> > > > > > {'template_name': 'accounts/login.html'}),
> > > > > > )
> >
> > > > > > Now each development server while running their local copy, need to
> > > > > > access the project at:
> >
> > > > > >http://127.0.0.1:8000/projectandit works. Ideally, we would have
> > > > > > wanted onlyhttp://127.0.0.1:8000b

Re: Using Django to generate Flash/Flex content

2007-08-15 Thread Jon Atkinson

> Anyways, it's just an experiment.  I'll stick the latest version up on
> the net tonight in case someone else finds it amusing...

I would be interested in seeing this. Could you make some of the
source available?

--Jon

>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django-cart integration?

2007-08-16 Thread Jon Atkinson

On 8/15/07, MikeHowarth <[EMAIL PROTECTED]> wrote:
>
> Does anyone have experience of integrating django-cart in to an app?
>
> I've tried adding this to my project, however soon as I use runserver
> I get issues with the models:
>
> name 'Teacher' is not defined
>
> Anyone any idea?

Could you paste the output of ./manage.py validate, and your models.py
file for each of your apps? It sounds like you're just missing an
import statement somewhere.

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Changing database structue

2007-08-16 Thread Jon Atkinson

It might be worth reading the wiki page on the Schema Evolution [1],
and if you're not using SVN, there is a patch [2] against Django 0.96
which implements schema evolution.

Other than that, you might want to look into dmigrate [3] (which I've
not personally used, so I'm not sure how mature it is), and this [4]
snippet might help, too.

--Jon

[1] http://code.djangoproject.com/wiki/SchemaEvolution
[2] http://kered.org/blog/2007-07-19/django-schema-evolution/
[3] http://code.google.com/p/dmigrate/
[4] http://www.djangosnippets.org/snippets/167/

On 8/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Oh. That's a real ouch. I really hoped I can avoid that.
>
> Thanks anyhow.
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Web developement with Python

2007-08-27 Thread Jon Atkinson

This is a very broad question, with some very ill-defined adjectives :-)

Generally, given enough resources then Django can scale up to websites
of 'enterprise' (what does that actually mean?) level. As is stated in
the FAQ [1], Django sites have happily held up to million hits/hour
slashdottings. I believe the site in question was chicagocrime.org.

As for the operating system and webserver, I'd say that the majority
of sites which are written in Django run on a Linux (this is anecdotal
evidence, however, I have no hard numbers to back this up with). A lot
of people use Apache with mod_python, and a lot of people use Apache
with flup and mod_fastcgi. Another option is lighttpd[2]. Once you can
give us a clearer idea on what your application will do, and your
performance expectations, I'm sure that there are people who can
advise you on deployment.

As for DB2, it is not a supported database backend, so you'd be on
your own, but if you're not worried about 'coding complexity', then
the addition of a DB2 backend would be something that I'm sure the
developers would gladly accept into Django trunk :-) Go for it!

--Jon

[1] http://www.djangoproject.com/documentation/faq/#is-django-stable
[2] http://www.lighttpd.net/

On 8/27/07, AMBROSE <[EMAIL PROTECTED]> wrote:
>
> I need a clear info on why Python is good for enterprise web
> developement .
>
> Can Python be used for a website having several 100 page hits /sec ?
>
> I am not bothered of coding complexity .
>
> How about linux OS, ,Python and
> DB2 express edition for webdevelopement?
>
> Ambrose
> PeterMary.com -- coming soon
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: hai am new one to django

2007-09-05 Thread Jon Atkinson

> > 4)how django  better then  ROR ...?
> LOL. I recalled an old joke:
>  Teacher asked the children in class to write a homework on the topic:
> "Who is the greatest hero of twentieth century and why it's Lenin?"

This reminds me of a post I saw somewhere (maybe it was a comic on
xkcd, I don't remember):

Person 1: "What do you do for a living?"
Person 2: "I work with computers."
Person 1: "So do I! What do you do with computers?"
Person 2: "I'm a Web developer."
Person 1: "So am I! Design, client-side programming or server-side programming?"
Person 2: "Server-side programming."
Person 1: "Same here! Do you use dynamically typed languages or
statically typed languages?"
Person 2: "Dynamically typed languages."
Person 1: "So do I! Do you use a Web framework, or do you roll things
on your own?"
Person 2: "I use a Web framework."
Person 1: "So do I! Django or Rails?"
Person 2: "Django."
Person 1: "We have nothing in common! Die heretic scum!"

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: hai am new one to django

2007-09-07 Thread Jon Atkinson

The mod_python documentation will help you:

http://www.modpython.org/live/current/doc-html/installation.html

And there is a very helpful mod_python mailing list you can subscribe
to and ask any questions you may have:

http://modpython.org/pipermail/mod_python/

Good luck!

--Jon

On 9/7/07, Damodhar <[EMAIL PROTECTED]> wrote:
>
> Hai ,
>
> I,read the django documentation , am very interest to learn django. so
> iwant to confiugure Apache (mod_python), But i don't know how to
> configure. now am working in php mysql.using XAMPP (http://
> www.apachefriends.org/en/xampp-windows.html)
> (PHP + Mysql + Apache) as a server installed in my local machine.
>
> How to configure Apache mod_python into my apache. if any thing want
> to install patch or any extra files to apache or change any lines to
> enabled the mod_python or add any lines in config files or any other
> files which line i want to edit
>
> please help me ( I am very interest to learn )
>
> 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Capisdjango

2007-09-09 Thread Jon Atkinson
Sure :-)

On 9/8/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
>
> Sure. Anyone to join me?
>
> El s�b, 08-09-2007 a las 07:32 -0500, James Bennett escribi�:
> > On 9/8/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
> > > Why hasn't anyone thought of something like capistrano for django. (Yeah
> > > I know it can work, but there're a few features for RoR'ers).
> >
> > Lots of people have thought of it. What they haven't done is written
> > it. Want to be the first? ;)
> >
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Can u help me how to configure MOD_PYTHON am new one to django

2007-09-10 Thread Jon Atkinson

Damodhar,

It seems your problem isn't with Django, but with the configuration of
mod_python, and so I think your question would be better directed to
the mod_python mailing list[1], rather than here.

Good luck,

--Jon

[1] http://mailman.modpython.org/mailman/listinfo/mod_python

On 9/10/07, MikeHowarth <[EMAIL PROTECTED]> wrote:
>
> You'd place the configuration code with the httpd.conf file
>
> Once done restart Apache
>
> On Sep 10, 7:36 am, Damodhar <[EMAIL PROTECTED]> wrote:
> > hi
> > I,am new one to django,
> >
> > I am very intrst to learn Django, so i install python latest verson,
> > and try to install daango latest verson but it want;s's to
> > configure .. mod_python module , can u help me
> >
> > am using WINDOWS XP SYSTEM  now am working in PHP MYSQL USING XAMPLITE
> > (APACHE +PHP + MYSQL Package)
> >
> > i read the documentation for mod_python intallation but i cant able to
> > get ckear idea
> >
> > wher do iwant to configure path apache\bin i found  APXS file ...I
> > wwant to configure(write inside the apxs file ) or  apache\conf\
> > httpd.config file... where do i want to write a  configuration code ,
> > can u pls give me the details and code and were exactly write it
> > please give me the step by step.. to run django .
> >
> > 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django deployment à lá Capistrano

2007-09-10 Thread Jon Atkinson

> "automating django's deployment tasks" sounds like a good start for me.

A rough list of what I consider those tasks to be:

0) Checking in the local source changes if they have not already been
checked in (optional).
1) Logging into the deployment target.
2) Checking out the latest source.
3) Modifying the production database as necessary.
4) Making appropriate changes to settings.py.
5) Running tests
6) Restarting the server
7) Cleaning up and logging out.

I'm sure there is more to this (particularly, point three is vastly
over-simplified :-P), but please add to this as necessary.

--Jon


>
> --
> Angel
>
> 2007/9/8, Chris Hoeppner <[EMAIL PROTECTED]>:
> >
> > Hi there,
> >
> > This is just to make it a bit more obvious. I've decided to make up a
> > python application similar to Capistrano, for Django.
> >
> > I plan it to be similar in the sense of "it uses the same goal, and a
> > few same ideas", and it's not going to be a port of Capistrano to
> > Python.
> >
> > I've called this project Djangostrano, though I'll come up with a better
> > name before the folks at 37signals run storms of fury on me :)
> >
> > If anyone has done some steps in this direction, please let me know, as
> > we could join forces. Also, if anyone is *interested* in contributing a
> > bit, don't hesitate to contact me.
> >
> > A few fundamental guidelines lay already, but I'm still in the
> > brainstorming stage. This is the right stage for anyone to join me.
> >
> > I'll be glad to hear from you.
> > --
> >
> > Saludos,
> >
> > Chris Hoeppner,
> > Passionate about on-line interaction
> >  627 471 720
> >  [EMAIL PROTECTED]
> >  www.pixware.org
> >
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.4.6 (GNU/Linux)
> >
> >
> iD8DBQBG4uAdSyMaQ2t7ZwcRAt1NAKDMwg2Pt4PNNO3E3WcxGCJ7T82QAgCgx+25
> > hUzCBlmfaOU4xpcEIO67b2g=
> > =T5O4
> > -END PGP SIGNATURE-
> >
> >
>
>
>  >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django Video - For a good laugh

2007-09-10 Thread Jon Atkinson
Brilliant :-)

On 9/10/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
>
> *lmaorof*
>
>
> El lun, 10-09-2007 a las 16:20 +, Gregg Pollack escribi�:
> > Django guys,
> >
> >  I know a few of you must be familiar with the Ruby on Rails vs
> > ___ commercials http://www.railsenvy.com/tags/Commercials
> >
> >  We just posted a "Ruby on Rails vs Django" video here:
> >
> >  http://www.railsenvy.com/2007/9/10/ruby-on-rails-vs-django-commercial-7
> >
> >  Disclaimer:  If you think we're trying to be inflammatory in any
> > way.. please read the "Spoiler Alert" section under the video on the
> > page.
> >
> >  Keep up the great work guys,
> >
> > Gregg Pollack
> > RailsEnvy.com
> >
> >
> > >
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Experimental port of Django to Java

2008-01-04 Thread Jon Atkinson

On 1/4/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> For some unknown reason I have created a Java port of parts of
> Django,

I'd love to know a little more about *why* you did this. Are you tied
to Java as a platform? I think it's an impressive achievement, but are
you so stuck with Java that a switch to Python would be impossible?

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Heads-down transaction-processing apps on Django

2008-02-02 Thread Jon Atkinson

> >> - Data entry people use lots of F-keys, Ctrl-keys and Alt-keys to make
> >> things happen on the screen.
> >
> > Not quite as much flexibility here.  HTML defines accelerator
> > keys which are browser-specific (sometimes Alt+letter, sometimes
> > control+letter, or other combos).
>
> This is perhaps the only disappointing news from your experiences.
>
> > As a vi/vim user, my fingers occasionally
> > try to use control+W to delete the previous word while I'm typing
> > in IE, only to have it close my whole window.  Minutes of sotto
> > voce oaths usually follow.
>
> Ug. This would be disastrous to a clerk on a tight queue. In the very
> least it looks like I may have to make Firefox a requirement as there
> appear to be fewer push-here-to-explode opportunities.

Depending on how much control you have over your deployment, remember
that is it pretty much trivial to modify the Firefox XUL files which
define the keyboard shortcuts browser-wide. Turning off certain
shortcut combinations would take a few minutes at the most, once ou
knew where to look. Then just distribute the XUL files to the clients
(I think you do it via Firefox profiles, so you would have a profile
on each client called 'Data Entry' or similar).

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



RSS escaping, {{ autoescape }} and |safe

2008-02-02 Thread Jon Atkinson

My blog uses some very simple Django apps, and applications in contrib
for most of the features, including django.contrib.syndication.feeds.

I've recently noticed that my RSS isn't being properly escaped (see
http://jonatkinson.co.uk/feeds/blog/), so I thought that simply
wrapping my RSS blog_description.html template in an autoescape tag
would solve the problem:

{% autoescape off %}
{{ obj.content|linebreaks }}
{% endautoescape %}

... where obj.content is a post object, and I want to have Django add
the  and  tags for me (hence the |linebreaks).

However, this doesn't seem to have made the problem go away, or does
any combination of {{ autoescape off }}, |safe, or similar. I'm sure
I'm not the only person who has come across this problem - is there a
magic combination of template filters to fix this? I realise that RSS
shouldn't be presentational, and that is it hard for Django to
determine whether a < or a > is meant literally or as part of a tag,
but surely this is a very common usage pattern?

Any help would be much appreciated.

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django hosting service running Os C

2008-02-21 Thread Jon Atkinson

If it's for  school project, and you just need to demo it, why not
host it on your own machine and use one of the free dynamic DNS
services and host it on the development machine?

--Jon

>  >  On Feb 17, 2008 3:12 PM, Flavio Curella <[EMAIL PROTECTED]> wrote:
>  >  >
>  >  > Hi,
>  >  >
>  >  > I developed a small application using django and CoreGraphics library
>  >  > as a school project. I'm wondering to put it online and I googled
>  >  > around looking for a web hosting solution (shared or VPS) running on
>  >  > Os X and that supports Django.
>  >  >
>  >  > Does anybody know one?
>  >
>  >
>  >  A quick Google search found a few, but most of them were way over
>  >  priced for what you got (One I saw was $55/month for shared hosting).
>  >  http://serverlogistics.com/hosting.php seemed like the most reasonably
>  >  priced one I could find
>  >
>  >
>  >
>  >  >
>  >
>
>  >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django hosting website

2008-03-25 Thread Jon Atkinson

I offer Django hosting (dedicated, not shared), via my company, Mampi Hosting.

http://mampi.co.uk/django/

Email me off-list if you're interested.

--Jon

On Tue, Mar 25, 2008 at 10:05 AM, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
>
>  After being using VPS based hosting for a while, I have found shared
>  hosting is just not good enough anymore. You just need the flexibility.
>
>  ~ Chris
>
>  El lun, 24-03-2008 a las 18:29 -0400, Julian DeFronzo escribió:
>
>
> > Yeah for more flexibility Slicehost or any VPS would be a better
>  > option, but like the others said if something breaks you gotta fix
>  > it.
>  >
>  > However, if you do decide to go with a VPS, you can just send me an
>  > email, and I'd be happy to set it up and maintain it for you ;)
>  >
>  > On Mon, Mar 24, 2008 at 2:09 PM, Bryan Veloso <[EMAIL PROTECTED]>
>  > wrote:
>  >
>  > >Lots more flexibility, but when things break its your fault.
>  >
>  >
>  > Well at least you're able to rebuild instead of begging
>  > customer
>  > service to do it for you. I'll definitely submit my +1 for
>  > Slicehost.
>  >
>  > -Bryan
>  >
>  >
>  >
>  >
>  >
>  >
>  > --
>  > ~Julian D.
>  > >
>
>
>  >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django deployment à lá Capistrano

2007-09-11 Thread Jon Atkinson
Are you going to create a wiki and repository for this project any
time soon? It would be a much more effective means of collaboration
than the mailing list.

--Jon

On 9/11/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
>
>
> > > I think db schema migration should wait until django has some
> > > feature that supports it, a limited set of scripting (python itself
> > > of course) should be allowed in the "recipes"
>
> I will take note of that. I thought that I'd leave that bit for the end
> anyways.
>
> The bit about the "recipes" is a good idea. Make up a "cooking book" of
> standard stuff and let people put it together, like "update from svn,
> update postgresql database from sql file, restart nginx", and leave
> space for them to plug in custom stuff. Sounds like a good start.
>
>
>
> El lun, 10-09-2007 a las 20:50 -0300, qwerty escribi�:
>
> > "recipes" is capistrano nomenclature, how should be called in this new
> > project? "jobs", or "tasks" is a good way to go.
> >
> > I think that a good way to go is first define a set of servers, each
> > one with differents services, and define a global service->task
> > relation.
> > Then a per-server relation if special jobs are needed in each one,
> > this way we can make a "task" able to clear memcache, other task
> > restarting lighttpd, etc in different servers, yaml looks like a good
> > option for this configuration, or something parseable by ConfigParser
> > sounds better?
> >
> > 2007/9/10, David Reynolds <[EMAIL PROTECTED]>:
> >
> >
> > On 10 Sep 2007, at 4:13 pm, Chris Hoeppner wrote:
> >
> > > I see your point. Why reinvent the wheel? True. But I'm not
> > trying to
> > > re-do capistrano using python instead of ruby. Capistrano
> > has been the
> > > spark that made me think about doing this, but that's all
> > there is to
> > > Capistrano.
> > >
> > > I'm doing this because:
> > >
> > > 1) I've anyways been thinking about this for ages.
> > >
> > > 2) I'd love to "djangostrano.py publish" or "djangostrano.py
> > > update-remote".
> > >
> > > 3) What about rails' migrations? It's *the* feature I've
> > been dreaming
> > > of for django. What about "djangostrano.py new-evolution
> > > evolution_name"? And "djangostrano.py db-evolve"?
> > >
> > > 4) For the newbies: Learn python, django, then ruby and
> > capistrano?
> > > Manually alter databases when schema evolves? Ugh... Learn
> > python,
> > > django, and publish. Draft database modifications using
> > python, and
> > > store them to make the database evolve. Sounds better
> > IMHO :)
> > >
> > > 5) I prefer to write my recipes in python instead of adding
> > another
> > > language to the mix. I already have to mangle python with
> > all the
> > > frontend scripting and markup stuff. I'd love to keep it
> > simpler.
> > >
> > > 6) I don't mind "reinventing the wheel" if it has any
> > benefits, and
> > > the
> > > above are enough for me, though that's only a rough draft of
> > what I've
> > > been working on. More to come.
> > >
> > > By the way. I don't try to tell anyone that "my tool's
> > superior to
> > > tool
> > > X". I'm just letting the community know. Anyone to join my
> > efforts?
> > > Gorgeous. Not? I'd love this kind of tool anyways. I'd be
> > doing it
> > > alone, if that's the only way.
> >
> > Fair enough, good luck to you. I look forward to seeing the
> > results ;)
> >
> > Cheers,
> >
> > Dave
> >
> > --
> > David Reynolds
> > [EMAIL PROTECTED]
> >
> >
> >
> >
> >
> > >
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django deployment à lá Capistrano

2007-09-11 Thread Jon Atkinson
I'm not sure the name is really as important as working code.

--Jon

On 9/11/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
>
> I'll be creating a google code page as soon as we settle down on a name.
> I like Djangostrano. Sounds nice. But I'm not sure about anyone crying
> out something about "ripping other people's ideas".
>
> El mar, 11-09-2007 a las 11:45 +0100, Jon Atkinson escribió:
> > Are you going to create a wiki and repository for this project any
> > time soon? It would be a much more effective means of collaboration
> > than the mailing list.
> >
> > --Jon
> >
> > On 9/11/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > > > I think db schema migration should wait until django has some
> > > > > feature that supports it, a limited set of scripting (python itself
> > > > > of course) should be allowed in the "recipes"
> > >
> > > I will take note of that. I thought that I'd leave that bit for the end
> > > anyways.
> > >
> > > The bit about the "recipes" is a good idea. Make up a "cooking book" of
> > > standard stuff and let people put it together, like "update from svn,
> > > update postgresql database from sql file, restart nginx", and leave
> > > space for them to plug in custom stuff. Sounds like a good start.
> > >
> > >
> > >
> > > El lun, 10-09-2007 a las 20:50 -0300, qwerty escribi�:
> > >
> > > > "recipes" is capistrano nomenclature, how should be called in this new
> > > > project? "jobs", or "tasks" is a good way to go.
> > > >
> > > > I think that a good way to go is first define a set of servers, each
> > > > one with differents services, and define a global service->task
> > > > relation.
> > > > Then a per-server relation if special jobs are needed in each one,
> > > > this way we can make a "task" able to clear memcache, other task
> > > > restarting lighttpd, etc in different servers, yaml looks like a good
> > > > option for this configuration, or something parseable by ConfigParser
> > > > sounds better?
> > > >
> > > > 2007/9/10, David Reynolds <[EMAIL PROTECTED]>:
> > > >
> > > >
> > > > On 10 Sep 2007, at 4:13 pm, Chris Hoeppner wrote:
> > > >
> > > > > I see your point. Why reinvent the wheel? True. But I'm not
> > > > trying to
> > > > > re-do capistrano using python instead of ruby. Capistrano
> > > > has been the
> > > > > spark that made me think about doing this, but that's all
> > > > there is to
> > > > > Capistrano.
> > > > >
> > > > > I'm doing this because:
> > > > >
> > > > > 1) I've anyways been thinking about this for ages.
> > > > >
> > > > > 2) I'd love to "djangostrano.py publish" or "djangostrano.py
> > > > > update-remote".
> > > > >
> > > > > 3) What about rails' migrations? It's *the* feature I've
> > > > been dreaming
> > > > > of for django. What about "djangostrano.py new-evolution
> > > > > evolution_name"? And "djangostrano.py db-evolve"?
> > > > >
> > > > > 4) For the newbies: Learn python, django, then ruby and
> > > > capistrano?
> > > > > Manually alter databases when schema evolves? Ugh... Learn
> > > > python,
> > > > > django, and publish. Draft database modifications using
> > > > python, and
> > > > > store them to make the database evolve. Sounds better
> > > > IMHO :)
> > > > >
> > > > > 5) I prefer to write my recipes in python instead of adding
> > > > another
> > > > > language to the mix. I already have to mangle python with
> > > > all the
> > > > > frontend scripting and markup stuff. I'd love to keep it
> > > > simpler.
> > > > >
> > > > > 6) I d

Re: Django deployment à lá Capistrano

2007-09-11 Thread Jon Atkinson
Excellent - I look forward to the URL.

--Jon

On 9/11/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
>
> I know, I know. Know what? I'll setup a trac site on a domain of mine.
> We can always move it somewhere else.
>
> El mar, 11-09-2007 a las 14:02 +0100, Jon Atkinson escribió:
> > I'm not sure the name is really as important as working code.
> >
> > --Jon
> >
> > On 9/11/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
> > >
> > > I'll be creating a google code page as soon as we settle down on a name.
> > > I like Djangostrano. Sounds nice. But I'm not sure about anyone crying
> > > out something about "ripping other people's ideas".
> > >
> > > El mar, 11-09-2007 a las 11:45 +0100, Jon Atkinson escribió:
> > > > Are you going to create a wiki and repository for this project any
> > > > time soon? It would be a much more effective means of collaboration
> > > > than the mailing list.
> > > >
> > > > --Jon
> > > >
> > > > On 9/11/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >
> > > > > > > I think db schema migration should wait until django has some
> > > > > > > feature that supports it, a limited set of scripting (python 
> > > > > > > itself
> > > > > > > of course) should be allowed in the "recipes"
> > > > >
> > > > > I will take note of that. I thought that I'd leave that bit for the 
> > > > > end
> > > > > anyways.
> > > > >
> > > > > The bit about the "recipes" is a good idea. Make up a "cooking book" 
> > > > > of
> > > > > standard stuff and let people put it together, like "update from svn,
> > > > > update postgresql database from sql file, restart nginx", and leave
> > > > > space for them to plug in custom stuff. Sounds like a good start.
> > > > >
> > > > >
> > > > >
> > > > > El lun, 10-09-2007 a las 20:50 -0300, qwerty escribi�:
> > > > >
> > > > > > "recipes" is capistrano nomenclature, how should be called in this 
> > > > > > new
> > > > > > project? "jobs", or "tasks" is a good way to go.
> > > > > >
> > > > > > I think that a good way to go is first define a set of servers, each
> > > > > > one with differents services, and define a global service->task
> > > > > > relation.
> > > > > > Then a per-server relation if special jobs are needed in each one,
> > > > > > this way we can make a "task" able to clear memcache, other task
> > > > > > restarting lighttpd, etc in different servers, yaml looks like a 
> > > > > > good
> > > > > > option for this configuration, or something parseable by 
> > > > > > ConfigParser
> > > > > > sounds better?
> > > > > >
> > > > > > 2007/9/10, David Reynolds <[EMAIL PROTECTED]>:
> > > > > >
> > > > > >
> > > > > > On 10 Sep 2007, at 4:13 pm, Chris Hoeppner wrote:
> > > > > >
> > > > > > > I see your point. Why reinvent the wheel? True. But I'm 
> > > > > > not
> > > > > > trying to
> > > > > > > re-do capistrano using python instead of ruby. Capistrano
> > > > > > has been the
> > > > > > > spark that made me think about doing this, but that's all
> > > > > > there is to
> > > > > > > Capistrano.
> > > > > > >
> > > > > > > I'm doing this because:
> > > > > > >
> > > > > > > 1) I've anyways been thinking about this for ages.
> > > > > > >
> > > > > > > 2) I'd love to "djangostrano.py publish" or 
> > > > > > "djangostrano.py
> > > > > > > update-remote".
> > > > > > >
> > > > > > > 3) What about rails' migrations? It's *the* feature I've
> > > &

Foreign key error "Reverse query name for field 'foo' clashes with field Foo.bar"

2007-09-12 Thread Jon Atkinson

Hello,

I've found a few previous threads on this list which covered this
problem, but none from which I found a satisfactory answer. Here is my
model definition from an app called 'sites':

class Site(models.Model):
"""This is a site."""
name = models.CharField(blank=True, maxlength=100)

class Domain(models.Model):
"""This is a domain."""
url = models.URLField(verify_exists=False)
site = models.ForeignKey(Site)
expires_on = models.DateField()
registered_on = models.DateField()
registrar = models.CharField(maxlength=100)
registrar_url = models.URLField(blank=True, verify_exists=True)

class Section(models.Model):
"""This is a site section."""
name = models.CharField(maxlength=100)
site = models.ForeignKey(Site)

And when I run ./manage.py validate, I get the following error:

sites.domain: Reverse query name for field 'site' clashes with field
'Site.domain'. Add a related_name argument to the definition for
'site'.
sites.domain: Reverse query name for field 'site' clashes with field
'Site.domain'. Add a related_name argument to the definition for
'site'.

Why is this? I don't see what the clash is. I apologise if I need this
explaining in simple language for a five-year-old, but sometimes I'm
stupid :-)

Thanks in advance for any help,

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Foreign key error "Reverse query name for field 'foo' clashes with field Foo.bar"

2007-09-13 Thread Jon Atkinson

Thank you all for your help - I renamed the application.

Best regards,

--Jon

On 9/13/07, Joseph Kocherhans <[EMAIL PROTECTED]> wrote:
>
> On 9/12/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> >
> > On Thu, 2007-09-13 at 08:16 +0800, Russell Keith-Magee wrote:
> > [...]
> > > The long term solution is to find a way to do the equivalent of 'from
> > > foo import bar as whiz'. This has been suggested previously; I believe
> > > the sticking point has been finding a syntax that is backwards
> > > compatible, but also elegant and intuitive.
> >
> > This is closed to sovle, form memory .There is a ticket somewhere, but I
> > can't find it at the moment. Joseph Kocherhans started things off and
> > then Vinay Sajip wrote something more comprehensive. So there's a patch
> > in Trac that needs somebody like you or I or Jacob or Adrian to review
> > and approve.
>
> I know that the work I did was very, well, hackish. I would be the
> first to oppose checking it in as-is. I haven't looked at Vinay
> Sajip's work, but here is the ticket in question:
>
> http://code.djangoproject.com/ticket/3591
>
> Joseph
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Django deployment à lá Capistrano

2007-09-27 Thread Jon Atkinson
Is anything happening with this project, or has it died on the vine?

--Jon

On 9/13/07, rex <[EMAIL PROTECTED]> wrote:
>
> Hello.
>
> I'd be interested in helping with writing a Capistrano replacement for
> Django in python (not a port!).
> I'm relatively new to django sites, but quite an old hand at python.
>
> Regarding names... surely this is the least important part of a
> project like this  :)
>
> My 2c though:   dojango! That's what it's doing.. it's doing my django
> site... so i don't have to stuff around in an ssh session for 100
> years to get the thing working :) Flame away.
>
> Alex
>
> Ps: Chris:  estas en espa�a? verdad?
>
> On Sep 10, 3:05 am, qwerty <[EMAIL PROTECTED]> wrote:
> > Well, I'm interesed in the project and as first idea from the bainstrom is
> > the name: Capistrano's url ishttp://www.capify.org/, why can we call it
> > capipy, the py at the end is a clasic (tm) of projects coded in Python.
> >
> > Another good idea is to review the concept of the tool to draw what it
> > should and what it should not do:
> >
> > "automating django's deployment tasks" sounds like a good start for me.
> >
> > --
> > Angel
> >
> > 2007/9/8, Chris Hoeppner <[EMAIL PROTECTED]>:
> >
> >
> >
> > > Hi there,
> >
> > > This is just to make it a bit more obvious. I've decided to make up a
> > > python application similar to Capistrano, for Django.
> >
> > > I plan it to be similar in the sense of "it uses the same goal, and a
> > > few same ideas", and it's not going to be a port of Capistrano to
> > > Python.
> >
> > > I've called this project Djangostrano, though I'll come up with a better
> > > name before the folks at 37signals run storms of fury on me :)
> >
> > > If anyone has done some steps in this direction, please let me know, as
> > > we could join forces. Also, if anyone is *interested* in contributing a
> > > bit, don't hesitate to contact me.
> >
> > > A few fundamental guidelines lay already, but I'm still in the
> > > brainstorming stage. This is the right stage for anyone to join me.
> >
> > > I'll be glad to hear from you.
> > > --
> >
> > > Saludos,
> >
> > > Chris Hoeppner,
> > > Passionate about on-line interaction
> > >  627 471 720
> > >  [EMAIL PROTECTED]
> > > www.pixware.org
> >
> > > -BEGIN PGP SIGNATURE-
> > > Version: GnuPG v1.4.6 (GNU/Linux)
> >
> > > iD8DBQBG4uAdSyMaQ2t7ZwcRAt1NAKDMwg2Pt4PNNO3E3WcxGCJ7T82QAgCgx+25
> > > hUzCBlmfaOU4xpcEIO67b2g=
> > > =T5O4
> > > -END PGP SIGNATURE-
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Data change history

2007-10-01 Thread Jon Atkinson

Hello,

I'd like to add a feature to the web application I'm developing, which
will track the changes to the data in the system. I've created a web
interface for various items of data, and each has a create and an edit
view.

If possible, I'd like to create a log of who edited or created a piece
of given data, so that when viewing that data I can display a nice
list: "Dave created this on 14/09/2007, Molly edited this on
17/09/2007" etc.

I noticed that the Django admin interface does something similar, so
could I expose this outside of /admin/?

Many thanks for any help.

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---




Re: Should Django have a road map?

2007-10-01 Thread Jon Atkinson

There are some interesting points here, I look forward to the replies.

--Jon

On 10/1/07, Stefan Matthias Aust <[EMAIL PROTECTED]> wrote:
>
> Over the last few weeks, we used Django to successfully create
> prototype applications and it just worked great (well, large file
> upload is broken, I had to patch our Django version with #2070 a
> couple of times). What a relieve compared to Java web development! A
> big "thank you" to all developers and this friendly user group.
>
> However, to sell Django to my management for "real" applications, it
> would be very helpful to have some kind of road map. We miss the
> structure and guidance ;)
>
> I'll try to explain my feelings:
>
> There's no 0.97 version despites all that changes to SVN trunk for
> months. The documentation clearly advertises the current trunk
> version, but the book refers to 0.96. The django book project seems to
> have died in Feb. The site does not explain why the missing chapters
> where never written/published and what the current state is.
> (Important) changes to the queryset API or admin UI are not applied in
> favor to some branched development which seems to be ongoing for
> months. No word on when it will hit the trunk. No word on when the
> next Django version will be published. Or what it will contain. Bugs
> like #2070 are open for more than a year. Of ~800 open tickets, 275
> need a design decision, that is need the attention of the core team.
> There are still 12 tickets from the last sprint (great effort, BTW)
> left to check-in. The casual observer easily gets the impression that
> work is sporadic, uncoordinated and not target-oriented, in one word:
> chaotic.
>
> While this is no problem in it self (and please do not feel offended,
> that's not my intention), it makes it difficult to build products upon
> that foundation. Is it useful to invest in the old admin UI? Or should
> we go for the new one? When will the query API be improved (we need
> aggregations, so I have to patch it)? Will there every be schema
> evolution?
>
> A lot of open source projects switched to a time boxed release scheme
> because that builds the most trust with users. If the Eclipse
> foundation (for example) publishes its mile stone road map you can be
> sure they will meet the date and release on time. IMHO one of the (not
> so secret) secrets of their enormous success.
>
> The counter-example is the trac project which tells everybody that
> they're now 3 months late with 0.11 and even have missed the next
> milestone, too. This tells everybody "hey, we're not able to implement
> a realistic schedule and are not even able to update our web page
> after we learned that" ;)
>
> So, I'd recommend to create a realistic road map. Release every two or
> three months. 0.96 or 0.97 communicates that it's almost done. That's
> obviously not the case. Just increment a single number. Tell your
> users when they can expect larger refactorings. If the problem is lack
> of time, try to find sponsors. The current "it's done when it's done"
> state of mind makes it difficult to invest in something we do not know
> whether, when and how it will evolve.
>
> Should I manage to convince my management to continue using Django, I
> should be able to dedicate one day per month to community work. That's
> what I can offer in return to using the framework.
>
> [As a side note: I actually have to defend Python/Django against Ruby
> on Rails because that's the "nextgen agil" framework even the
> management heard about and, frankly, it feels much more mature. This
> is another reason I'd like to have something more concrete than
> Django's ticket system. I originally picked Django because teaching
> and learning Python was much easier than teaching Ruby and the magic
> of Rails.]
>
> One idea I was playing around in my mind was to create some kind of
> "Django distribution", snapshotting the SVN version every month or so,
> perhaps adding a few useful 3rd party libraries and creating a ready
> to use and easily installable milestone version. That would be useful
> for others too, I hope, but I do not want to fork or split the
> development. However, I need some patches applied for our own work
> faster than in the official version.
>
> I'd like to know whether others feel the same and would like to see
> (and discuss) a focused road map or whether it's just me who cannot
> appreciate the creativity of chaos ;)
>
> Thanks for reading my ramblings...
>
> --
> Stefan Matthias Aust
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Should Django have a road map?

2007-10-01 Thread Jon Atkinson

> > > The documentation clearly advertises the current trunk
> > version, but the book refers to 0.96. The django book project seems to
> > have died in Feb. The site does not explain why the missing chapters
> > where never written/published and what the current state is.
>
> The book isn't dead, and I'll leave further explanation to a search of
> the mailing-list archive.

I think that searching the mailing list archives is missing the point.
Putting a statement on the index page of djangobook.com saying "No,
this isn't finished yet, we're still working on it", along with a
relatively recent date, would at least let people know that the book
hasn't been forgotten about, and would hopefully alleviate a lot of
redundant mailing list messages.

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Messaging component

2007-10-21 Thread Jon Atkinson

I'm not sure about anything which is ready-made, but this is quite
easily accomplished with one model:

class Message(models.Model):
"""This is a user-to-user message"""
to = models.ForeignKey(User)
from = models.ForeignKey(User)
message = models.TextField(blank=True)
sent_on = models.DateTimeField(blank=True, auto_now=True)
read = models.BooleanField(default=True)

class Admin:
pass

def __unicode__(self):
return "Message from %s to %s on %s" % (self.from, self.to, 
self.message)

Of course, replace the User foreign keys with your user model. Then
you just create a view for the inbox (to is the currently logged in
user, read is False), outbox (from is the currently logged in user).
This is a very simple model, but it should get you going.

--Jon


On 10/21/07, Julien <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I'm a Django newbie, and was wondering if there was an existing
> component/app to manage private messaging features, so that registered
> users can send messages to each other, have an inbox, etc.
> Something like there is on community sites like Facebook, or forum
> apps like PHPBB.
>
> Your help is much appreciated!
>
> Many thanks,
>
> Julien
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: python mvc framework and java mvc framework

2007-10-22 Thread Jon Atkinson

Hello,

> My question is to someone who actually try both, are they similar in
> productivity and enterprise quality?

I've used several Java frameworks, and I've been using Django for
quite a while in an large commercial setting; I find myself *much*
more productive with Django, and as for something being 'enterprise'
quality, I've found from experience that the technology you build
enterprise software on is entirely irrelevant; the quality of the
programmers who write the software is much more important.

Classing certain platforms as 'enterprise' (*is* there a definition of
that word yet that anyone can agree on?) is a crutch often used by bad
programmers or bad managers to justify the increasing costs of
employing a large amount of monkeys at a large amount of typewriters.

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Error During Django Install on Mac

2007-10-24 Thread Jon Atkinson

Please could you run the following command in your terminal, and paste
the output into your reply:

echo $PATH

--Jon

On 10/24/07, jnap <[EMAIL PROTECTED]> wrote:
>
> Don't know what RTFM means but sudo works.
>
> Now I get this error: -bash: django-admin.py: command not found when I
> run django-admin.py startproject testproject
>
> I suppose I am running it from the wrong directory but I have tried
> multiple ones and I get the same result with each try.
>
>
> On Oct 24, 2:48 am, Ben van Staveren <[EMAIL PROTECTED]> wrote:
> > No offense but uh, RTFM?
> >
> > (Protip: man sudo, man su)
> >
> > On 24/10/2007, at 1:45 PM, jnap wrote:
> >
> >
> >
> > > anyone?
> >
> > > On Oct 24, 2:36 am, jnap <[EMAIL PROTECTED]> wrote:
> > >> sorry for another dumb question...but how do i do it as root?
> >
> > >> On Oct 24, 2:32 am, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> >
> > >>> On 24-Oct-07, at 11:55 AM, jnap wrote:
> >
> >  jnap:~ jnap$ ln -s /usr/local/lib/python2.3/site-packages/
> >  django_src/
> >  django/bin/django-admin.py /usr/local/bin/django-admin.py
> >  ln: /usr/local/bin/django-admin.py: Permission denied
> >
> > >>> you have to do it as root
> >
> > >>> --
> >
> > >>> regards
> > >>> kghttp://lawgon.livejournal.comhttp://nrcfosshelpline.in/web/
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Error During Django Install on Mac

2007-10-24 Thread Jon Atkinson

Hi,

> sudo ln -s pathtodjango/bin/django-admin.py /usr/bin/django-admin.py

... that was my next step :-)

The link should technically go in /usr/local/bin as Django
was build locally, and it's part of the distributors package set
:-)

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Error During Django Install on Mac

2007-10-24 Thread Jon Atkinson

 > The link should technically go in /usr/local/bin as Django
> was build locally, and it's part of the distributors package set
> :-)

Oops, that should read "it's NOT part of the distributors package set".

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Query on Instant Messaging

2007-10-24 Thread Jon Atkinson

I've used xmpppy in the past to communicate with users over instant message:

http://xmpppy.sourceforge.net/

If you're just wanting users of the same site to communicate, have you
considered something like IRC? It's incredibly simple to use (you can
run the server on the same machine as the site), you just need a very
basic grasp of sockets. It wouldn't be difficult to use some AJAX to
fetch the incoming messages and send the outgoing ones.

--Jon

On 10/24/07, Subramanyam <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> Do we have any libraries in django to provide instant messaging or are
> there any open source project that we can integrate it into our web
> server (Django-server ) and provide instant messaging
>
> Just like what gmail has, some web-page based messaging between
> contacts of the same domain users
>
>
> Thanks in advance
>
> Subramanyam
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Kudzu Version of SonomaSunshine

2007-10-29 Thread Jon Atkinson

I have no idea what is it supposed to represent, but I was quite
hypnotised by that for a while :-)

Where is the soundtrack from?

--Jon

On 10/29/07, SamFeltus <[EMAIL PROTECTED]> wrote:
>
> Funkiest SonomaSunshine page ever... A slim, trim 30ish MB page,
> leaves time for fetching a beer or some coffee.  Takes about 10
> minutes to watch.  Yet another example of using Django to generate
> frilly, colorful Flash pages instead of more of that hypertext
> stuff...
>
> :)
>
> http://samfeltus.com/kudzu/KudzuMan.html
>
> ###
>
> http://samfeltus.com/site_index.html
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: ANN: Satchmo 0.6 Released

2007-11-01 Thread Jon Atkinson

Great - just as I downloaded 0.5 and got it working, I have to start over :-)

--Jon

On 10/31/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
>
> On 10/31/07, Chris Moffitt <[EMAIL PROTECTED]> wrote:
> >
> > There have been some spurious routing issues but it looks fine now.
> > Are you still not seeing it?
>
> Yep, up now. :)
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Context processor not loading

2007-11-01 Thread Jon Atkinson

Hi,

I'm having trouble with a context processor not running when I make a
request. I've tried to reduce this to the simplest case I can:

My projects tree is as follows:

project/
context_processors/
__init__.py
globals.py

The file, 'globals.py', contains the following:

def globals(request):
print "spam"
return { 'cp_test': "eggs" }

In settings.py, I have defined the following:

TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.auth',
'django.core.context_processors.request',
'project.context_processors.globals.globals',
)

As I understand it, this is all I need to do to have the context
processor execute properly, however neither 'spam' is output to the
console (I'm using the ./manage.py server), nor is 'eggs', or the
token 'cp_test' passed to the template. I'm sure I'm doing something
stupid, but what?

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: learning django and python

2007-11-12 Thread Jon Atkinson

Dive into Python is a good resource for learning Python:

http://www.diveintopython.org/

--Jon

On 11/12/07, sebey <[EMAIL PROTECTED]> wrote:
>
> hey I am new to python and all that and of course django so I know
> there is a django book up on the site but I was wondering if it would
> be a good idea to use that resource ( cause I do not have a lot of
> time on my hands) for learning pthyon and django as well and if
> possable what resources are there?
>
> 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Permissions and user.has_perm

2007-11-21 Thread Jon Atkinson

Hello,

I am having some trouble with user permissions. I've read the
documentation, but the built-in Permission object isn't behaving as I
expect. Any help would be appreciated.

I have a simple project containing one app. That app has one model,
which is as follows. The model should be irrelevant, but it's here for
the sake of completeness:

class Person(models.Model):

first_name = models.CharField(blank=True, maxlength=100)
second_name = models.CharField(blank=True, maxlength=100)

class Admin:
pass

When I run ./manage.py syncdb, I get the following output (sections
removed where not relevant to my question):

hostname:permtest jonathan$ ./manage.py syncdb
Creating table auth_message
Creating table auth_group
Creating table auth_user
Creating table auth_permission
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table foo_person

You just installed Django's auth system, which means you don't have
any superusers defined.
Would you like to create one now? (yes/no): yes
Username (Leave blank to use 'jonathan'): jonathan
Superuser created successfully.
Installing index for auth.Message model
Installing index for auth.Permission model
Loading 'initial_data' fixtures...
Installing index for admin.LogEntry model
No fixtures found.

I then have one superuser called 'jonathan', who has permission to do
anything. A shell session:

>>> from django.contrib.auth.models import User
>>> u = User.objects.get(id=1)
>>> u

>>> u.has_perm("person.add_person")
True

However, if I remove the 'superuser' status from that user, but assign
them all permissions (I simply click the 'choose all' button in
/admin/), the console session reports that this user has no
permissions, even though I can happily use /admin/ to, for example,
edit Person records:

>>> from django.contrib.auth.models import User
>>> u = User.objects.get(id=1)
>>> u

>>> u.has_perm("person.add_person")
False

However, if I inspect the user object, all the permissions seem to be in place:

>>> from django.contrib.auth.models import User
>>> u = User.objects.get(id=1)
>>> u

>>> permissions = u.user_permissions.all()
>>> len(permissons)
27
>>> permissions
[, ... (snipped)

All the permissions seem to be present for the user, but each time I
query a permission, regardless of what the user's capabilities are in
the admin console, False is always returned:

>>> u.has_perm("message.add_message")
False
>>> u.has_perm("session.add_session")
False
>>> u.has_perm("site.edit_session")
False

Am I simply interrogating a user object incorrectly, or have I
completely misunderstood how permissions work?

I'm expecting to be able to check if a user has permission to edit
data in a view just by doing something like

if u.has_perm("person.add_person"):
render_to_response("add_person.html")
else:
render_to_response("permission_denied.html")

FWIW, I'm using Django SVN on OSX, sqlite database.

Any help would be much appreciated, I spent the better part fo a day
trying to work this out :-)

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Python for Leopard Users. Built-in or compiled?

2007-11-21 Thread Jon Atkinson

I'm using the included Python.

In past versions of OSX, I used to download and compile from MacPorts,
but MacPorts has done very little to move towards Leopard at the
moment (publically, that is - I'm sure they're working very hard
behind the scenes), and a lot of common Python modules do not
currently compile via MacPorts/Leopard.

Considering OSX now comes with svn binaries, and built-in sqlite3
python support, it's possible to be developing Django applications
very quickly with Leopard.

--Jon

On 11/21/07, jeffself <[EMAIL PROTECTED]> wrote:
>
> Which version of Python are you using on Leopard for Django?  The
> included version or did you download and compile another copy?
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Permissions and user.has_perm

2007-11-22 Thread Jon Atkinson

> What's your app_label (usually the lowercase name of the app whose
> models.py contains your Person class")?
>
> The has_perm method should be called with .add_person
> and not with .add_person

Thank you for that - I can't believe I didn't try that myself :-)

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: import opml file

2006-09-23 Thread Jon Atkinson

Upload to where? For what? There isn't really enough information in
this and the previous posts in this thread to get any sensible answer
:-)

--Jon

On 9/23/06, a <[EMAIL PROTECTED]> wrote:
> is there an easy way to upload opml files
> thanks
> Jon Atkinson wrote:
> > I've found that using XMLObject
> > (http://www.freenet.org.nz/python/xmlobject/) is a simple way to get
> > the feed information from an OPML feed, then you can read the feed
> > however you like (e.g. with Feedparser (www.feedparser.org)).
> > Something like this should get you started:
> >
> > from xmlobject import XMLFile
> >
> > opml = XMLFile(path="/path/to/file.opml")
> >
> > for person in x.root.body.outline:
> >   print "Name: " + str(person.text)
> >   print "Feed: " + str(person.xmlUrl)
> >
> > --Jon
> >
> > On 26/08/06, a <[EMAIL PROTECTED]> wrote:
> > >
> > > feedjack is a lot of stuff, it exports opml but it doesnt import opml
> > > any ideas for importing opml
> > > > > you might want to check out FeedJack http://www.feedjack.org/
> > > > > it's done a lot of stuff in that area.
> > > > >
> > > > > regards
> > > > > Ian
> > > > >
> > > > > On 24/08/2006, at 5:42 PM, a wrote:
> > > > >
> > > > > >
> > > > > > hi guys how do i import opml file in django
> > > > > > using syndication
> > > > > >
> > > > > > i m tryin to build an rss reader
> > > > > > thanks
> > > > > >
> > > > >
> > > > > --
> > > > > Ian Holsman
> > > > > [EMAIL PROTECTED]
> > > > > http://personalinjuryfocus.com/
> > >
> > >
> > > >
> > >
>
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Django Cheat Sheet - Lost?

2006-09-23 Thread Jon Atkinson

Hi all,

I've been looking for a copy of the Django cheat sheet (previous URL:
http://www.dobbes.com/media/pdfs/django_reference_sheet.pdf), but that
resource seems to have disappeared. Does anyone have a copy of this?

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



MacPorts package

2006-09-25 Thread Jon Atkinson

Hi all,

I was wondering if anyone had done any work towards packaging Django
for Macports (http://www.macports.org/, formerly DarwinPorts). I'm
intending to start building a package, but I don't want to duplicate
effort if anyone else is working on it. A google search didn't yield
anything, so I assume it's safe to start from scratch, but if I am
jumping the gun, please let me know.

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: import opml file

2006-09-30 Thread Jon Atkinson

A quick google search would have found you the following post:

http://groups.google.com/group/django-users/browse_frm/thread/399360004a8d0716/d6d355feecef7f7a?lnk=st&q=django+imagefield+manipulator&rnum=4#d6d355feecef7f7a

May I also suggest reading:

http://www.catb.org/~esr/faqs/smart-questions.html

--Jon

On 9/30/06, a <[EMAIL PROTECTED]> wrote:
>
> Dear Jon Atkinson
> upload to some server probably mine or some hosted site, basically some
> simple fileuploads
> thanks
>
> Jon Atkinson wrote:
> > Upload to where? For what? There isn't really enough information in
> > this and the previous posts in this thread to get any sensible answer
> > :-)
> >
> > --Jon
> >
> > On 9/23/06, a <[EMAIL PROTECTED]> wrote:
> > > is there an easy way to upload opml files
> > > thanks
> > > Jon Atkinson wrote:
> > > > I've found that using XMLObject
> > > > (http://www.freenet.org.nz/python/xmlobject/) is a simple way to get
> > > > the feed information from an OPML feed, then you can read the feed
> > > > however you like (e.g. with Feedparser (www.feedparser.org)).
> > > > Something like this should get you started:
> > > >
> > > > from xmlobject import XMLFile
> > > >
> > > > opml = XMLFile(path="/path/to/file.opml")
> > > >
> > > > for person in x.root.body.outline:
> > > >   print "Name: " + str(person.text)
> > > >   print "Feed: " + str(person.xmlUrl)
> > > >
> > > > --Jon
> > > >
> > > > On 26/08/06, a <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > feedjack is a lot of stuff, it exports opml but it doesnt import opml
> > > > > any ideas for importing opml
> > > > > > > you might want to check out FeedJack http://www.feedjack.org/
> > > > > > > it's done a lot of stuff in that area.
> > > > > > >
> > > > > > > regards
> > > > > > > Ian
> > > > > > >
> > > > > > > On 24/08/2006, at 5:42 PM, a wrote:
> > > > > > >
> > > > > > > >
> > > > > > > > hi guys how do i import opml file in django
> > > > > > > > using syndication
> > > > > > > >
> > > > > > > > i m tryin to build an rss reader
> > > > > > > > thanks
> > > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Ian Holsman
> > > > > > > [EMAIL PROTECTED]
> > > > > > > http://personalinjuryfocus.com/
> > > > >
> > > > >
> > > > > >
> > > > >
> > >
> > >
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Was: [Re: Why I'm giving up on Django] Now: Creating Debian Application Installer package

2006-10-02 Thread Jon Atkinson
Thanks for that information, Ian - I was anticipating a day or so of
reasearch next week to package up my app, but hopefully I won't have
to now.

--Jon

On 10/2/06, ian <[EMAIL PROTECTED]> wrote:
>
> Baurzhan Ismagulov wrote:
> > Hello mamcxyz,
> >
> > On Fri, Sep 29, 2006 at 07:43:49AM -0700, mamcxyz wrote:
> >> - Deployment. I work on Delphi and the idea of put a EXE and all is
> >> working right (tm) is a feeling I lost with python on hosting.
> >
> > So what about writing a small script that will do this for you?
> > Something like
> >
> > tar cC /localdir/myprj . |ssh host tar xC /remotedir/myprj
> >
> > FWIW, I create a Debian package of my project and install it on the
> > server.
> >
> > With kind regards,
> > Baurzhan.
> >
> > >
> >
> Hi,
> This is very interesting and would maybe make a great tutorial ...here
> is my shot at how you would do this and create a hello-world application
> for Django (please correct the errors):
> 1. Create a directory hello-world-1.0.0 (more on debian package naming
> at Debian New Maintainers' Guide:
> http://www.us.debian.org/doc/maint-guide/) and put all files in it
> 2.Debian packages use makefiles (Makefile) instead of Python Distutils
> (Distributing Python Modules: http://docs.python.org/dist/dist.html) so
> we have to write a Makefile to act as an interface between the Debian
> package system and our setup.py.
> So create a file called "Makefile" containing this:
>
> all:
> python2.4 setup.py build
>
> clean:
> python2.4 setup.py clean --all
>
> install:
> python2.4 setup.py install
>
> 3. In a terminal run dh_make:
> [EMAIL PROTECTED]:~/hello-world-1.0.0$ dh_make -e [EMAIL PROTECTED]
> This will output some info to the screen (choose single binary as the
> package type) and it will then create a debian/ directory below the
> hello-world-1.0.0 directory. The key files in this directory are control
> and rules. In 'control' it's a "fill in the blanks" work and in 'rules'
>  it's essentially a matter of removing unwanted/unnecessary code
> Because our app is 100% Python we have 100% architecture
> independence...so the bottom of the rules file should look like:
>
> # Build architecture-independent files here.
> binary-indep: build install
> dh_testdir
> dh_testroot
> dh_installchangelogs
> dh_fixperms
> dh_installdeb
> dh_gencontrol
> dh_md5sums
> dh_builddeb
>
> binary-arch: build install
>
>
>
> 4.After step 3 we have to actually build the package now:
> [EMAIL PROTECTED]:~/hello-world-1.0.0$ dpkg-buildpackage -rfakeroot
>
> The parent directory should now have a file called
> hello-world_1.0.0-1_all.deb which is your Debian package to install
> where you like with dpkg -i  hello-world_1.0.0-1_all.deb
>
> []'s
>
>
>
> --
> Ian Lawrence
> Centre for Bioinformatics
> INSTITUTO NACIONAL DE PESQUISAS DA AMAZÔNIA-INPA
> RUA ANDRÉ ARAÚJO N º .2936 , BAIRRO DO ALEIXO
> MANAUS-AMAZONAS-BRAZIL
> Research Program in Biodiversity
> http://ppbio.inpa.gov.br
> PHONE: 055-92-3643-3358
> CEP. 69011 -970
>
> | Please do not send me documents in a closed
> | format.(*.doc,*.xls,*.ppt)
> | Use the open alternatives. (*.pdf,*.html,*.txt)
> http://www.gnu.org/philosophy/no-word-attachments.html
>
> "We are all in the gutter, but some of us are looking at the stars."
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Django users at WebDD? (Reading, UK, Feb 3rd)

2007-01-03 Thread Jon Atkinson


Hi all,

http://www.webdd.org.uk/

Are any Django users going to be attending WebDD? It's on February the
3rd, at the Microsoft Campus in Reading (here:
http://tinyurl.com/wgaz8). It's a free one-day event. From their
website:

"The mantra behind the conference is that currently there is no focus
on standards, best practice and general patterns based approaches to
web development and design being pushed particularly strongly in the
UK. Additionally it's rare that the people on the ground are looking
ahead at what is coming up and where the web will be in the coming
years. We want to change that and give the British web development and
design communities a real fighting chance going forward and we feel a
regular conference which is free to attend is a good way of getting
the messages out to the wider community.

We're expecting an attendance of around 350 people with a 50/50 split
of web developers and web designers. Topics being spoken on range from
CSS, AJAX and User Experience through to Ruby On Rails and other
server side technologies."

It would be great to meet up with fellow Django developers in that
kind of atmosphere :-)

I am also able to offer lifts to anyone in
Manchester/Warrington/Chester/Liverpool area.

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Re: Re: Django Blog software

2006-08-13 Thread Jon Atkinson

Thank you both for the replies.

Riklaunim: Have you chosen a license for miniblog? Is it okay for me
to make some changes and re-release it?

--Jon

> On 13/08/06, David Larlet <[EMAIL PROTECTED]> wrote:
> >
> > 2006/8/13, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> > >
> > > Hi,
> > >
> > > I've been playing with Django for a few weeks, and I've been looking
> > > for some blog software which I can use for my blog and also play with
> > > extending to help me learn a little more about Django. I searched the
> > > Django wiki, and does as many Google queries as I can think of, but I
> > > can't find anything but references to people homebrewing their own
> > > blogging system.
> > >
> > > I realise that writing a blogging system in Django wouldn't take much
> > > work, but I was just wondering if there was anything already out there.
> > > Any ideas?
> > >
> >
> > You can check the Ross one:
> > http://www.rossp.org/blog/2006/jun/08/django-blog-redux/
> > or directly browse the source code of the djangoproject site:
> > http://code.djangoproject.com/browser/djangoproject.com. Both are
> > interesting to learn Django. If there is no generic blog app it's
> > because Django is not oriented end-user but developer and every
> > developer needs his unique blog ;-). BTW, it's really easy to make
> > your own.
> >
> > Regards,
> > David
> >
> > > >
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Case sensitivity with different database backends

2006-08-13 Thread Jon Atkinson

Hi,

I've noticed that my application changes case sensitivity in queries
depending on whether it is using MySQL or sqlite as the database
backend

The simplest test case is as follows:

My database contains a user record, in which the username is = "jon"

My urls.py is simply as follows:

(r'^/?(?P\w+)/$', 'abnew.planetx.views.user'),

My corresponding view code to retrieve this user is like this:

def user(request, person):
# Let the logger know where we are.
logging.info("Rendering person " + person)
user = User.objects.get(username=person)


Now, if I point my browser at localhost:8000/jon, or
localhost:8000/Jon when using MySQL, the query works correctly.
However, when using sqlite the second query will not work (as the
first character is upper case, and hence different from what is in the
database).

If there a recommended way to deal with this? I want to avoid forcing
a certain scheme on the users (i.e., they can type the name in all
lowercase, uppercase or mixed, it doesn't matter).

Thanks,

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Odd error with ./manage.py runserver

2006-08-14 Thread Jon Atkinson

Hi,

I'm getting a strange error when I run my application via the built in
testing server. Each time I modify a source file, and the server
reloads my views, the first request I make to the server prints the
following to stderr:

Traceback (most recent call last):
  File 
"/sw/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/servers/basehttp.py",
line 272, in run
self.result = application(self.environ, self.start_response)
  File 
"/sw/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/servers/basehttp.py",
line 615, in __call__
return self.application(environ, start_response)
  File 
"/sw/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/handlers/wsgi.py",
line 143, in __call__
self.load_middleware()
  File 
"/sw/lib/python2.4/site-packages/Django-0.95-py2.4.egg/django/core/handlers/base.py",
line 38, in load_middleware
mw_instance = mw_class()
TypeError: 'module' object is not callable

If I hit reload, everything starts to work fine again, but it's
annoying to have to reload my browser twice after each change I make.
Any ideas?

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Re: Odd error with ./manage.py runserver

2006-08-14 Thread Jon Atkinson

Jeremy,

Thanks for the solution, I had a module in middleware_classes rather
than installed_apps.

--Jon

On 14/08/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
>
> On 8/14/06, Jon Atkinson <[EMAIL PROTECTED]> wrote:
> > TypeError: 'module' object is not callable
> >
> > If I hit reload, everything starts to work fine again, but it's
> > annoying to have to reload my browser twice after each change I make.
> > Any ideas?
>
> It looks like you've specified a module instead of a class in
> MIDDLEWARE_CLASSES.
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



'Pythonicity', pagination and readability.

2006-08-15 Thread Jon Atkinson

Hi,

One of the things which I love about django is the lack of code I have
to write. I recently refactored some of my views from approximately 30
lines of code down to just two, but I'm worried about the readablity
of my code.

For the simplest view, I think my code looks fine, and it's pretty readable:

def index(request, page=0):
paginator = ObjectPaginator(Item.objects.all().order_by('-time'), 15)
return render_to_response('planetx/index.html', {'title': "Planet X",
'items': paginator.get_page(page)})

However, once my views start to get a little more complicated, I end
up with quite long strings of code, which I'm not entirely happy with:

def feedtype(request, feedtype, page=0):
paginator = 
ObjectPaginator(Item.objects.filter(feed__feedtype__feedtype__iexact=re.sub('(s$|S$)',
'', feedtype)).order_by('-time'), 15)
return render_to_response('planetx/feedtypepage.html', {'realname':
"Planet X", 'feedtype': feedtype, 'items': paginator.get_page(page),
'pages':{'nextpage': paginator.has_next_page(page), 'nextpagenumber':
(page + 1), 'previouspage': paginator.has_previous_page(page),
'previouspagenumber': (page - 1)}})

Does anyone have any advice about how I should be laying out these
views? Should I be doing things in a more long-hand (but easier to
understand) manner? I know that 'pythonic' has quite a nebulous
definition, but something seems 'unpythonic' about this code, which is
quite a contrast to the elegance of the rest of the django code I have
written. In particular, my need to pass the 'pages' tuple to the
template seems quite clunky; I realise that I may be using the
ObjectPaginator incorrectly here - if so I'd love to know how I can
improve this.

Any ideas or tips on style would be appreciated.

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Re: VMWare image for running/developing Django

2006-08-15 Thread Jon Atkinson

Michael,

It's a great idea, but the images do seem a little large - if you're
running only python and sqlite, would one of the smaller distributions
not be more suitable as a base? There are plenty of floppy and
business-card distributions out there which are around 70mb (Damn
Small Linux springs to mind), so you might be able to get the disk
images down to an even smaller size.

--Jon

On 15/08/06, Michael <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> It is posssible to setup Qemu ( platform independent )
> http://fabrice.bellard.free.fr/qemu/
>
> and run djanog on it.
> I've test in with debian etch ,python2.3.5 ,django-trunk+sqlite3, no apache
> -
> run as django dev server.
> The whole image around 200mb with qcow  compressed format
> without compr = 449mb
> compress winth bzip2 = 158MB
> The full size inside = 316MB
> So far it is runnig well.
>
> As well I've converted this image t ovmware format to run inside vmware -
> size of image before compress = 415mb
> after compressing it with bzip2 size only 158mb
>
> If anyone interested I can put the image qemu or vmware to somewhere.
>
>
>
> --
> --
> Michael
>  >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Re: 'Pythonicity', pagination and readability.

2006-08-15 Thread Jon Atkinson

Michael,

On 15/08/06, Michael van der Westhuizen <[EMAIL PROTECTED]> wrote:
>
> Hi Jon,
>
> On 8/15/06, Jon Atkinson <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > One of the things which I love about django is the lack of code I have
> > to write. I recently refactored some of my views from approximately 30
> > lines of code down to just two, but I'm worried about the readablity
> > of my code.
> >
> > For the simplest view, I think my code looks fine, and it's pretty readable:
> >
> > def index(request, page=0):
> > paginator = ObjectPaginator(Item.objects.all().order_by('-time'), 
> > 15)
> > return render_to_response('planetx/index.html', {'title': "Planet 
> > X",
> > 'items': paginator.get_page(page)})
> [snip]
> > Any ideas or tips on style would be appreciated.
> >
> > --Jon
>
> Your code looks perfectly legible to me (disclaimer: I'm a C++
> programmer!). But...
>
> Is there a pressingly good reason you're not using generic views for
> your "list" pages? Pagination is exceptionally simple in generic
> views, and you can still pass through a custom dictionary (but
> pagination variables are automatic). You can also pass through context
> processors if needs be.
>
> Generic views look confusing, and look like they have questionable
> value, until you start using them. You invariably end up deleting half
> your views in favour of generic views - and more than that, it just
> feels right :-)
>

Hah! When I first read about generic views, this is exactly what I
though :-) I guess I'll go back to them now and try again - thanks for
the advice :-)

--Jon

> Michael
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



More complex QuerySets and generic views

2006-08-15 Thread Jon Atkinson

Hi,

I'm dabbling with generic views (thanks to wise advice from others on
this list), and I'm trying to convert one of my slightly more
complicated views to use a generic view. The vie itself is a simple
list, but my queryset is generated as follows:

Item.objects.filter(feed__feedtype__feedtype__iexact=re.sub('(s$|S$)',
'', feedtype)).order_by('-time')

What I'm trying to achieve here is not locking users into a certain
URL scheme - for the feedtype, I want uses to be able to specify
'/link', '/links', '/LINKS', and any combination thereof, hence the
regular expression which removes the trailing 's' from the request and
performs the case-insensitive query. This works fine when I use it in
a traditional view.

Now that I'm trying to use generic views (to avoid doing some ugly
pagination by hand), my urls.py line is as follows:

(r'^/?(?P\w+)/$',
'django.views.generic.list_detail.object_list', {'queryset':
Item.objects.filter(feed__feedtype__feedtype__iexact=re.sub('(s$|S$)',
'', feedtype)).order_by('-time'), 'paginate_by': 15, 'extra_context':
{'is_first_page': True}}),

However, the error which I get is as follows:

NameError at /photo/
name 'feedtype' is not defined
Request Method: GET
Request URL:http://localhost:8000/photo/
Exception Type: NameError
Exception Value:name 'feedtype' is not defined

I'm guessing that this is being caused by the regular expression
evaluation not seeing that 'feedtype' exists - is there a way to solve
this or will I have to use a standard view for this particular action?

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Re: Learning Django

2006-08-15 Thread Jon Atkinson

On 15/08/06, Karen Tracey <[EMAIL PROTECTED]> wrote:
>
> At 01:08 PM 8/15/2006, you wrote:
> >That, unfortunately, raises the issue of how to find that wisdom when
> >you actually need it.
>
> FWIW, I've had good luck searching the mailing list archive on the
> Google groups site.
>

Does Google expose an API for searching Google Groups? It could be a
useful thing to have on the Django site...

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Re: More complex QuerySets and generic views

2006-08-15 Thread Jon Atkinson

On 15/08/06, Michael van der Westhuizen <[EMAIL PROTECTED]> wrote:
>
> Do you really need the RE in the query? I think the problem is that
> the re call is being evaluated immediately, which the query is lazily
> evaluated. Would the "iexact" not work without the regular expression?
>
> If you do end up needing the RE, you could try using a custom manager
> on your feeds model. Specifically, you could create a custom manager
> method which filters based on the regular expression, then pass that
> the captured feedtype from the URL.
>
> See http://www.djangoproject.com/documentation/model_api/#managers for
> details of custom managers and adding methods to them.
>
> Michael

I've just tried removing the regular expression - so the line looks like:

(r'^/?(?P\w+)/$',
'django.views.generic.list_detail.object_list', {'queryset':
Item.objects.filter(feed__feedtype__feedtype__iexact=feedtype).order_by('-time'),
'paginate_by': 15, 'extra_context': {'is_first_page': True}}),

And oddly enough I'm getting exactly the same error; is there another
problem with this statement which I'm not seeing? It seems there is a
problem with variable from the url expression being passed to the view
function - is this a common problem?

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Re: Re: More complex QuerySets and generic views

2006-08-15 Thread Jon Atkinson

>
> I think it's worth raising a feature request in the Django Trac for
> this functionality. I can imagine that this would be very useful to a
> lot of people in the future.
>
> Michael

Done!

http://code.djangoproject.com/ticket/2544

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Re: How do I store project in subversion?

2006-08-15 Thread Jon Atkinson

> To create a repository, follow the instructions
> at: http://svnbook.red-bean.com/en/1.0/ch05s02.html

The SVN book is an excellent resource, and if you want to dive
straight in and get your repository set up quickly, I recommend the
'Quickstart' section:

http://svnbook.red-bean.com/nightly/en/svn.intro.quickstart.html

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Re: Re: More complex QuerySets and generic views

2006-08-15 Thread Jon Atkinson

> You're using a variable "feedtype" that's not defined.
>
> It's the same thing as doing this in the Python interactive prompt:
>
> print a + 1
>
> The variable "a" is not defined yet, so Python raises a NameError.
>
> The problem in your case is that your view won't know the value of
> feedtype until the URL is parsed. For that reason, you cannot put that
> logic in the URLconf.
>
> Adrian
>
> --
> Adrian Holovaty
> holovaty.com | djangoproject.com
>

Adrian,

I've just read your reply _after_ I submitted the ticket - please do
close it if necessary.

Just out of interest, what do you think the most elegant way to solve
this problem would be? Is it to write my own view and deal with the
pagination myself?

Many thanks to all who replied to this thread.

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: django <-> cms like typo3

2006-08-17 Thread Jon Atkinson

A simple news system wouldn't be hard to write in Django.

As for the rich editor, you could embed something like FCKeditor in
your application. This has already been done in a Django application,
Woodlog (http://www.djangocn.org/ - page detailing svn checkout is at
http://www.djangocn.org/help/), so you might want to look at that to
see how it is done.

--Jon

On 17/08/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> hi,
>
> i have to do a website for a small business and need a simple cms for
> that. i looked into typo3 for a few days but it seems to be huge and
> quirky in some regards. since python is my favorite programming
> language django looks very interesting to me.
>
> the needed features of the page would be:
>
> - a news section on the front page
> - a tree of mostly static pages (but my customer would like to have a
> simple way to edit some of them)
> - hm... actually that's all for now! :)
>
> probably more projects where i could reuse that cms will follow...
>
> could a cms with those features easily be programmed with django or
> should i better look for a complete cms solution? somehow i like the
> idea of a small custom cms with just the features i need.
>
> how would the editing part for the customer be done? is there some
> wysiwyg javascript html editor included with django or would i have to
> include one myself? are there functions already for helping with things
> like image upload + resizing?
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Interacting with models from the CLI

2006-08-19 Thread Jon Atkinson

Hi,

I need to schedule some operations on my database to happen at a
certain time each day. I'm tackling this by using cron, so ideally I'd
like to be able to write a stand-alone python script which will do
this.

My first though would be to pass a script to ./manage.py shell,
(something like ./manage.py shell myscript.py), but this doesn't seem
to work. I've tried also writing a stand-alone script and importing
the necessary modules, but I'm having problems with
DJANGO_SETTINGS_MODULE not being set (it seems that django does some
magic which is beyond me at this point) - am I approaching this in the
correct way, and if so what do I need to import/read from settings.py
so that a stand-alone script can interact with my models?

Thanks,

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Re: Interacting with models from the CLI

2006-08-20 Thread Jon Atkinson

Thank you both. I had it working (though it was far from elegant), so
that other thread will be very helpful.

--Jon

On 19/08/06, Bryan Chow <[EMAIL PROTECTED]> wrote:
>
> See:
> http://groups.google.com/group/django-users/browse_thread/thread/51827a2a40e5262e
>
> Bryan :)
>
>
>
> On 8/19/06, Jon Atkinson <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I need to schedule some operations on my database to happen at a
> > certain time each day. I'm tackling this by using cron, so ideally I'd
> > like to be able to write a stand-alone python script which will do
> > this.
> >
> > My first though would be to pass a script to ./manage.py shell,
> > (something like ./manage.py shell myscript.py), but this doesn't seem
> > to work. I've tried also writing a stand-alone script and importing
> > the necessary modules, but I'm having problems with
> > DJANGO_SETTINGS_MODULE not being set (it seems that django does some
> > magic which is beyond me at this point) - am I approaching this in the
> > correct way, and if so what do I need to import/read from settings.py
> > so that a stand-alone script can interact with my models?
> >
> > Thanks,
> >
> > --Jon
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Re: Django Blog software

2006-08-20 Thread Jon Atkinson

> That brings to mind the need for a Django-forge-like place where apps
> could get uploaded, categorized, and rated; Plone and Joomla have this,
> for instance.  But that's another thread...
>

One worth starting, IMHO :-)

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Re: import opml file

2006-08-26 Thread Jon Atkinson

I've found that using XMLObject
(http://www.freenet.org.nz/python/xmlobject/) is a simple way to get
the feed information from an OPML feed, then you can read the feed
however you like (e.g. with Feedparser (www.feedparser.org)).
Something like this should get you started:

from xmlobject import XMLFile

opml = XMLFile(path="/path/to/file.opml")

for person in x.root.body.outline:
print "Name: " + str(person.text)
print "Feed: " + str(person.xmlUrl)

--Jon   

On 26/08/06, a <[EMAIL PROTECTED]> wrote:
>
> feedjack is a lot of stuff, it exports opml but it doesnt import opml
> any ideas for importing opml
> > > you might want to check out FeedJack http://www.feedjack.org/
> > > it's done a lot of stuff in that area.
> > >
> > > regards
> > > Ian
> > >
> > > On 24/08/2006, at 5:42 PM, a wrote:
> > >
> > > >
> > > > hi guys how do i import opml file in django
> > > > using syndication
> > > >
> > > > i m tryin to build an rss reader
> > > > thanks
> > > >
> > >
> > > --
> > > Ian Holsman
> > > [EMAIL PROTECTED]
> > > http://personalinjuryfocus.com/
>
>
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Catching an IntegrityError

2006-08-26 Thread Jon Atkinson

Hi,

I'm trying to figure out how to catch an IntegrityError. Simply using
the following doesn't work correctly. I'm guessing that the
IntegrityError class isn't available.

The code:

try:
# code here
catch IntegrityError:
# code here

Generates the following error:

NameError at /admin/planetx/feed/1/
global name 'IntegrityError' is not defined

I thought I found a solution in the following thread, but it seems to
have been written prior to magic removal, and the given solution
no-longer seems to work:

http://groups.google.com/group/django-developers/tree/browse_frm/month/2006-01/8769f73b6963a674?rnum=21&_done=%2Fgroup%2Fdjango-developers%2Fbrowse_frm%2Fmonth%2F2006-01%3F#doc_b37d705150060fd7

Any hints would be much appreciated.

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



SQL initial data for auth

2006-08-27 Thread Jon Atkinson

I'm trying to insert some initial data into the auth application to
shorten testing times. I've linked some other tables in my database to
the auth_users table, but to test my application I need to create five
or so named users after each syncdb, which is a little tiresome.

The logical place to put this data would be in the $siteroot/auth/sql/
folder - as auth is the application name, and this would match the
location for my own applications initial sql ($siteroot/myapp/sql/).

Hence, I've put a list of users into my 'auth/sql/User.sql' file, but
./manage.py syncdb doesn't seem to pick up the existence of the file.
I have no doubt it's in the wrong place, but my question is which is
the correct place? :-)

Thanks,

--Jon

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Re: Advice for Rusty Python Programmer and New Django Consumer

2006-08-30 Thread Jon Atkinson

For a quick update on Python's data structures, I always find Dive
Into Python by Mark Pilgrim to be a good read.

The book is FDL, and you can read it online here:
http://diveintopython.org/toc/index.html

--Jon

On 30/08/06, Pete Abilla <[EMAIL PROTECTED]> wrote:
> Group:
>
> Any book Advice or good Sites to visit for a Rusty Python Programmer and New
> Django Consumer (aka - me)?
>
> --
> Pete Abilla
> blog: www.shmula.com
>  >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---



Djangoweek.ly, a Django weekly newsletter

2010-12-21 Thread Jon Atkinson
Hello,

I just wanted to drop a quick note to promote Django Weekly, a new weekly
Django newsletter which I'm putting together. I'm looking to send the first
issue around the 1st of January. Hopefully this will be of interest to some
of the members of this list.

http://djangoweek.ly/

Cheers,

--Jon

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



Looking for Django developers in the UK

2014-07-23 Thread Jon Atkinson
Hi,

I'm Tech Director at FARM, a digital agency based in the Manchester, UK.
We're looking for Django developers, both junior and senior, to join the
team. No recruiters involved.

There's information about the company, and the role at
http://jobs.wearefarm.com - if you're around Manchester, and want a chat,
get in touch with me off-list and I'll buy you lunch :-)

--Jon

-- 
 [image: FARM Digital Logo] *Jon Atkinson* | Technical Director | FARM
Digital Limited
Studio: 24/26 Lever Street, Manchester, M1 1DZ
HQ: Crown House, High Street, Hartley Wintney, Hampshire, RG27 8NW
Phone: 01252 494 060Mobile: 07939924720Email: j...@wearefarm.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 to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAP9%3DYN1X2he8ABjZRafbZt1Kvbm%2BgMjaZwk8cpfvcnCDrJi29w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django Developers wanted, junior and senior. Remote welcome, European timezones.

2013-11-27 Thread Jon Atkinson


Hi,

I’m Technical Director at FARM Digital. We’re a digital agency based in the 
UK. We’re currently looking for Django developers, both junior and senior. 
There are two job descriptions on our website, available at:

Senior Developer - http://farmd.co.uk/1bhm1Cn

Junior Developer - http://farmd.co.uk/1dvcBVw 

We’re made up of 15 people, split over two UK offices, with most of our 
delivery team working remotely. We’re committed to a strong engineering 
culture, and we do things the right way. We’re also keenly involved in 
community events, and we run the Django Weekly newsletter (
http://www.djangoweek.ly).

If this is of interest, you can either apply directly (information is in 
the links above), or you can email me for more information. I’m also on 
Freenode as `JonA`.

Thanks!

--Jon

-- 
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 to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ebf0589d-4e41-4d04-b075-10c6e3c89760%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Steadman

2016-01-06 Thread Jon Atkinson
I've alerted Mark off-list.

--Jon

On Wed, Jan 6, 2016 at 1:02 PM, Avraham Serour  wrote:

> virus people, don't click the link
>
> On Wed, Jan 6, 2016 at 2:29 PM, Steadman  wrote:
>
>> Please find the attached document referred to the mail subject.
>>
>> Steadman.io 
>> Blog  | Podcasts  | Twitter
>>  | Facebook
>> 
>>
>> I do a *live podcast* every Monday night (8pm GMT) called the 2014 Show
>> . I'm always looking for guests. Shout if you
>> fancy sitting in the big Skype chair!
>>
>> Download / View 
>>
>> [image: Inline images 1] 
>>
>> --
>> 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 to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAAcSLoM43EB_36hUtzhXX-YPGxRkv0o-i8Z9fH8aVPxXhgEEZw%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> 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 to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFWa6t%2BXaEz4iOOZ%3DYcKKA5KXMD541cDWNEmnsqgY3RTStQT8w%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAO4CLk%3DhOMm5W3U0Wf%2B1YWn7kvC17C8X7x7pszC3NE%2BNFy%2Bn_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.