Re: Django app and a submodule name conflict

2014-06-04 Thread Joseph Catrambone
It may be worth trying a relative import, depending on which version of 
Python you're using.  I believe you can do "from .B.models import BModel". 
 Note the '.' full-stop/period before the module.  I can't promise that 
will fix your problem, as the layout isn't entirely clear to me, but it 
might get you on the right track.

On Wednesday, June 4, 2014 3:51:28 AM UTC-4, Vahe Evoyan wrote:
>
> I have modules in the project with the same names, all placed in different 
> applications.
>
> Particularly there are two apps that conflict and result an ImportError. 
> The project structure approximately is as follows.
>
> project
>  |_ project   
>|_ settings.py
>|_ ...
>  |_ apps
>|_ A
>  |_ handlers
>|_ B.py
>|_ C.py
>|_ B
>  |_ models.py
>
> The settings file adds apps directory to the system path.
>
> BASE_DIR = os.path.dirname(os.path.dirname(__file__))
> sys.path.insert(0, os.path.join(BASE_DIR, "apps"))
>
> This configuration assumes that when I import the B.models it will use 
> apps/B/models.py. Although the following line in the C.py file raise an 
> import error as it imports the A/handlers/B.pywhich does not have models
>  module.
>
> A/handlers/C.py:
> from B.models import BModel
>
> The sys.path variable has a correct items, i.e. the first one in the list 
> is /path/to/project/appsand sys.modules['B.models'] is referenced to the 
> correct file.
>
> BTW, when I use Django's import_by_path function, everything works fine.
>
> Any ideas how I can solve the problem without renaming the modules?
>
> Posted sample sources 
>  on GitHub.
>
> Thanks in advance!
>

-- 
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/0e09ff68-d4a7-4353-afd3-0932205a7823%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Bug 969546] Re: windows moving between workspaces

2012-06-23 Thread Joseph Catrambone
*** This bug is a duplicate of bug 755842 ***
https://bugs.launchpad.net/bugs/755842

I do not believe this is a duplicate bug.  There is no flickering.
Entire Windows jump between virtual desktops.  I have captured a
sequence of images to demonstrate this behavior.

The first three images in the attachment are me switching to the right
through my three virtual desktops by means of the keyboard shortcut.  In
the forth image, I switch to the left.  You may note that the fullscreen
window on 2 is now missing.  In the fifth image, I switch again to the
left and see that some of the windows which were on desktop two are now
on desktop one.


** Attachment added: Demonstrating the Desktop Jump
   
https://bugs.launchpad.net/ubuntu/+source/unity/+bug/969546/+attachment/3201662/+files/ubuntu_bug_movie_low_quality.zip

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/969546

Title:
  windows moving between workspaces

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity/+bug/969546/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs