On Sat, Jun 14, 2008 at 12:45 PM, Ian Bicking <[EMAIL PROTECTED]> wrote:
> Lukasz Szybalski wrote:
>>
>> http://lucasmanual.com/mywiki/Paste
>>
>> Ok. So I created paster create myapp  again.
>>
>> /myapp/setup.py I added entry point
>> [paste.paster_create_template]
>>      myapp = myapp:FrameworkTemplate
>>
>> what is the difference between these two:
>>      myapp = myapp:FrameworkTemplate
>>      myapp = myapp.myapp:FrameworkTemplate
>
> That's just the different locations you might want to put the code in. If
> you put it in myapp/__init__.py, then the first one, if you put it in
> myapp/myapp/__init__.py (or myapp/myapp.py).  It's entirely up to you how
> you want to lay out your code.

 paster create --list-templates
Available templates:
  basic_package:  A basic setuptools-enabled package
  myapp:          Template for greattt creating a basic Framework package


entry point:
myapp = myapp:FrameworkTemplate

If I put it into  /myapp/__init__.py

 paster create -t "myapp"
Traceback (most recent call last):
  File "/usr/local/pythonenv/BASELINE/bin/paster", line 8, in <module>
    load_entry_point('PasteScript==1.6.2', 'console_scripts', 'paster')()
  File 
"/usr/local/pythonenv/BASELINE/lib/python2.5/site-packages/PasteScript-1.6.2-py2.5.egg/paste/script/command.py",
line 79, in run
    invoke(command, command_name, options, args[1:])
  File 
"/usr/local/pythonenv/BASELINE/lib/python2.5/site-packages/PasteScript-1.6.2-py2.5.egg/paste/script/command.py",
line 118, in invoke
    exit_code = runner.run(args)
  File 
"/usr/local/pythonenv/BASELINE/lib/python2.5/site-packages/PasteScript-1.6.2-py2.5.egg/paste/script/command.py",
line 213, in run
    result = self.command()
  File 
"/usr/local/pythonenv/BASELINE/lib/python2.5/site-packages/PasteScript-1.6.2-py2.5.egg/paste/script/create_distro.py",
line 69, in command
    self.extend_templates(templates, tmpl_name)
  File 
"/usr/local/pythonenv/BASELINE/lib/python2.5/site-packages/PasteScript-1.6.2-py2.5.egg/paste/script/create_distro.py",
line 233, in extend_templates
    tmpl = entry.load()(entry.name)
  File 
"/usr/local/pythonenv/BASELINE/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py",
line 1917, in load
ImportError: <module 'myapp' from
'/home/lucas/tmp/myapp/myapp/__init__.pyc'> has no 'FrameworkTemplate'
attribute



Lucas

_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to