Re: Is there a buildbot? Is there a waterfall? Do the tests pass against all backends?

2013-02-18 Thread Skylar Saveland

>
>
> you can see the tests at http://ci.djangoproject.com/ -- currently Oracle 
> is untested cause it's a major pita to setup on ubuntu.
>

Thanks for the info.

If anyone is interested, I get 11 failures and 5 errors on master against 
Oracle with ./runtests right now:


==
ERROR: test_lookup_date_as_str (modeltests.lookup.tests.LookupTests)
--
Traceback (most recent call last):
  File ".../lib/python2.7/site-packages/django/test/testcases.py", line 
883, in skip_wrapper
return test_func(*args, **kwargs)
  File ".../github/django/tests/modeltests/lookup/tests.py", line 70, in 
test_lookup_date_as_str
'',
  File ".../lib/python2.7/site-packages/django/test/testcases.py", line 
810, in assertQuerysetEqual
return self.assertEqual(list(items), values)
  File ".../lib/python2.7/site-packages/django/db/models/query.py", line 
125, in _result_iter
self._fill_cache()
  File ".../lib/python2.7/site-packages/django/db/models/query.py", line 
950, in _fill_cache
self._result_cache.append(next(self._iter))
  File ".../lib/python2.7/site-packages/django/db/models/query.py", line 
305, in iterator
for row in compiler.results_iter():
  File ".../lib/python2.7/site-packages/django/db/models/sql/compiler.py", 
line 690, in results_iter
for rows in self.execute_sql(MULTI):
  File ".../lib/python2.7/site-packages/django/db/models/sql/compiler.py", 
line 755, in execute_sql
cursor.execute(sql, params)
  File ".../lib/python2.7/site-packages/django/db/backends/oracle/base.py", 
line 774, in execute
six.reraise(utils.DatabaseError, utils.DatabaseError(*tuple(e.args)), 
sys.exc_info()[2])
  File ".../lib/python2.7/site-packages/django/db/backends/oracle/base.py", 
line 767, in execute
return self.cursor.execute(query, self._param_generator(params))
DatabaseError: ORA-01840: input value not long enough for date format


==
ERROR: test_gfk_to_model_with_empty_pk 
(regressiontests.generic_relations_regress.tests.GenericRelationTests)
Test related to #13085
--
Traceback (most recent call last):
  File 
".../github/django/tests/regressiontests/generic_relations_regress/tests.py", 
line 134, in test_gfk_to_model_with_empty_pk
b1 = Board.objects.create(name='')
  File ".../lib/python2.7/site-packages/django/db/models/manager.py", line 
149, in create
return self.get_query_set().create(**kwargs)
  File ".../lib/python2.7/site-packages/django/db/models/query.py", line 
406, in create
obj.save(force_insert=True, using=self.db)
  File ".../lib/python2.7/site-packages/django/db/models/base.py", line 
537, in save
force_update=force_update, update_fields=update_fields)
  File ".../lib/python2.7/site-packages/django/db/models/base.py", line 
641, in save_base
result = manager._insert([self], fields=fields, return_id=update_pk, 
using=using, raw=raw)
  File ".../lib/python2.7/site-packages/django/db/models/manager.py", line 
218, in _insert
return insert_query(self.model, objs, fields, **kwargs)
  File ".../lib/python2.7/site-packages/django/db/models/query.py", line 
1604, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
  File ".../lib/python2.7/site-packages/django/db/models/sql/compiler.py", 
line 852, in execute_sql
cursor.execute(sql, params)
  File ".../lib/python2.7/site-packages/django/db/backends/oracle/base.py", 
line 769, in execute
six.reraise(utils.IntegrityError, utils.IntegrityError(*tuple(e.args)), 
sys.exc_info()[2])
  File ".../lib/python2.7/site-packages/django/db/backends/oracle/base.py", 
line 767, in execute
return self.cursor.execute(query, self._param_generator(params))
IntegrityError: ORA-01400: cannot insert NULL into 
("TEST_D498902"."GENERIC_RELATIONS_REGRESS_2BFD"."NAME")


==
ERROR: test_get_key_columns 
(regressiontests.introspection.tests.IntrospectionTests)
--
Traceback (most recent call last):
  File ".../lib/python2.7/site-packages/django/test/testcases.py", line 
883, in skip_wrapper
return test_func(*args, **kwargs)
  File ".../github/django/tests/regressiontests/introspection/tests.py", 
line 115, in test_get_key_columns
key_columns = connection.introspection.get_key_columns(cursor, 
Article._meta.db_table)
  File ".../lib/python2.7/site-packages/django/db/backends/__init__.py", 
line 1082, in get_key_columns
raise NotImplementedError
NotImplementedError

==
ERROR: setUpClass (regressiontests.views.tests.i18n.JavascriptI18nTests)
--
Traceback (most 

Re: #7732 cx_Oracle SessionPool

2013-02-17 Thread Skylar Saveland


> Unless it fixes a release-blocking regression, it's not possible for 
> this to get into either of those release branches.


That's what I thought; just checking.
 

> Also, generally 
> we've been a bit wary of doing any kind of DB pooling at this level in 
> the stack... 
>

Maybe this patch can pass muster since, as Aymeric points out, it uses the 
cx_Oracle pooling code.
It has a little bit to establish and persist a SessionPool object which is 
then just an extra parameter to connect. On close then, the connection must 
be released back to the pool.

Barely more than passing options from the settings to connect().

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




Is there a buildbot? Is there a waterfall? Do the tests pass against all backends?

2013-02-17 Thread Skylar Saveland
Hi, I saw a very old thread talking about setting up a buildbot for Django. 
Did this ever go anywhere? Trying to run the tests against Oracle, I'm 
finding some that fail against my branch and master. For instance:

ERROR: test_gfk_to_model_with_empty_pk 
(regressiontests.generic_relations_regress.tests.GenericRelationTests) Test 
related to #13085

IntegrityError: ORA-01400: cannot insert NULL into 
("TEST_D498902"."GENERIC_RELATIONS_REGRESS_2BFD"."NAME")

==

ERROR: test_lookup_date_as_str (modeltests.lookup.tests.LookupTests)

DatabaseError: ORA-01840: input value not long enough for date format

Are these known to fail against what is in master on github? Is there a 
place to look to see which tests are failing against which backends? I also 
have a couple of failures against sqlite. But, I'm wondering what might be 
known and what might be a difference in my setup.

Thanks,
Skylar

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




Re: #7732 cx_Oracle SessionPool

2013-02-17 Thread Skylar Saveland
forgot to post the 
branch: https://github.com/skyl/django/compare/7732-oracle-sessionpool

On Saturday, February 16, 2013 11:17:03 PM UTC-8, Skylar Saveland wrote:
>
> I have a branch on github if anyone is interested in taking a look. I will 
> gladly modify and rebase if it's close to being acceptable (it could be 
> badly flawed, I'm not sure).
>
> I would be interested in getting this (or something like it) into 1.4.X 
> and 1.5.X. Might this be possible?
>
> -Skylar
>
>
>
>

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




#7732 cx_Oracle SessionPool

2013-02-16 Thread Skylar Saveland
I have a branch on github if anyone is interested in taking a look. I will 
gladly modify and rebase if it's close to being acceptable (it could be 
badly flawed, I'm not sure).

I would be interested in getting this (or something like it) into 1.4.X and 
1.5.X. Might this be possible?

-Skylar



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




Re: e-mail changed to email in email validator

2012-12-19 Thread Skylar Saveland
right-0, thanks guys. I must be getting old- I remember the style 
guidelines saying hyphen and thinking the hyphen was a little weird :)

Cheers!

On Wednesday, December 19, 2012 1:33:09 PM UTC-8, Mark Lavin wrote:
>
> This was changed as part of https://code.djangoproject.com/ticket/17899
>
> Best,
>
> Mark
>
> On Wednesday, December 19, 2012 4:23:24 PM UTC-5, Skylar Saveland wrote:
>>
>> I checked out 1.5 branch today and found a change that I can't find the 
>> debate/announcement for: e-mail to email in
>>
>> django/core/validators.py:validate_email = EmailValidator(email_re, 
>> _('Enter a valid email address.'), 'invalid')
>>
>> This change has me with
>>
>> # in 1.4.x it is:
>> #error = 'Enter a valid e-mail address.'
>> # in 1.5.x it is:
>> #error = 'Enter a valid email address.'
>> #self.assertFormError(res, 'form', 'email', error)
>>
>> ❯ git checkout 1.4.3
>> ❯ grep -r "Enter a valid email address." *
>> (Nothing there)
>> ~/Code/github/django (1f0af3c) ...
>>
>> > git checkout master
>> ~/Code/github/django (master) ↑
>> ❯ grep -r "Enter a valid email address." *
>>  (lot's of stuff)
>>
>> I'm sure this was discussed and noted somewhere; but, where?
>>
>> -Skylar
>>
>>
>>
>>

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



e-mail changed to email in email validator

2012-12-19 Thread Skylar Saveland
I checked out 1.5 branch today and found a change that I can't find the 
debate/announcement for: e-mail to email in

django/core/validators.py:validate_email = EmailValidator(email_re, 
_('Enter a valid email address.'), 'invalid')

This change has me with

# in 1.4.x it is:
#error = 'Enter a valid e-mail address.'
# in 1.5.x it is:
#error = 'Enter a valid email address.'
#self.assertFormError(res, 'form', 'email', error)

❯ git checkout 1.4.3
❯ grep -r "Enter a valid email address." *
(Nothing there)
~/Code/github/django (1f0af3c) ...

> git checkout master
~/Code/github/django (master) ↑
❯ grep -r "Enter a valid email address." *
 (lot's of stuff)

I'm sure this was discussed and noted somewhere; but, where?

-Skylar



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



Possible bug with GenericRelations and values_list

2012-12-10 Thread Skylar Saveland
Hi,

I posted this in the django-users group but I think it may merit posting 
here, as well. I have a test case which I think should pass.

https://github.com/skyl/django/commit/556df1c46146c2fc9c4022d838fa23f652f0ea8d

Is this a bug? If so, is it a bug that is not in the tracker?

Thanks,
Skylar

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



Re: How to set the sucess message after inserting values to db indjango admin site

2010-04-21 Thread skylar . saveland
Ask on django-users.  This list is for the discussion of developing django 
itself.
sent from my baz foone

-Original Message-
From: Radhikavk 
Date: Wed, 21 Apr 2010 22:55:03 
To: 
Subject: How to set the sucess message after inserting values to db in
 django admin site


How to set the sucess message after inserting values to db in django admin
site
like message department added sucessfully

model:

class departmentForm(forms.ModelForm):
model=mdldepartments

def clean(self):
dept_msg = u"Department name allows only characters."
cleaned_data = self.cleaned_data
dept = cleaned_data.get("dept_name")
pattern = re.compile("([A-Z,a-z])")
if not pattern.match(dept):
self._errors["dept_name"] = ErrorList([dept_msg])
#else:
#self.
return cleaned_data

class mdldepartmentsAdmin(admin.ModelAdmin): 
   form=departmentForm
   list_display = ('dept_name','status')
   search_fields = ['dept_name']
   list_filter = ['status'] 
admin.site.register(mdldepartments,mdldepartmentsAdmin)



And i tried to enable the messaging module in django but in django.contrib
messages folder is missing
my django version is 1.1


Thaks
Radhika

-- 
View this message in context: 
http://old.nabble.com/How-to-set-the-sucess-message-after-inserting-values-to-db-in-django-admin-site-tp28324413p28324413.html
Sent from the django-developers mailing list archive at Nabble.com.

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

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



Re: High Level Discussion about the Future of Django

2010-04-15 Thread skylar . saveland
+1 I would love to join in with some liberal, even wild-eyed experimentation on 
github.  I have all sorts of cock-eyed ideas that I would like to play with.

I don't like patches; I don't like svn; I'm not a fan of trac.  I do however 
enjoy the fact that Django trunk leans toward being boring and stable.

Make a hostile fork.  If it turns out to be awesome and stable and tested and 
so on .. then awesome..

Not sure why it has to be "hostile".  But, depending on the project, I could 
definitely see advantages to giving up on some of the backward compatibility 
overhead.

Cheap branches with git I think could be a great way for community members like 
myself to get their feet wet without the overhead and constraints of the full 
contributing process.
sent from my baz foone

-Original Message-
From: "Tom X. Tobin" 
Date: Thu, 15 Apr 2010 14:38:01 
To: 
Subject: Re: High Level Discussion about the Future of Django

On Thu, Apr 15, 2010 at 1:57 PM, Kevin Howerton
 wrote:
> "You seem to be suggesting that a fork will somehow magically fix the
> speed of Django development. I ask you: who is going to work on this
> fork?"
>
> I think a hostile fork is almost a certain outcome if development
> continues as it has.  Not only is the resistance to make backwards
> incompatible changes in future releases a bad policy for the quality
> of the framework, but the behavior in trac has a negative effect on
> community contributions.
[...]
> Personally I believe my time might be better spent developing a fork,
> than arguing over clear flaws in architecture decisions that "can't be
> changed".

Django is BSD licensed; no one is going to stop someone from making a
fork if they want to.  That no one has done so is, IMHO, a good sign
that the Django codebase and development process is considered solid
by the community.

Solid, of course, can sometimes be boring.  :-)  There's nothing wrong
with public experimentation; why not push a Django branch up on GitHub
with some features you find interesting?  You don't have to "fork" in
order to develop your own branch; we've been maintaining an internal
branch of Django at The Onion for a couple of years now, but we still
track upstream aggressively.  Sometimes I wonder if a long-running
experimental playground branch (or branches) on GitHub would be a
healthy way to direct some of the energy and interest in less
conservative changes; as pieces matured there, they could be
considered for the mainstream trunk, and trunk would in turn remain
nice and stable.

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

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



Re: Getting Problem in connecting mysql (Help me please )

2010-01-28 Thread skylar . saveland
Ask user questions elsewhere.  This list is for discussing the actual 
development of the django framework.  You will need to install the mysqldb 
python adapter, mysqldb.
sent from my baz foone

-Original Message-
From: rokson 
Date: Thu, 28 Jan 2010 06:48:53 
To: Django developers
Subject: Getting Problem in connecting mysql  (Help me please )

This is kiran .
i am new to django fw.i installed django fw and trying to connect
mysql which is installed in localhost.i am using python 26.i modified
settings.py according to the mysql db.
when i am running server. i am getting the fallowing error.

plese help me..




C:\kiranproj\myappone>python manage.py runserver
Validating models...
Unhandled exception in thread started by 
Traceback (most recent call last):
  File "C:\Python26\lib\site-packages\django\core\management\commands
\runserver.
py", line 48, in inner_run
self.validate(display_num_errors=True)
  File "C:\Python26\lib\site-packages\django\core\management\base.py",
line 249,
 in validate
num_errors = get_validation_errors(s, app)
  File "C:\Python26\lib\site-packages\django\core\management
\validation.py", lin
e 22, in get_validation_errors
from django.db import models, connection
  File "C:\Python26\lib\site-packages\django\db\__init__.py", line 41,
in 
backend = load_backend(settings.DATABASE_ENGINE)
  File "C:\Python26\lib\site-packages\django\db\__init__.py", line 22,
in load_b
ackend
return import_module('.base', backend_name)
  File "C:\Python26\lib\site-packages\django\utils\importlib.py", line
35, in im
port_module
__import__(name)
  File "C:\Python26\lib\site-packages\django\db\backends\mysql
\base.py", line 13
, in 
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb
module: No mo
dule named MySQLdb

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

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



Re: Backwards-incompatible change for model validation

2010-01-11 Thread Skylar Saveland
> Sorry for the problems, folks.

Hey, no worries, thanks for the good work.  Seems like a very usable
solution.
-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.




Re: Model validation incompatibility with existing Django idioms

2010-01-07 Thread Skylar Saveland
> ModelForm has a save() method that saves the model. It is reasonable
> to assume that if the form is valid, the save() method call should
> succeed, that's why the entire model is validated.

mf.is_valid() I have understood as validation strictly on the included
fields in the form.  I abuse this "feature".  Once I know that
something has been done validly by the user, I can bring into motion
all kinds of things.  As you can see all of these forms and their ilk
are intentionally excluding known required fields.

class MinimalContactForm(forms.ModelForm):
class Meta:
model = Contact
fields = ('first', 'm', 'last')

class PrimaryContactForm(forms.ModelForm):
class Meta:
model = Contact
exclude = ('user','primary', 'address', 'email')

class ContactForm(forms.ModelForm):
class Meta:
model = Contact
exclude = ('user',)

I know that you know what I'm saying, so let's see

> We could create a PartialModelForm, that would have save() method only
> when editing (and not adding) models and have other method (or
> enforced commit=False) for retrieval of the partial model. This form
> would only call validation on the modelfields that are part of the
> form (not being excluded). This is the behavior I understand everybody
> expects from ModelForm, so, for backwards compatibility, we could call
> it just ModelForm.

not entirely sure what you mean

> only when editing (and not adding) models and have other method (or
> enforced commit=False) for retrieval of the partial model

.

> Also please mind that it could prove difficult to do half the
> validation in one place and other fields elsewhere without a form.
> Models, as opposed to forms, don't have a state in sense of
> validated/raw and they don't track changes to their fields' data.
> That's why validation is run every time and the results are not cached
> on the instance.
>
> Few quick questions to get some ideas:
>
> 1) If editing a model (passed an instance parameter to __init__), even
> with a partial form, do you expect model.full_validate being called?
>
> 2) Are you OK with ripping save(commit=False) functionality to some
> other method? (current functionality can stay with a deprecation
> warning for example)

I wouldn't like to see that idiom changed.  We can create another attr
on the form but leave is_valid()?

> 3) Would you want errors raised in model validation after it being
> created by a form (commit=False) to appear on the form?

I suppose that I have been guilty of taking advantage of modelforms to
an extreme degree.  I don't picture needing model validation on my
modelforms right now.  I sometimes have a bunch of small forms (if the
case needs) like:

Applicant information
{{form|as_uni_form}}
{{profile_form|as_uni_form}}
How may we contact you?
{{contact_form|as_uni_form}}
How did you hear about us?
{{hear_about|as_uni_form}}
Terms and Conditions
{{tos_form|as_uni_form}}

if form.is_valid() and profile_form.is_valid()...:
... do magic to create user ...
add the required user field to the other objects with commit=False
idiom

Perhaps in this way I am also abusing the relational db.  But, I
always find occasion to add required fields (often FK to the other
modelforms) after I know the form "is
valid" (UnresolvableValidationError).

But, I would like another attr, so I could call modelform.model_errors
() or modelform.model_is_valid() or something.  Just plugging my own
self interest here though really.

I would like to see everything that I use behave exactly as I have
come to know it and then see other new features popping up around
that.

>
> on subject of inlines:
> 1) Is it acceptable to create a model and not it's inlines in the
> admin if the modelform validates but the inlines don't?
>
> 2) How can we limit people's validation code to avoid validating FKs
> in inlines since users can (and should) create their own validation
> logic on Models? Especially when we try and treat admin as "just a
> cool app" and not something people should really design for.
>
> 3) How would you feel on creating an option to enable behavior (1) )
> and document that models with side effects in their save and delete
> should really go for that?
>
> 4) Making 3) the default and enable switching it off if people want
> their admin page to save atomically.
>
> Please let me know what you think

I don't really know enough about the internals of the admin to say
much about that.
-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.