Validation system for models

2008-03-07 Thread Hugh Bien
For the website I'm writing, I've just been overriding the 'validate()'
method on models but that's still experimental:

http://www.djangoproject.com/documentation/models/validation/

Is there a built-in validation system for Django models?

- Hugh

--~--~-~--~~~---~--~~
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: How to get Model from object?

2008-03-03 Thread Hugh Bien
In Python, you can always get a class from an object using the built-in
'type' method:
type(mymodel_obj)

On Mon, Mar 3, 2008 at 7:09 PM, Davide.D <[EMAIL PROTECTED]> wrote:

>
> class MyModel(models.Model):
>...
>...
>
> How to get MyModel from mymodel_obj?
>
> 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: Not using Django's built in auth, getting errors on 404s

2008-02-10 Thread Hugh Bien
Thanks Malcom,

I didn't know that context_processors.auth was one of the defaults for
TEMPLATE_CONTEXT_PROCESSOR.  I went ahead and defined that to be the
defaults from django.conf.global_settings minus the
django.core.context_processors.auth.  Everything seems to be working
smoothly.



On Feb 10, 2008 3:49 AM, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:

>
>
> On Sun, 2008-02-10 at 03:05 -0800, Hugh Bien wrote:
> > Hi,
> >
> >
> > I'm not using Django's built in auth application.  When I go to a URL
> > that doesn't exist, I get this error:
> >
> >
> >   AttributeError: 'WSGIRequest' object has no attribute 'user'
>
> I suspect that the version of Django you're running is important here
> and you've just rediscovered ticket #4049 (fixed in r6356). However, a
> couple of your comments make me think you're making some bad
> assumptions, too, so a couple of potential clarifications follow
> (apologies in advance if you already know this)...
>
> > For some reason context_processors.auth is still being called,
>
> If context_processors.auth is in your TEMPLATE_CONTEXT_PROCESSORS list
> then it's going to be called. "Still being called" makes me wonder if
> you were hoping Django would automatically work out this processor
> wasn't needed. That would require one part of the code to know a lot
> more about earlier, completely separate parts of the request/response
> pipeline than is healthy (auth handling is done very early in the
> request processing, context processors are called, usually, late in
> views, just prior to rendering some output).
>
> >  which tries to access auth.user.  But the docstring for the
> > context_processors.auth suggests that it's only used for applications
> > that use Django's auth:
>
> It's still called in the normal context processor pipeline -- which
> means whenever a RequestContext object is created.
>
> So, you can either apply the patch from r6356 to your local code, or
> upgrade to trunk (probably the most extreme approach), or adjust the
> TEMPLATE_CONTEXT_PROCESSORS setting for your project (or use the
> approach you've already come up with, which isn't a bad idea, either).
>
> Regards,
> Malcolm
>
>
> --
> The sooner you fall behind, the more time you'll have to catch up.
> 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
-~--~~~~--~~--~--~---



Not using Django's built in auth, getting errors on 404s

2008-02-10 Thread Hugh Bien
Hi,
I'm not using Django's built in auth application.  When I go to a URL that
doesn't exist, I get this error:

  AttributeError: 'WSGIRequest' object has no attribute 'user'

Here's part of the stack trace:

  File "/Library/Python/2.5/site-packages/django/views/defaults.py", line
79, in page_not_found
return http.HttpResponseNotFound(t.render(RequestContext(request,
{'request_path': request.path})))

  File "/Library/Python/2.5/site-packages/django/template/context.py", line
100, in __init__
self.update(processor(request))

  File
"/Library/Python/2.5/site-packages/django/core/context_processors.py", line
18, in auth
'user': request.user,

For some reason context_processors.auth is still being called, which tries
to access auth.user.  But the docstring for the context_processors.auth
suggests that it's only used for applications that use Django's auth:

"""
Returns context variables required by apps that use Django's
authentication
system.
"""

Anyways, If I stub out a Middleware class and stick in a fake user, it seems
to work fine.  I also have to define a get_and_delete_messages method
because context_processors.auth calls that on the user object:

# added this to settings.py
class FakeMiddleware(object):
def process_request(self, request):
request.user = User()

I'll get the 404.html page rendered as expected.  But it seems kind of
strange that I'd have to do this because I'm not using the auth application.
 It's probably something wrong with my settings.py, has anyone else had the
same issue?

Thanks,
- Hugh Bien

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



Multiple columns for db_indexes ?

2008-01-27 Thread Hugh Bien
Hi,

I've been googling around for a while, but I haven't found a way to create
indexes with multiple columns, ie.

class Person(models.Model):
last_name = models.CharField(maxlength=255)
first_name = models.CharField(maxlength=255)

And then create an index (last_name, first_name).

Thanks!
- Hugh

--~--~-~--~~~---~--~~
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 Application Without Source?

2007-12-11 Thread Hugh Bien
Ttry using pyobfuscate.  It works really well with python 2.3 (run it using
python 2.3 and only use it on python 2.3 compatible code).
- Hugh

On 12/10/07, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
>
>
> try java, or C or even BF
>
> On 11-Dec-07, at 10:32 AM, [EMAIL PROTECTED] wrote:
>
> >
> > Shoot, so maybe Python just isn't the language for this kind of
> > project. I'm not really concerned with making it bullet-proof to
> > decompilation, just not so glaringly obvious as opening up the source
> > files :)
> >
> > On Dec 10, 3:29 pm, "Jay Parlar" <[EMAIL PROTECTED]> wrote:
> >> On Dec 10, 2007 2:43 AM, [EMAIL PROTECTED]
> >>
> >> <[EMAIL PROTECTED]> wrote:
> >>
> >>> Or perhaps I'm reading into this too much. If I distribute the .pyc
> >>> files minus the .py files, would that work? Is this machine-
> >>> independent (IE: I "compile" the source on an x86, it'll be ok on
> >>> a 64-
> >>> bit or other architecture?)
> >>
> >> Anyone who *really* wanted to get at your code could do a decent job
> >> of disassembling the .pyc files, there's not a lot going on in those.
> >> In fact, I believe there used to be a commercial service that would
> >> take .pyc files, and automatically convert them to .py
> >>
> >> And if I recall correctly, .pyc files are version dependent, machine
> >> independent, but don't quote me on that :)
> > >
>
> --
>
> regards
> kg
> http://lawgon.livejournal.com
> http://nrcfosshelpline.in/web/
> Foss Conference for the common man: http://registration.fossconf.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: Django Web Hosting Service

2007-11-21 Thread Hugh Bien
Another +1 for webfaction.  The cheapest plan supports Django, 7.50/mo for
two years in advance, but you can get a refund for your remaining time if
you're not satisfied.  Pretty sweet deal.

On 11/21/07, Daniel Roseman <[EMAIL PROTECTED]> wrote:
>
>
> On Nov 21, 1:57 pm, cwurld <[EMAIL PROTECTED]> wrote:
> > http://www.webfaction.com/
> >
> > They are amazing and reasonably priced. Their support is great. They
> > have exceeded my expectations many times.
> >
> > Chuck
>
> Second this recommendation. I am very happy with them, and they have
> responded to support calls nearly instantly.
> --
> DR.
> >
>

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



Commercial downloadable Django products

2007-11-11 Thread Hugh Bien
Hi all,
Out of curiosity, has anyone made commercial Django products that are
available for download/running on your own server?

I was wondering what you used for source code protection or if you went the
'full source code available' route (like haveamint.com and warehouseapp.com
).

Thanks!
- Hugh

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



Custom SQL to delete cache table

2007-11-05 Thread Hugh Bien
Hi all,
I'm trying to clear the cache table.  Here's the code I'm using with Python
2.5 and Django version 0.96:

def clear_cache():
from django.db import connection
cursor = connection.cursor()
cursor.execute("DELETE FROM django_cache WHERE 1=1")

This is for the a SQLite3 backend, but it doesn't seem to work.  I tried
executing it in the command line and the table still doesn't clear.  Is
there something obvious I'm missing?

- Hugh

--~--~-~--~~~---~--~~
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: Having trouble with per-view caching

2007-11-04 Thread Hugh Bien
Thanks guys, that did the trick and caching works great now.

On 11/4/07, Karen Tracey <[EMAIL PROTECTED]> wrote:
>
> On 11/4/07, Hugh Bien <[EMAIL PROTECTED]> wrote:
>
> > By what level do you mean what version of Django? I'm running Django
> > 0.96.
> >
>
> Yes.  0.96 precedes the fix I mentioned.  So, try:
>
> @cache_page
>
> instead of:
>
> @cache_page(60 * 15)
>
> If that fixes the problem, and you really need to specify the timeout, I
> think the non-decorator syntax works for that in 0.96.
>
> Karen
> >
>

--~--~-~--~~~---~--~~
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: Having trouble with per-view caching

2007-11-04 Thread Hugh Bien
Hi Karen,
By what level do you mean what version of Django? I'm running Django 0.96.

- Hugh

On 11/4/07, Karen Tracey <[EMAIL PROTECTED]> wrote:
>
> On 11/4/07, tonemcd <[EMAIL PROTECTED]> wrote:
>
> > check this out:-
> > http://groups.google.com/group/django-users/msg/581a32c198e6ae07
> >
> > Not sure cache decorators have arguments...
>
>
> They do as of revision 5619 (July 5), when
> http://code.djangoproject.com/ticket/1015 was fixed.  Hugh, what level are
> you running?
>
> Karen
>
>
>
>
> >
>

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



Having trouble with per-view caching

2007-11-04 Thread Hugh Bien
Hi,
I've emailed a few questions to this mailing list already and I've gotten
great responses, so thanks everyone for helping out people who are new to
Django.

Okay, on to my question.  I'm trying to get caching working with my weblog
but I keep running into an AttributeError.  All I am doing is importing the
'cache_page' function and decorating my view:

@cache_page(60 * 15)
def my_view:
   # do stuff and return render_to_response ...

I get this error when I go to any view:


Exception Type:AttributeErrorException Value:'function' object has no
attribute 'method'Exception
Location:/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/django/middleware/cache.py
in process_request, line 47



which occurs at this line in cache.py:

if not request.method in ('GET', 'HEAD') or request.GET:

I really have no idea what went wrong, has anyone else run into this error?

Thanks,
- Hugh

--~--~-~--~~~---~--~~
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 SSH Library for Deploy Script

2007-10-29 Thread Hugh Bien
Thanks!  That's exactly what I was looking for.

On 10/27/07, Michael Cuddy <[EMAIL PROTECTED]> wrote:
>
>
> > I'm writing a deploy script, but right now it runs ssh commands directly
> > from os.system:
>
> Paramiko.
>
> http://www.lag.net/paramiko/
>
> --
> Mike Cuddy ([EMAIL PROTECTED]), Programmer, Baritone, Daddy, Human.
> Fen's Ende Software, Redwood City, CA, USA, Earth, Sol System, Milky Way.
>
> "The problem with defending the purity of the English language is
> that English is about as pure as a cribhouse whore. We don't just
> borrow words; on occasion, English has pursued other languages down
> alleyways to beat them unconscious and rifle their pockets for new
> vocabulary." -- James D. Nicoll
>
>Join CAUCE: The Coalition Against Unsolicited Commercial E-mail.
>   
>
> >
>

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



Python SSH Library for Deploy Script

2007-10-27 Thread Hugh Bien
Hi all!
I'm writing a deploy script, but right now it runs ssh commands directly
from os.system:

import os
os.system("ssh server.name.com 'cd /deploy/path && run commands'")

I'm pretty new to Python and I'm trying to find a SSH library to run
commands on a remote server.  Does anyone have any experience with a good
one?

Thanks,
- Hugh

--~--~-~--~~~---~--~~
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: authentication on generic views

2007-10-26 Thread Hugh Bien
I haven't really used generic views that often, but I know you could always
extend them by creating your own views.
Inside your views.py:

from django.views.generic.list_detail import object_list

@login_required
def my_list(*args, **kwargs):
return object_list(*args, **kwargs)

- Hugh

On 10/25/07, Mike Maravillo <[EMAIL PROTECTED]> wrote:
>
>  Hi,
>
> I'm using the django.views.generic.list_detail.object_list generic view
> because of the handy pagination.  However, I need to have the user accessing
> the page to be authenticated first.  Is there any other way than doing the
> check on the template?  Thanks very much.
>
> Mike
> >
>

--~--~-~--~~~---~--~~
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: Newbie error: sqlite3.OperationalError: unable to open database file

2007-10-21 Thread Hugh Bien
For your DATABASE_NAME, try using an absolute path without the tilde (~)
shortcut, that might solve it:
DATABASE_NAME = '/home/ssk/Projects/mysites/mysite/mysite.db'

On 10/21/07, SSK <[EMAIL PROTECTED]> wrote:
>
>
> I'm trying to get started with Django, but I've hit a hurdle with
> database.
>
> I have a very basic configuration: Python 2.5, Django (SVN), built-in
> server, SQLite3 db.
>
> My settings.py has this:
> DATABASE_ENGINE = 'sqlite3'
> DATABASE_NAME = '~/Projects/mysites/mysite/mysite.db'
>
> When I run syncdb, I get the following error:
> python manage.py syncdb
> Traceback (most recent call last):
>   File "manage.py", line 11, in 
> execute_manager(settings)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/__init__.py", line 275,
> in execute_manager
> utility.execute()
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/__init__.py", line 225,
> in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/base.py", line 70, in
> run_from_argv
> self.execute(*args, **options.__dict__)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/base.py", line 84, in
> execute
> output = self.handle(*args, **options)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/base.py", line 166, in
> handle
> return self.handle_noargs(**options)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/core/management/commands/syncdb.py",
> line 39, in handle_noargs
> cursor = connection.cursor()
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/db/backends/__init__.py", line 33, in
> cursor
> cursor = self._cursor(settings)
>   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/django/db/backends/sqlite3/base.py", line 110,
> in _cursor
> self.connection = Database.connect(**kwargs)
> sqlite3.OperationalError: unable to open database file
>
> I've searched for it. Other people have had this type of error but I
> didn't find anyone who has had this with the built-in server. What
> might be the problem?
>
>
> >
>

--~--~-~--~~~---~--~~
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: template loading and generic views

2007-10-20 Thread Hugh Bien
foo/templates/foo/bar.html
foo/templates/foo/bar_list.html

This is the way I've been doing it (app/templates/app/model.html).  It works
well when you want to re-use your apps to make sure template names don't
conflict with other apps.

On 10/20/07, Leo Shklovskii <[EMAIL PROTECTED]> wrote:
>
>
> Does anyone have any thoughts on this? is there a recommended way to lay
> out the templates on a per-application basis? does it make sense to
> change either of the two defaults to be consistent with each other?
>
> --
> --Leo
>
> Leo Shklovskii wrote:
> > I've got a question about the templates that the generic views load.
> >
> > I have a app (named 'foo' in this example) that has its templates in a
> > templates folder to work with
> > django.template.loaders.app_directories.load_template_source.
> >
> > so:
> > foo/templates/bar.html
> > foo/templates/bar_list.html
> >
> > However, trying to use the generic view
> > django.views.generic.list_detail.object_list and by default, it looks
> > for a template named 'foo/bar_list.html' by default, but that doesn't
> > exist. I can move the templates into:
> >
> > foo/templates/foo/bar.html
> > foo/templates/foo/bar_list.html
> >
> > But it seems a little silly to repeat 'foo' twice, and breaks being able
> > to use just the template name 'bar.html' in other parts of django.
> > Alternatively I can specify the template name to object_list, but its so
> > nice to pick convention over configuration :-)
> >
> > Am I just setting up my project incorrectly? Or is there a better
> > suggestion for how to deal with this situation?
> >
> > --
> > --Leo
> >
> > >
> >
>
> >
>

--~--~-~--~~~---~--~~
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: new : advise on installing Django, issues

2007-10-18 Thread Hugh Bien
Hi Paper,
I think you want to just double click on Django-0.96.tar.gz file to unzip it
first, then from the Terminal type:

cd ~/Desktop/Django-0.96

It sounds like you're just starting out with the command line.  You might
want to google around for 'command line tutorials' or 'mac terminal
tutorials' before you dive into Django.

- Hugh

On 10/18/07, Paper Planes <[EMAIL PROTECTED]> wrote:
>
>
> Hello Hugh + Others,
>
> Thanks for responding and for the answers!
>
> I ran it at the top unix shell level, not within Python. (I had tried
> both before posting.)
>
> Is the issue that I downloaded Django to my desktop and not through
> FTP using unix?
>
> I feel like my computer doesn't know where the files are and I don't
> know how
> let it know where they are because I don't know UNIX commands.
>
> For example, the change directory command results in:
>
> 232:~ NNN$ cd Django-0.96
> -bash: cd: Django-0.96: No such file or directory
>
> The file "Django-0.96" is just sitting on my desktop.
>
> Thanks!
> Paper
>
>
>
>
>
>
> As a result, the suggested commands in the installation guide are not
> working.
>
> 232:~ $ sudo python setup.py install
> Password:
> /Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/
> Contents/MacOS/Python: can't open file 'setup.py': [Errno 2] No such
> file or directory
> 232:~ Chaddus$
>
>
> On Oct 18, 1:32 pm, "Hugh Bien" <[EMAIL PROTECTED]> wrote:
> > I think you're trying to run the 'tar' program inside the Python shell.
> >  Instead, just run it in your command line without running Python.
> >
> > You could also just find the Django-0.96.tar.gz file in Finder and
> double
> > click on it.
> >
> > Django comes with its own server for development, so you don't need
> Apache
> > or mod_python.
> >
> > On 10/18/07, Paper Planes <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > > > Hello,
> >
> > > > I want to start learning a computer language and I'm starting with
> > > > Django.
> >
> > > > But sadly, given the instructions on-line + my naivity, I can't
> figure
> > > > out how to install it.
> >
> > > > I have a MacBook (v 10.4.10).
> > > > I downloaded the latest Python. Python 2.5 (r25:51918, Sep 19 2006,
> > > > 08:49:13)
> >
> > > > This is a message I get when I try to Untar:
> > > > >>> tar xzvf Django-0.96.tar.gz
> > > >   File "", line 1
> > > > tar xzvf Django-0.96.tar.gz
> > > >^
> > > > SyntaxError: invalid syntax
> >
> > > > I'm unsure if it is the syntax (I've tried others) or if the
> > > > downloaded Django-0.96 is in the right place. It's just on my
> desktop?
> >
> > > > I know if I can't install it then there is something I'm extremely
> > > > naive about.
> >
> > > > Another question, do I need to install Install Apache and
> mod_python?
> > > > The installation guide says I can skip it if I'm just playing
> around.
> >
> > > > Thank you,
> > > > Paper
>
>
> >
>

--~--~-~--~~~---~--~~
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: new : advise on installing Django, issues

2007-10-18 Thread Hugh Bien
I think you're trying to run the 'tar' program inside the Python shell.
 Instead, just run it in your command line without running Python.

You could also just find the Django-0.96.tar.gz file in Finder and double
click on it.


Django comes with its own server for development, so you don't need Apache
or mod_python.



On 10/18/07, Paper Planes <[EMAIL PROTECTED]> wrote:
> >
> >
> > Hello,
> >
> > I want to start learning a computer language and I'm starting with
> > Django.
> >
> > But sadly, given the instructions on-line + my naivity, I can't figure
> > out how to install it.
> >
> > I have a MacBook (v 10.4.10).
> > I downloaded the latest Python. Python 2.5 (r25:51918, Sep 19 2006,
> > 08:49:13)
> >
> > This is a message I get when I try to Untar:
> > >>> tar xzvf Django-0.96.tar.gz
> >   File "", line 1
> > tar xzvf Django-0.96.tar.gz
> >^
> > SyntaxError: invalid syntax
> >
> > I'm unsure if it is the syntax (I've tried others) or if the
> > downloaded Django-0.96 is in the right place. It's just on my desktop?
> >
> > I know if I can't install it then there is something I'm extremely
> > naive about.
> >
> > Another question, do I need to install Install Apache and mod_python?
> > The installation guide says I can skip it if I'm just playing around.
> >
> > Thank you,
> > Paper
> >
> >
> > > >
> >
>

--~--~-~--~~~---~--~~
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: Customizing Django's Auth System

2007-10-18 Thread Hugh Bien
I was thinking about doing that, but I didn't want to roll my own
authentication system if would be easier to just customize what's already
been done.
On 10/18/07, Amirouche <[EMAIL PROTECTED]> wrote:
>
>
> if you only need User, write you own User model, no ?
>
> On Oct 18, 7:34 pm, "Hugh Bien" <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I was wondering if it was possible to customize Django's Auth system to
> not
> > include permissions, groups, or messages.  For the app I'm working on,
> just
> > have a User model would be great.
> >
> > - Hugh
>
>
> >
>

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



Customizing Django's Auth System

2007-10-18 Thread Hugh Bien
Hi all,

I was wondering if it was possible to customize Django's Auth system to not
include permissions, groups, or messages.  For the app I'm working on, just
have a User model would be great.

- Hugh

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



django_root or application_root ?

2007-10-10 Thread Hugh Bien
Hi,
I'm a Django newbie (just finished the tutorial on djangobook.com).  I'm
about to try building a blog with Django to learn some more and I was
wondering if there's some sort of DJANGO_ROOT that specifies the path to the
root of your project.

The djangobook tipped us to use Python's __file__ for setting the
TEMPLATE_DIRS:

import os.path

TEMPLATE_DIRS = (
os.path.join(os.path.basename(__file__), 'templates'),
)

Is this the preferred/conventional way?

Thanks!
- Hugh

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