Re: Discussion: Why not Django include uWSGI/FastCGI support internally just like Spring Boot include tomcat ?

2019-02-27 Thread Simone Federici
Spring boot is like a django boot external lib to start a django
microservice.
exactly like spring boot. you can build your spring application without a
spring boot starter.


On Wed, 27 Feb 2019 at 09:35, panfei  wrote:

> If Django include these production-ready container, and then implement a
> mange.py admin command, by just executing the command we can start a
> production-ready service.
>
> Any possibilities on this idea ?
>
>
> --
> 不学习,不知道
>
> --
> 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/CA%2BJstLDyb3TABCsHpPqv_wFU_cjX0Qn23phcZnxgwO4QWvLgOw%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/CAKsNYugXWXtnj-8y9HKQEQs%3D%2BHdVEVESx5Kcj6yCTmteHRoLkA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Re: Composite Primary / Foreign Key support

2019-02-18 Thread Simone Federici
Lance,

sincerely, nobody take care about that feature because that's needed just
for legacy db.
The number of applications with on legacy db is less than 0.01% of the
django applications.
There are some workaround for that applications, for example use SQL
Alchemy.

I implemented a CompositeKey Dajngo feature for Django 1.4.  It is
completly working also for the Generic Keys, concatening escaped keys.
There was also a draft to implement the indexes. However, Django core team
is evolving the platform so quickly (good for the framework) and the
library is not mantained anymore. On Dajngo 1.6 I had should rewrote it
completly.

In the end, now I understand why the core team don't care about the
feature. Forget it.


Il giorno lun 18 feb 2019 alle ore 09:28 'Ellinghaus, Lance J' via Django
users  ha scritto:

> NONCONFIDENTIAL // EXTERNAL
> So, basically, Django will not be supporting Composite Primary Keys in the
> future?
>
> Lance
>
> -Original Message-
> From: django-users@googlegroups.com  On
> Behalf Of Michal Petrucha
> Sent: Monday, February 11, 2019 8:34 AM
> To: Django users 
> Subject: [External] Re: Composite Primary / Foreign Key support
>
> NONCONFIDENTIAL // EXTERNAL
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
>
> On Mon, Feb 11, 2019 at 01:08:41AM -0800, 'Lance Ellinghaus' via Django
> users wrote:
> > I have seen references to people adding the support of composite
> > primary keys to Django for years, but it does not look like it has been
> added.
> >
> > I have a number of legacy databases that I cannot add fields to but
> > need to be able to be queried through Django. They are read-only tables.
> > A number of the tables are also related through Composite Foreign Keys
> > and I have seen some addons but not sure what is fully supported.
> >
> > I am trying to use Django 2.1.5.
> >
> > Any help or ideas would be appreciated, and saying  "Add a field to
> > your tables" is not an option.
> >
> > Thank you.
>
> Hi Lance,
>
> I haven't been on top of this in recent years, but let me try.
>
> When it comes to just composite primary keys, as long as you only need
> read access, you might be able to get away with marking an arbitrary field
> as the primary key. Using a non-unique field as the primary key would make
> any writes to the database dangerous, but that's not your case here.
> However, you also lose the invariant that filtering on the “pk” field alias
> will match at most one row, which means the admin would probably be off the
> table, too – since that assumes the “pk” is, in fact, unique, and the same
> holds for any other package that makes use of “pk”. You should still be
> okay in your own code, though.
>
> For composite foreign keys, there is nowadays a private, undocumented API,
> ForeignObject, which is what ForeignKey builds on. The general
> ForeignObject lets you specify multiple fields that make up the relation,
> you should be able to find some examples in the test suite (there is a
> foreign_object package in there). Keep in mind that this is an internal
> API, so it might change without warning.
>
> Good luck,
>
> Michal
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1
>
> iQIcBAEBCgAGBQJcYXniAAoJEHA7T/IPM/kl8EAP/Rzaxqe0bDO6vkxb4/Mmmj5S
> 62t6Cfm3VqqK6NxYjRXG904jKwDI4HMH1SAs5fdVMh9vf+VBj/S5bcIpQbesqXbh
> wbkcIn+mmnfhLDaHOGunYqp76tscBJv/rtxJZaX5NRLp7OraCWtbjRBtiw1fJ/tl
> iJD0HRIk9zn0pqyX8GjeAyM0UR+uL1wwrvz8Ur85ASsc8pFThTP6ZMQoaEIgo9D+
> HB3XfrhiOMd5Nb2SbjG4KCRe7alpFx83nuY53YVsv+8X+Nqp4Ndi7ch2Ni3jxxHf
> R7qVJYsMp/l72CNb6KiT85sb6PwQyeVdvU78cXKjkIKDirskGgQIEW2OvK+ZXC3B
> Aj4I+AMFXEKje8ITfW3/s/v+UNvVTNZHYC5NPZ6o50+YJFDoiwb0mpQMdUredWZk
> nT2cYMgyPQA/XKN9w5vUCNbTebPG/AA7yCthXbOrHn9Xl+kICkXRjjl9fHRUs55Q
> wgPqz0CFXPKaE+JFt/NABJzdSrki1y587GHsOb7hKFiQwS8DHU8WOMXkR3BGKEtN
> q0gebcqKvVnjRwLLsBvB0h3uI/yifgBTp8G8/+tZ0WuNdongTe+yPzchxuRjgx10
> e70xtBjgsyCQGRB3CPsgR2UelQOtAEt8ZyYwyPF5sQYOvQg1xjcYp87FqfqflSTE
> 6aQIMkXhKjKazmc/ew9F
> =Ji5Z
> -END PGP SIGNATURE-
>
> --
> 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/20190211133426.GV10973%40konk.org
> .
> 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

Re: Multiple Fields as Primary Key in MySQL - Django 1.10

2017-01-03 Thread Simone Federici
Hi,

from compositekey import db

On my compositekey project the development is stopped on 1.5 django release.
https://github.com/simone/django-compositekey

The Django 1.6 release, with an huge ORM refactoring and a huge testing
refactoring, let my work hard to maintains. What I understand after the 1.6
release is that this fe wrote:

> Hi,
>
> Below is the model generated for one of the table from the legacy database
> using "inspectdb"
>
> class Test(models.Model):
> field1 = models.AutoField(db_column='Field1')  # Field name made
> lowercase.
> field2 = models.ForeignKey('Field2', models.DO_NOTHING,
> db_column='Field2')  # Field name made lowercase.
> field3 = models.CharField(db_column='Field3', max_length=200)  #
> Field name made lowercase.
> field4 = models.CharField(db_column='Field4', max_length=300,
> blank=True, null=True)  # Field name made lowercase.
>
> class Meta:
> managed = False
> db_table = 'test'
> unique_together = (('field1', 'field2'),)
>
>
> Table definition in MySQL:
> CREATE TABLE comment (
> Field1  INT UNSIGNEDNOT
> NULLAUTO_INCREMENT  COMMENT 'Field1',
> Field2  INT UNSIGNEDNOT
> NULLCOMMENT 'Field2',
> Field3  VARCHAR(200)NOT
> NULLCOMMENT 'Field3',
> Field4  VARCHAR(300)
> DEFAULT NULLCOMMENT 'Field4',
> KEY ( Field2 ),
> FOREIGN KEY (Field2) REFERENCES item (Field2) ON DELETE CASCADE,
> PRIMARY KEY  ( Field1, Field2 )
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
>
> Migrations failed with the error,
> "A model can't have more than one AutoField."
> AssertionError: A model can't have more than one AutoField.
>
> Tried work around of
>
> from compositekey import db
>
> id = db.MultiFieldPK("field1", "field2")
>
>
> Now a different error,
>
> from django.db.models.sql.aggregates import Aggregate
> ImportError: No module named aggregates
>
>
> Another work around of defining a new auto_increment field as primary key
> but here one of the composite keys (field1) is auto_incremental causing 2
> auto_increment fields in a table.
>
> Also this needs MySQL table alter, as this is a legacy database with many
> tables, this is quite difficult.
>
> Please advise me on work around, correct me if I am missing some thing
> here in the process.
>
> Thanks in advance.
>
> Ramesh.
>
> --
> 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/d26b46d1-bb73-4864-8d25-c0f6aab6a212%40googlegroups.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/CAKsNYuhco74hcj7eqqP3DrVdoG0fG56Nx1HQhBMu7mE-pHKHug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django (cache?) make some mistake with formset generated class

2013-11-07 Thread Simone Federici
On Thu, Nov 7, 2013 at 11:54 AM, Bastien Sevajol
wrote:

> formsets = {}


this class variable is in ModelFormsetManager class namespace
so it is shared across the subclasses.

You are using formsets to save before the object class, and after the
instances,
so when in the formset there is the instance of the last "view", and you
try to call it
create the instance of an class works, call the instance return object is
not callable exception

your last solution solve only apparently the superclass-namespace issue.


regards

-- 
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/CAKsNYuiV7E-nWNVbk9Vr3EQf%3DzLbRyCNkhG9jurvpX2hXohkig%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: How to create a formset that contains forms with a dropdown? (Crucial)

2012-08-16 Thread Simone Federici


On 16/ago/2012, at 23:35, Houmie  wrote:

> The question might seem too simplistic, but it seems formsets can only work 
> with forms that have simple type fields such as charfield.
> But has anyone tried to use a form with a dropdown and use that form to 
> instantiate a formset?
> 
> Let me give you an example why this fails:
> 
> Model:
> 
> class SalesItem(models.Model):
> item_description= models.CharField(max_length=40)
> company = models.ForeignKey(Company)
> 
> Here I create a form with a dropdown, hoping to pass in the company as a 
> source for the dropdown. Hold on to this thought, as I think that is not 
> possible in my scenario.
> 
> Form:
> 
> class SalesItemFSForm(Form):
> sales_item  =   forms.ModelChoiceField(required=False, queryset = '')
> 
> def __init__(self, company, *args, **kwargs):
> super(SalesItemFSForm, self).__init__(*args, **kwargs)
> self.fields.sales_item.queryset = company.salesitem_set.all()
> 
> Now within my view I would like to create a formset with this form:
> 
> formset_type = formset_factory(SalesItemFSForm, extra=0)
> 
> The problem becomes right away clear, as there seem to be no way that I could 
> pass in the company to determine the source for the dropdown.
> 
> 
> How would you solve this please?
> 

Extend the model form set.


> Many Thanks,
> Houman
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/django-users/-/YGT3FYCdYbUJ.
> 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.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django/Python Circular model reference

2012-06-01 Thread Simone Federici
On Fri, Jun 1, 2012 at 8:58 PM, Bill Freeman  wrote:

> This isn't quite OneToOne since the ends of the relation need not both
> exist.


An answer cannot exist without the question
The following question cannot exist without the previous answer,
but there is the case where the object Question is the "First" so the
relation "parent" has to be nullable.

Can exist 2 answers to the same question?
Can exist 2 followers questions to the same answer?

the OneToOne say "no this is not possible"
the ForeignKey say "yes"

let Jak decide on


PS
The self relationship for the questions is only a possibility, we can
modelling also a cyclic relationship, but in my opinion say that in our
domain there is a list of followers questions is more understandable and
you have the same results

Cheers
:-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django/Python Circular model reference

2012-06-01 Thread Simone Federici
class Question(models.Model):
   title = models.CharField(max_length = 50)
   response = models.CharField(max_length = 400)
   parent = models.OneToOne('self', related_name='child', null=True)

   def __unicode__(self):
   return self.title

class Answer(models.Model):
   question = models.OneToOne(Question, related_name='answer')
   title = models.CharField(max_length = 50)
   answer = models.CharField(max_length = 400)
   def __unicode__(self):
   return self.title


On Fri, Jun 1, 2012 at 7:05 PM, Jak  wrote:

> Think of it kind of like a conversation.
>
> Person A asks a question
>
new Q1

> Person B answers
>
new A1->Q1

> Person A asks another question
>
new Q2->Q1

> Person B gives a different answer.
>
new A2->Q2

>
> So for every question there could be an answer and for every answer
> there could be another question
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django/Python Circular model reference

2012-06-01 Thread Simone Federici
you can use 'Question' as String (lazy reference)
ManyToMany('Question')

but I don't really undestand your relations


On Fri, Jun 1, 2012 at 6:42 PM, Kevin Anthony wrote:

> Define it in one and back reference it in the other
>
> Kevin
> Please excuse brevity, sent from phone
> On Jun 1, 2012 12:38 PM, "Jak"  wrote:
>
>> The problem that I'm having is that the model "Question" is not
>> defined since I am referencing it after I use it in the Answer
>> model.
>>
>>
>> Thanks
>>
>> Jak
>>
>> On Jun 1, 12:08 pm, Javier Guerra Giraldez  wrote:
>> > On Fri, Jun 1, 2012 at 10:42 AM, Jak  wrote:
>> > > Each answer has
>> > > a question, and each question has an answer
>> >
>> > use OneToOneField relationships
>> > (https://docs.djangoproject.com/en/1.4/ref/models/fields/#onetoonefield
>> )
>> >
>> > --
>> > Javier
>>
>> --
>> 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.
>>
>>  --
> 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.
>

-- 
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: Need Help with ForeignKeys

2012-05-23 Thread Simone Federici
On Wed, May 23, 2012 at 4:40 PM, Mark Phillips
wrote:

> Now, can you please explain why it worked? What does the related_name do
> and why do I need it?

When you define a ForeignKey, django creates dinamically a reverse
relationship.

take this example:
A
B.a -> A


from an instance of b = B()
you can arrive to the related instance of A by b.a

but you can also from the instance of a = A()
retrieve all instace related of B by a.b_set()

but if in a model there are two or more relationship versus the same model
the names clashed! and Django ask you to give their names by related_name
property.

in your code:

t = Team()

this give you all games where the team was the home team
t.homegame_set.all()

this give you all games where the team was the visitor team
t.vititorgame_set.all()


by default
t.game_set clash!

-- 
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: Need Help with ForeignKeys

2012-05-23 Thread Simone Federici
class Game(models.Model):
game_id = models.IntegerField(primary_key=True)
gamedate = models.DateField()
gamestart = models.TimetField(blank=True)
duration = models.IntegerField()
innings = models.IntegerField()
hometeam = models.ForeignKey(Team, related_name='homegame_set')
visitingteam = models.ForeignKey(Team, related_name='visitinggame_set')

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django/Python version compatibility

2012-03-19 Thread Simone Federici
On Mon, Mar 19, 2012 at 21:52, Chiproller  wrote:

> So will 1.4 be compatible with Python 3.X?  I am wondering how best to
> learn Python for Django if I'm learning from Python books that cover
> (like most new books) 3.X.  Any suggestions?
>

Django 1.4 => [ Python2.5, Python2.6, Python2.7 ]
Django 1.5 maybe=>  [Python2.5+,  Python3.3]

Actually python2.7 is the best solution to begin, if you like the syntax of
python 3x you can use import __future__

-- 
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: Primary key for read-only models

2012-01-13 Thread Simone Federici
Try this:
https://github.com/simone/django-compositekey/wiki

and send me feedback :-)


On Thu, Jan 12, 2012 at 16:03, Demetrio Girardi
wrote:

> I need to read data from an "external" database table from my django
> project. I am not interested in modifying the data, only reading it.
> Of course I would like to create a django model for the table, because
> it makes life so much more easier.
>
> I have already done this previously, however in this case the table
> has a multiple field primary key, unsupported by Django. There is no
> other field which is guaranteed to be unique that I can use as primary
> key in the Django model.
>
> Do I need to worry about this? or can I just slap the primary_key flag
> on any of the fields, since I will never be inserting or updating in
> that table?
>
> --
> 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.
>
>

-- 
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: Cool and useful development commands :-)

2011-02-23 Thread Simone Federici
Thanks,
your feedback are welcome
:-D


On Wed, Feb 23, 2011 at 20:00, Ori Livneh  wrote:

> Can't wait to try it! Some nifty things here.
>
> On Tue, Feb 22, 2011 at 11:46 AM, Simone Federici wrote:
>
>> http://www.os4d.org/djangodevtools
>> Your feedback is very welcome
>>
>> Simone
>>
>> --
>> 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.
>>
>
>

-- 
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: Cool and useful development commands :-)

2011-02-23 Thread Simone Federici
Maybe you could write a filter "urlsafe" to use into templates so that
variable does not contains javascript.
And you could create a command that scan templates and raise an alert every
variable inside an href attribute that is not "urlsafe".

But I believe that a tool is used to work, not to do the work for me. And
Django is a tool.
It's like the java paradox,  java is a language that hidden a lot of
problems, and try to resolve them without the programmers. Result: you
cannot trust a java programmer, because often he doesn't know what the code
really does.

For this reason, I see that this kind of problems are better if you leave
resolve by developers. The better solution is to document better the
problem.

I think it is out of the scope of djangodevtools.
In other words, djangodevtools not is a library to development, but is a
library to help the development process itself.


On Wed, Feb 23, 2011 at 13:15, Mike Ramirez  wrote:

>  On Wednesday, February 23, 2011 03:36:32 am you wrote:
>
> > Oh yes actually xsyncdb is just the syncdb taken from 1.3alpha. I'm
>
> > developing with 1.2.5 but try to take the good stuff from the trunk and
> in
>
> > 1.3 is possible use an hidden load_initial_data paramenter :-)
>
> >
>
> Cool.
>
>  > xloaddata is a more verbosing loaddata,often, in developing, some
> changes
>
> > may send wrong the fixtures. xloaddata tell you which is last good
> fixture
>
> > loaded before the erroe. (is just a print of obj)
>
> >
>
> The queston on xloaddata wasn't about this, but the use of zip vs gzip vs
> bzip2.
>
> I never use zip for compressing data, just because it's one of the worst
> compressions around. I prefer gzip/bzip/7z/rar (rarely on rar these days).
> Because they are much better compression tools. The only point I can see to
> adding support zip with a single file is to compress it to save some
> diskspace/transfer, the other compressions make more sense to me. If adding
> support for multiple files, zip is only usefull for random access, tar would
> also need to be supported for multiple files. GZip/BZip as they are pure
> compression and have no archiving available to them, without tar. Hence the
> use of tarballs.
>
> gzip, bzip2 and tar all supported as part of the python standard library
> along with zip and just wondering the reason for not using these.
>
> Just a fun fact: I only use zip when dealing with people who are not
> technically inclined and don't understand the different
> compression/archiving tools around and they don't know about 7zip, which is
> very few people these days. This is why I'm curious.
>
>  > xshell instead is a shortcut that load automatically all models of your
>
> > applications. With xshell you don't need to import from the shell your
>
> > models.
>
> >
>
> Got it, not my cup of tea though. In some cases I need to conserve memory
> and this isn't condusive to that... see webfaction's hosting plans for an
> example why I think this way. But nice still.
>
>  > For the utility "scan templates" for obvious XSS mistakes,
>
> > it colud be a good tool, but I need your help to add this feature. I have
>
> > before to understand what you intend for obvious.
>
> >
>
> Well, that's why I linked the thread to you. Because it has the info there,
> but there are certain rules for escaping some data loaded into templates.
>
> See the XSS Prevention Cheet Sheet for examples[1] This would be part of
> the javascript utilities I think. Also see the OP's 1st post in the thread
> linked in the other email for an example of what not to do in Django's
> templates.
>
> If you're not really up on web site security, you should see the owasp
> faq[2] You might be able to find other ways to enhance secure development
> with your toolset. I think I might be interestined in helping you with some
> of this, right now I have one site to build (from scratch) and upgrade 2
> others to 1.3, so time is limited, but I know this would be useful. Lets
> keep an open dialog on this.
>
> For the most part django itself provides a lot of help under the hood for
> alot of it. Like sql injection is bypassed a lot with the whitelisting of
> urls and the orm itself escaping user supplied input and CSRF tokens for
> some XSS attack vectors.
>
> Mike
>
> [1] http://www.owasp.org/index.php/DOM_based_XSS_Prevention_Cheat_Sheet
>
> [2] http://www.owasp.org/index.php/OWASP_Application_Security_FAQ
>
> --
>
> Patch griefs with proverbs.
>
> -- William Shakespeare, "Much Ado About Nothing"
>
>

-- 
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: Cool and useful development commands :-)

2011-02-23 Thread Simone Federici
Oh yes actually xsyncdb is just the syncdb taken from 1.3alpha. I'm
developing with 1.2.5 but try to take the good stuff from the trunk and in
1.3 is possible use an hidden  load_initial_data paramenter :-)

xloaddata is a more verbosing loaddata,often, in developing, some changes
may send wrong the fixtures. xloaddata tell you which is last good fixture
loaded before the erroe. (is just a print of obj)

xshell instead is a shortcut that load automatically all models of your
applications. With xshell you don't need to import from the shell your
models.

For the utility "scan templates" for obvious XSS mistakes,
it colud be a good tool, but I need your help to add this feature. I have
before to understand what you intend for obvious.

Thanks for your feedback

On Wed, Feb 23, 2011 at 11:10, Mike Ramirez  wrote:

>  On Tuesday, February 22, 2011 08:46:34 am Simone Federici wrote:
>
> > http://www.os4d.org/djangodevtools
>
> > Your feedback is very welcome
>
> >
>
> > Simone
>
> Doesn't xsyncdb mimic the way syncdb already works or is there some
> difference that isn't apparent from the description?
>
>  Also, why not GZip instead of Zip for xloaddata, or are you planning to
> add the support for gzip/bzip later? (I don't really think of zip as a
> compression tool as much as an archiving tool similar to tar, though I know
> zip supports compression).
>
> and how does xshell differentiate from shell if you have ipython installed
> already?
>
>  These are the main questions I have glancing over them. But great work.
>
> 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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Cool and useful development commands :-)

2011-02-23 Thread Simone Federici
Thanks!
I want improve some commands,

for example I'd like have a feedback on the monkey patch on fetch_command
for coverage command. What you think? It is usefull for use a command before
it load the applications and before the model validation.

thanks
Simone



On Tue, Feb 22, 2011 at 19:05, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk> wrote:

> Haven't had chance to look at it properly yet, but looks like a useful set
> of tools. I'll download and have a tinker around later :)
>
> On Tue, Feb 22, 2011 at 4:46 PM, Simone Federici wrote:
>
>> http://www.os4d.org/djangodevtools
>>  Your feedback is very welcome
>>
>> Simone
>>
>>

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



Cool and useful development commands :-)

2011-02-22 Thread Simone Federici
http://www.os4d.org/djangodevtools
Your feedback is very welcome

Simone

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