Re: Feature proposal: selection of views and tables for inspectdb

2016-02-24 Thread Tim Graham
If inspectdb had exception handling as proposed in 
https://code.djangoproject.com/ticket/14098#comment:8 would that solve the 
issue?

On Wednesday, February 3, 2016 at 5:00:36 PM UTC-5, José Tomás Tocino wrote:
>
> Sorry I've been pretty disconnected from this thread. 
>
> The TL;DR version of the current situation is as follows: in Oracle, if a 
> user has read access to tables/views not owned by him, those are not listed 
> by the inspection mechanism inspectdb uses, so no model is generated for 
> them. They can be inspected if their name is explicitly given though. My PR 
> just offered a way of manually choosing what tables/views should be 
> introspected and have code generated for them.
>
> The solution proposed by the user Jani Tiainen in extending the 
> functionality of my PR so that you can use wildcards to easily match more 
> than one table/view.
>
> If no more complexity is to be added, then the solution would be fixing 
> the SQL I mentioned before [1] so that it correctly reports tables the user 
> can read... and also removes support to introspect views to properly match 
> the expected functionality of inspectdb (that in theory should not 
> introspect views). I think the key would be using the ALL_TABLES view in 
> Oracle instead of the USER_TABLES view, as it's suggested here [2]. This 
> solution is the one that more closely matches your desires, Tim.
>
>
>
> [1] : 
> https://github.com/django/django/blob/53ccffdb8c8e47a4d4304df453d8c79a9be295ab/django/db/backends/oracle/introspection.py#L54
> [2] : http://stackoverflow.com/a/205746/276451
>
> El jueves, 19 de noviembre de 2015, 2:30:24 (UTC+1), Tim Graham escribió:
>>
>> One correction, inspectdb doesn't currently create models for views, but 
>> this isn't the first time that code caused confusion, see 
>> https://code.djangoproject.com/ticket/25038.
>>
>> I agree that fixing the inspect SQL would be the ideal solution. José, I 
>> didn't follow the conversation closely enough to tell if you presented a 
>> reason this infeasible for some reason? I'd rather not add more complexity 
>> (arguments to inspectdb) where an easy solution already exists (removing 
>> unwanted models from the generated output). 
>>
>> On Wednesday, November 11, 2015 at 7:40:49 AM UTC-5, Jani Tiainen wrote:
>>>
>>> Hi,
>>>
>>> I guess it's just about crafting proper SQL for Oracle to do proper 
>>> introspection and do a PR to be inline with other backends what comes to 
>>> table/view discovery.
>>>
>>> On 11.11.2015 14:14, José Tomás Tocino wrote:
>>>
>>> So... is this going anywhere?
>>>
>>> El lunes, 9 de noviembre de 2015, 17:55:36 (UTC+1), José Tomás Tocino 
>>> escribió: 

 Well maybe extending queries to do that. Wonder is there similiar 
> issues with postgresql?
>

 Nope, I've just tried granting SELECT access to a user and he can 
 inspect the tables properly (in postgresql):

 postgres=# CREATE DATABASE permissions;
 CREATE DATABASE
 postgres=# \c permissions;
 You are now connected to database "permissions" as user "postgres".
 permissions=# create table foo (id int, name varchar(255));
 CREATE TABLE
 permissions=# GRANT CONNECT ON DATABASE permissions to tester;
 GRANT
 permissions=# GRANT USAGE ON SCHEMA public TO tester;
 GRANT
 permissions=# GRANT SELECT ON foo TO tester;
 GRANT
 permissions=# \q
 (ENV)vagrant@vagrant-ubuntu-trusty-64:~$ ./manage.py inspectdb
 # This is an auto-generated Django model module.
 # You'll have to do the following manually to clean this up:
 #   * Rearrange models' order
 #   * Make sure each model has one field with primary_key=True
 #   * Remove `managed = False` lines if you wish to allow Django to 
 create, modify, and delete the table
 # Feel free to rename the models, but don't rename db_table values or 
 field names.
 #
 # Also note: You'll have to insert the output of 'django-admin 
 sqlcustom [app_label]'
 # into your database.
 from __future__ import unicode_literals

 from django.db import models


 class Foo(models.Model):
 id = models.IntegerField(blank=True, null=True)
 name = models.CharField(max_length=255, blank=True, null=True)

 class Meta:
 managed = False
 db_table = 'foo'


 So there's that
  

>
> -- 
> José Tomás Tocino García
> http://www.josetomastocino.com
> -- 
> You received this message because you are subscribed to the Google 
> Groups "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to django-develop...@googlegroups.com.
> To post to this group, send email to django-d...@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit 
> 

Help! ImportError: No module named ...

2016-02-24 Thread Damián LLuch Castelli
Hi, It is the first time I write here. Sorry for the beginner question.

I was doing the next tutorial in python and I appeared this error.


http://www.marinamele.com/taskbuster-django-tutorial/settings-different-environments-version-control






(prueba3) damian@damian-Latitude-E5450:~/Documentos/taskbuster_project$ 
django-admin runserver
Traceback (most recent call last):
  File "/home/damian/virtualenvs/prueba3/bin/django-admin", line 11, in 

sys.exit(execute_from_command_line())
  File 
"/home/damian/virtualenvs/prueba3/local/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 353, in execute_from_command_line
utility.execute()
  File 
"/home/damian/virtualenvs/prueba3/local/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 302, in execute
settings.INSTALLED_APPS
  File 
"/home/damian/virtualenvs/prueba3/local/lib/python2.7/site-packages/django/conf/__init__.py",
 
line 55, in __getattr__
self._setup(name)
  File 
"/home/damian/virtualenvs/prueba3/local/lib/python2.7/site-packages/django/conf/__init__.py",
 
line 43, in _setup
self._wrapped = Settings(settings_module)
  File 
"/home/damian/virtualenvs/prueba3/local/lib/python2.7/site-packages/django/conf/__init__.py",
 
line 99, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named taskbuster.settings.testing


if someone can help me.
thanks.
damian

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/e0a3e7f8-1e7a-4070-a93a-aa54486042f2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help! ImportError: No module named ...

2016-02-24 Thread Daniele Procida
On Wed, Feb 24, 2016, Damián LLuch Castelli  wrote:

>Hi, It is the first time I write here. Sorry for the beginner question.

This is not the correct place for questions like this. 

You'll get answers to questions like this on the django-users email list, 
 - the web interface is 
. 

The list you've posted to is django-developers, which is for the discussion of 
the development of Django itself. 

You might also find the #django IRC channel on irc.freenode.net helpful. 

Daniele

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/20160224142513.680338910%40mail.wservices.ch.
For more options, visit https://groups.google.com/d/optout.


Re: Logged out sessions are resurrected by concurrent requests (ticket 21608)

2016-02-24 Thread Tore Lundqvist
Is there something I can do to move this forward?


Den torsdag 11 februari 2016 kl. 09:56:15 UTC+1 skrev Tore Lundqvist:
>
> Thanks for all the help with the patch! I hope its close to being 
> acceptable now. Can someone have a look at the PR?
>
> Den tisdag 2 februari 2016 kl. 13:08:51 UTC+1 skrev Tore Lundqvist:
>>
>> Ok, got that sorted now. How about the fix, is it reasonable?
>>
>>
>> Den tisdag 2 februari 2016 kl. 11:51:19 UTC+1 skrev is_null:
>>>
>>> Just click "Details" and then "Console output". You'll find this: 
>>>
>>> + flake8 
>>> ./django/contrib/sessions/backends/db.py:91:30: E901 SyntaxError: 
>>> invalid syntax 
>>>
>>> ERROR: 
>>> /home/jenkins/workspace/isort/django/contrib/sessions/backends/db.py 
>>> Imports are incorrectly sorted. 
>>> --- 
>>> /home/jenkins/workspace/isort/django/contrib/sessions/backends/db.py:before 
>>> 2016-02-01 16:04:24.701654 
>>> +++ 
>>> /home/jenkins/workspace/isort/django/contrib/sessions/backends/db.py:after 
>>> 2016-02-01 16:04:30.952126 
>>> @@ -1,8 +1,10 @@ 
>>>  import logging 
>>>
>>> -from django.contrib.sessions.backends.base import CreateError, 
>>> SessionBase, UpdateError 
>>> +from django.contrib.sessions.backends.base import ( 
>>> +CreateError, SessionBase, UpdateError, 
>>> +) 
>>>  from django.core.exceptions import SuspiciousOperation 
>>> -from django.db import IntegrityError, router, transaction, 
>>> DatabaseError 
>>> +from django.db import DatabaseError, IntegrityError, router, 
>>> transaction 
>>>  from django.utils import timezone 
>>>  from django.utils.encoding import force_text 
>>>  from django.utils.functional import cached_property 
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/b0632afe-4828-401d-b350-80ba53f96969%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Logged out sessions are resurrected by concurrent requests (ticket 21608)

2016-02-24 Thread Tim Graham
You could ask a friend or colleague to review the patch using the patch 
review checklist [1] and mark it "Ready for checkin" if it looks good. 
Otherwise, you just wait for someone to review it.

[1] 
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/submitting-patches/#patch-review-checklist

On Wednesday, February 24, 2016 at 10:18:26 AM UTC-5, Tore Lundqvist wrote:
>
> Is there something I can do to move this forward?
>
>
> Den torsdag 11 februari 2016 kl. 09:56:15 UTC+1 skrev Tore Lundqvist:
>>
>> Thanks for all the help with the patch! I hope its close to being 
>> acceptable now. Can someone have a look at the PR?
>>
>> Den tisdag 2 februari 2016 kl. 13:08:51 UTC+1 skrev Tore Lundqvist:
>>>
>>> Ok, got that sorted now. How about the fix, is it reasonable?
>>>
>>>
>>> Den tisdag 2 februari 2016 kl. 11:51:19 UTC+1 skrev is_null:

 Just click "Details" and then "Console output". You'll find this: 

 + flake8 
 ./django/contrib/sessions/backends/db.py:91:30: E901 SyntaxError: 
 invalid syntax 

 ERROR: 
 /home/jenkins/workspace/isort/django/contrib/sessions/backends/db.py 
 Imports are incorrectly sorted. 
 --- 
 /home/jenkins/workspace/isort/django/contrib/sessions/backends/db.py:before
  
 2016-02-01 16:04:24.701654 
 +++ 
 /home/jenkins/workspace/isort/django/contrib/sessions/backends/db.py:after 
 2016-02-01 16:04:30.952126 
 @@ -1,8 +1,10 @@ 
  import logging 

 -from django.contrib.sessions.backends.base import CreateError, 
 SessionBase, UpdateError 
 +from django.contrib.sessions.backends.base import ( 
 +CreateError, SessionBase, UpdateError, 
 +) 
  from django.core.exceptions import SuspiciousOperation 
 -from django.db import IntegrityError, router, transaction, 
 DatabaseError 
 +from django.db import DatabaseError, IntegrityError, router, 
 transaction 
  from django.utils import timezone 
  from django.utils.encoding import force_text 
  from django.utils.functional import cached_property 

>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/024a410c-7094-4fcd-991a-0a1d6bfba7ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


remove old SVN branches from git repository?

2016-02-24 Thread Tim Graham
Will anyone miss these branches if we remove them from the repository? I 
presume they've all either been merged or are so outdated that there isn't 
value in keeping them.

attic/boulder-oracle-sprint
attic/full-history
attic/generic-auth
attic/gis
attic/i18n
attic/magic-removal
attic/multi-auth
attic/multiple-db-support
attic/new-admin
attic/newforms-admin
attic/per-object-permissions
attic/queryset-refactor
attic/schema-evolution
attic/schema-evolution-ng
attic/search-api
attic/sqlalchemy
attic/unicode
soc2009/admin-ui
soc2009/http-wsgi-improvements
soc2009/i18n-improvements
soc2009/model-validation
soc2009/multidb
soc2009/test-improvements
soc2010/app-loading
soc2010/query-refactor
soc2010/test-refactor

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/e194a366-324c-4265-9322-7bacd623f423%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: remove old SVN branches from git repository?

2016-02-24 Thread Shai Berger
I think having this history is of value; I had reason to look into the 
boulder-oracle-sprint branch only a couple of years ago.

If they're a nuisance, I suggest that we clone the Django repo into another 
one under the django organization -- say,  "django-historical-branches" -- 
before removing them from the main repo.

Shai.

On Wednesday 24 February 2016 17:45:43 Tim Graham wrote:
> Will anyone miss these branches if we remove them from the repository? I
> presume they've all either been merged or are so outdated that there isn't
> value in keeping them.
> 
> attic/boulder-oracle-sprint
> attic/full-history
> attic/generic-auth
> attic/gis
> attic/i18n
> attic/magic-removal
> attic/multi-auth
> attic/multiple-db-support
> attic/new-admin
> attic/newforms-admin
> attic/per-object-permissions
> attic/queryset-refactor
> attic/schema-evolution
> attic/schema-evolution-ng
> attic/search-api
> attic/sqlalchemy
> attic/unicode
> soc2009/admin-ui
> soc2009/http-wsgi-improvements
> soc2009/i18n-improvements
> soc2009/model-validation
> soc2009/multidb
> soc2009/test-improvements
> soc2010/app-loading
> soc2010/query-refactor
> soc2010/test-refactor


Re: remove old SVN branches from git repository?

2016-02-24 Thread Florian Apolloner


On Wednesday, February 24, 2016 at 9:12:19 PM UTC+1, Shai Berger wrote:
>
> If they're a nuisance, I suggest that we clone the Django repo into 
> another 
> one under the django organization -- say,  "django-historical-branches" -- 
> before removing them from the main repo. 
>

I was about to suggest the same :D

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/a1cd51c0-446a-46fc-ad7c-b81b7472f3a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: remove old SVN branches from git repository?

2016-02-24 Thread Tim Graham
They're already in everyone's forks too unless you delete them. Not sure if 
deleting them from the main repo would delete them for all forks too.

On Wednesday, February 24, 2016 at 3:36:53 PM UTC-5, Florian Apolloner 
wrote:
>
>
>
> On Wednesday, February 24, 2016 at 9:12:19 PM UTC+1, Shai Berger wrote:
>>
>> If they're a nuisance, I suggest that we clone the Django repo into 
>> another 
>> one under the django organization -- say,  "django-historical-branches" 
>> -- 
>> before removing them from the main repo. 
>>
>
> I was about to suggest the same :D
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/ffceaa3b-ae34-4d2f-8ea2-7fa382b94a30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: remove old SVN branches from git repository?

2016-02-24 Thread Shai Berger
On Wednesday 24 February 2016 22:46:38 Tim Graham wrote:
> They're already in everyone's forks too unless you delete them.

True, but I think we should keep them accessible under the project roof.

Shai.


Re: remove old SVN branches from git repository?

2016-02-24 Thread Markus Holtermann

I'd like to keep them around somewhere. Even if it's just a wiki page
which links to the last commits of each branch.

When you have a local checkout of a brach that checkout is staying even
if the branch is removed on a remote. Also your local references to
remote branches are kept unless you call `git remote prune upstream`.
The branches in the remotes should still be available.

/Markus

On Wed, Feb 24, 2016 at 12:46:38PM -0800, Tim Graham wrote:

They're already in everyone's forks too unless you delete them. Not sure if
deleting them from the main repo would delete them for all forks too.

On Wednesday, February 24, 2016 at 3:36:53 PM UTC-5, Florian Apolloner
wrote:




On Wednesday, February 24, 2016 at 9:12:19 PM UTC+1, Shai Berger wrote:


If they're a nuisance, I suggest that we clone the Django repo into
another
one under the django organization -- say,  "django-historical-branches"
--
before removing them from the main repo.



I was about to suggest the same :D



--
You received this message because you are subscribed to the Google Groups "Django 
developers  (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/ffceaa3b-ae34-4d2f-8ea2-7fa382b94a30%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 
developers  (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/20160225001335.GA3849%40pyler.local.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature