Dave,
First of all, thanks for your very useful code and superb support!
Sorry, but the last error I reported to you, missed to say that was
generated after a generateDs.py & gends_extract _simple_types.py &
gends_generate_django.py step-by-step invocation, not
gends_run_gen_django.py as you did.
Using your instructions, if I run ' gends_run_gen_django.py' got this new
error:
$ ./gends_run_gen_django.py -f iodef.xsd
*** error ***
Unhandled simple type: lang language
Unhandled simple type: lang language
Unhandled simple type: lang language
Unhandled simple type: URL anyURI
Unhandled simple type: URL anyURI
Unhandled simple type: URL anyURI
*** error ***
But anway, the script generates the same models, forms & admin script that
you sent me by mail. If I run with your new 2.6b code, reports the same
error.
I think it may be a schema content/conversion error, not associated with
your new changes to code. I'm using python 2.6.5 and Django 1.3.0, if it
helps.
Thanks a lot.
regards,
technoman
2011/10/3 Dave Kuhlman <dkuhl...@pacbell.net>
> >From: TECHNOMAN
> >Sent: Thursday, September 29, 2011 2:27 PM
> > Hi all,
> >
> > I need some advice about a 'gends_generate_django.py' error.
> >
> > I run with any problem generateDS.py & gends_extract_simple_types.py
> > scripts, but when I try to generate django models from this XSD
> > (http://www.iana.org/assignments/xml-registry/schema/iodef-1.0.xsd)
> > I got the following error:
> >
> > ./gends_generate_django.py -f iodef
> > Traceback (most recent call last):
> > File "./gends_generate_django.py", line 144, in <module>
> > main()
> > File "./gends_generate_django.py", line 139, in main
> > generate_model(options, module_name)
> > File "./gends_generate_django.py", line 90, in generate_model
> > cls.generate_model_(wrtmodels, wrtforms)
> > AttributeError: type object 'Address' has no attribute 'generate_model_'
> >
> > In fact, the 'Address' class defined in iodef.py does not have that
> > attribute. Am I missing something?
> >
> > I greatly appreciate any help or advice.
> > Thanks in advance.
>
> technoman -
>
> I've generated models.py, forms.py, etc from your schema. Here is
> what I did.
>
> 1. Created a working directory:
>
> $ mkdir Test02
> $ cd Test02
>
> 2. Copied the files from generateDS-2.6a/django to this working
> directory:
>
> $ cp ../generateDS-2.6a/django/* .
>
> 3. Copied iodef-1.0.xsd to the working directory and renamed it
> (because python needs to be able to import the bindings and we
> can have dash or dot in a module name):
>
> $ cp ../orig/iodef-1.0.xsd iodef10.xsd
>
> 4. Copied process_includes.py and generateDS.py to the current
> directory:
>
> $ cp ../generateDS-2.6b/process_includes.py .
> $ cp ../generateDS-2.6b/generateDS.py .
>
> 5. Ran gends_run_gen_django.py:
>
> $ ./gends_run_gen_django.py -f iodef10.xsd
>
> That produced files models.py, forms.py, and admin.py.
>
> Does this help? Does it work for you, now?
>
> I've attached a Zip archive of that work directory (in a separate
> email so that it does not bloat the email list) in case it is of
> help.
>
> I did make a couple of small changes to generateDS.py last week, but
> have not yet released them. I don't think those changes matter in
> this case, but I can't be sure. The archive I'm sending you
> (separately) contains that new version.
>
> - Dave
>
>
>
>
> --
>
>
> Dave Kuhlman
> http://www.rexx.com/~dkuhlman
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users