Installing Django 1.0.2...

2008-12-31 Thread mic

I am a first time python/django user..

Running "python setup.py install" from django-1.0.2-final directory
gives me this error

Traceback (most recent call last):
  File "setup.py", line 69, in 
version = __import__('django').get_version()
  File "C:\Django-1.0.2-final\django\__init__.py", line 13, in
get_version
from django.utils.version import get_svn_revision
ImportError: No module named utils.version

Any ideas on what I am missing?

Thanks

Mic

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



Installing Django 1.0.2...

2008-12-31 Thread mic

I am a first time python/django user

running "python setup.py install" gives me this error

Traceback (most recent call last):
  File "setup.py", line 69, in 
version = __import__('django').get_version()
  File "C:\Django-1.0.2-final\django\__init__.py", line 13, in
get_version
from django.utils.version import get_svn_revision
ImportError: No module named utils.version

Any help is appreciated.

Thanks for the help.

Madhav

--~--~-~--~~~---~--~~
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: Installing Django 1.0.2...

2009-01-31 Thread mic

hi Karen,

>> That's odd. Do you have the files:

>> C:\Django-1.0.2-final\django\utils\__init__.py
>> C:\Django-1.0.2-final\django\utils\version.py

I have the following structure...

C:\Django-1.0.2-final\django\__init__.py
C:\Django-1.0.2-final\django\utils\version.py

Can't figure out why this is not working

On Jan 6, 9:11 am, "Karen Tracey"  wrote:
> On Tue, Jan 6, 2009 at 7:16 AM, Jay  wrote:
>
> > Karen, thanks for your comments, you are right.
> > However, it turns out that the file "...\Django-1.0.2-final\django
> > \utils\__init__.py" has size 0, and it seems when using winzip ( I
> > just realized why 7-zip may have been required for unzipping), the 0
> > size file is *not*  written out. In fact "viewing" the file causes an
> > error (at least on my version winzip 7.0 SR-1). The simple work around
> > is to create an empty file named __init__.py in "...\Django-1.0.2-final
> > \django\utils".
>
> > Now the command "setup.py install" works just fine.
>
> Be aware there are many more 0-byte __init__.py files in the django
> tarball.  Any tool that doesn't correctly extract them is probably not
> something you want to be using.  These files are common in any Python-based
> project.
>
> Karen
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Exception Value: relation "django_session" does not exist

2021-05-24 Thread Mic
Hello,
I found a Django project and failed to get it running in Docker container 
in the following way:

 1. `*git clone git clone https://github.com/NAL-i5K/django-blast.git*`
 2. `*$ cat requirements.txt*` in this files the below dependencies had to 
be updated:
- psycopg2==2.8.6 

I have the following Dockerfile:

```
*FROM python:2*
*ENV PYTHONUNBUFFERED=1*
*RUN apt-get update && apt-get install -y postgresql-client*
*WORKDIR /code*
*COPY requirements.txt /code/*
*RUN pip install -r requirements.txt*
*COPY . /code/*
*RUN mkdir -p /var/log/django*
*RUN mkdir -p /var/log/i5k*
```

For `docker-compose.yml` I use:

```
*version: "3"*

*services:*
*  db:*
*image: postgres*
*volumes:*
*  - ./data/db:/var/lib/postgresql/data*
*  - 
./scripts/install-extensions.sql:/docker-entrypoint-initdb.d/install-extensions.sql*

*environment:*
*  - POSTGRES_DB=postgres*
*  - POSTGRES_USER=postgres*
*  - POSTGRES_PASSWORD=postgres*

*  web:*
*build: .*
*command: python manage.py runserver 0.0.0.0:8000*
*volumes:*
*  - .:/code*
*ports:*
*  - "8000:8000"*
*depends_on:*
*  - db*
*links:*
*  - db*
```

```
*$ cat scripts/install-extensions.sql *
*CREATE EXTENSION hstore;*
```

I had to change:

```
*$ vim i5k/settings.py*
*DATABASES = {*
*'default': {*
*'ENGINE': 'django.db.backends.postgresql_psycopg2',*
*'NAME': 'postgres',*
*'USER': 'postgres',*
*'PASSWORD': 'postgres',*
*'HOST': 'db',*
*'PORT': '5432',*
*}*
*}*
```

Next, I ran `*docker-compose up --build*` and opened in Browser `
*http://localhost:8000/admin/*` which caused:

```
*Environment:*


*Request Method: GET*
*Request URL: http://localhost:8000/admin/*

*Django Version: 1.8.12*
*Python Version: 2.7.18*
*Installed Applications:*
*('django.contrib.auth',*
* 'django.contrib.contenttypes',*
* 'django.contrib.sessions',*
* 'django.contrib.sites',*
* 'django.contrib.messages',*
* 'django.contrib.staticfiles',*
* 'django.contrib.postgres',*
* 'axes',*
* 'rest_framework',*
* 'rest_framework_swagger',*
* 'pipeline',*
* 'app',*
* 'blast',*
* 'migrate_account',*
* 'suit',*
* 'filebrowser',*
* 'django.contrib.admin',*
* 'django.contrib.admindocs',*
* 'social.apps.django_app.default',*
* 'captcha',*
* 'dashboard',*
* 'proxy',*
* 'hmmer',*
* 'clustal',*
* 'webapollo_sso',*
* 'drupal_sso')*
*Installed Middleware:*
*('django.middleware.common.CommonMiddleware',*
* 'django.contrib.sessions.middleware.SessionMiddleware',*
* 'django.middleware.csrf.CsrfViewMiddleware',*
* 'django.contrib.auth.middleware.AuthenticationMiddleware',*
* 'django.contrib.messages.middleware.MessageMiddleware',*
* 'axes.middleware.FailedLoginMiddleware',*
* 'app.middleware.SocialAuthExceptionMiddleware')*


*Traceback:*
*File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" 
in get_response*
*  132. response = wrapped_callback(request, 
*callback_args, **callback_kwargs)*
*File 
"/usr/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in 
wrapper*
*  254. return self.admin_view(view, cacheable)(*args, 
**kwargs)*
*File "/usr/local/lib/python2.7/site-packages/django/utils/decorators.py" 
in _wrapped_view*
*  110. response = view_func(request, *args, **kwargs)*
*File 
"/usr/local/lib/python2.7/site-packages/django/views/decorators/cache.py" 
in _wrapped_view_func*
*  57. response = view_func(request, *args, **kwargs)*
*File 
"/usr/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in 
inner*
*  222. if not self.has_permission(request):*
*File 
"/usr/local/lib/python2.7/site-packages/django/contrib/admin/sites.py" in 
has_permission*
*  162. return request.user.is_active and request.user.is_staff*
*File "/usr/local/lib/python2.7/site-packages/django/utils/functional.py" 
in inner*
*  225. self._setup()*
*File "/usr/local/lib/python2.7/site-packages/django/utils/functional.py" 
in _setup*
*  376. self._wrapped = self._setupfunc()*
*File 
"/usr/local/lib/python2.7/site-packages/django/contrib/auth/middleware.py" 
in *
*  22. request.user = SimpleLazyObject(lambda: get_user(request))*
*File 
"/usr/local/lib/python2.7/site-packages/django/contrib/auth/middleware.py" 
in get_user*
*  10. request._cached_user = auth.get_user(request)*
*File 
"/usr/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in 
get_user*
*  167. user_id = _get_user_session_key(request)*
*File 
"/usr/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in 
_get_user_session_key*
*  59. return 
get_user_model()._meta.pk.to_python(request.session[SESSION_KEY])*
*File 
"/usr/local/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py"
 
in __getitem__*
*  48. return self._session[key]*
*File 
"/usr/local/lib/python2.7/site-packages/django

Re: Error finding Upload-Folder. Maybe it does not exist?

2021-05-26 Thread Mic
I tried to create the missing `blast/db` folder in the following way but it 
still does not work:

```
*$ docker-compose exec web /bin/bash*
*# pwd*
*/code*
*# mkdir -p blast/db*
*# mkdir -p i5k/blast/db *
```
Where do I have to create *blast/db* folder?

Thank you in advance,

Michal
On Tuesday, May 25, 2021 at 8:25:39 AM UTC+10 Mic wrote:

> Hello,
> I found a Django project and failed to get it running in Docker container 
> in the following way:
>
>  1. `*git clone git clone https://github.com/NAL-i5K/django-blast.git 
> <https://github.com/NAL-i5K/django-blast.git>*`
>  2. `*$ cat requirements.txt*` in this files the below dependencies had 
> to be updated:
> - psycopg2==2.8.6 
>
> I have the following Dockerfile:
>
> ```
> *FROM python:2*
> *ENV PYTHONUNBUFFERED=1*
> *RUN apt-get update && apt-get install -y postgresql-client*
> *WORKDIR /code*
> *COPY requirements.txt /code/*
> *RUN pip install -r requirements.txt*
> *COPY . /code/*
> *RUN mkdir -p /var/log/django*
> *RUN mkdir -p /var/log/i5k*
> ```
>
> For `docker-compose.yml` I use:
>
> ```
> *version: "3"*
>
> *services:*
> *  db:*
> *image: postgres*
> *volumes:*
> *  - ./data/db:/var/lib/postgresql/data*
> *  - 
> ./scripts/install-extensions.sql:/docker-entrypoint-initdb.d/install-extensions.sql*
>
> *environment:*
> *  - POSTGRES_DB=postgres*
> *  - POSTGRES_USER=postgres*
> *  - POSTGRES_PASSWORD=postgres*
>
> *  web:*
> *build: .*
> *command: python manage.py runserver 0.0.0.0:8000 
> <http://0.0.0.0:8000>*
> *volumes:*
> *  - .:/code*
> *ports:*
> *  - "8000:8000"*
> *depends_on:*
> *  - db*
> *links:*
> *  - db*
> ```
>
> ```
> *$ cat scripts/install-extensions.sql *
> *CREATE EXTENSION hstore;*
> ```
>
> I had to change:
>
> ```
> *$ vim i5k/settings.py*
> *DATABASES = {*
> *'default': {*
> *'ENGINE': 'django.db.backends.postgresql_psycopg2',*
> *'NAME': 'postgres',*
> *'USER': 'postgres',*
> *'PASSWORD': 'postgres',*
> *'HOST': 'db',*
> *'PORT': '5432',*
> *}*
> *}*
> ```
>
> Next, I ran:
>
>1. `*docker-compose up --build*` 
>2. `*docker-compose run web python manage.py`* 
>3. `*docker-compose run web python manage.py migrate*`
>4. `*docker-compose run web python manage.py createsuperuser`*
>
> Finally, I opened in Browser `
> http://localhost:8000/admin/blast/blastdb/add/` 
> <http://localhost:8000/admin/blast/blastdb/add/> and try to upload a file 
> and got this error:
>
>
> *```*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *web_1  | [24/May/2021 18:04:53] "POST 
> /admin/blast/sequencetype/add/?_to_field=id&_popup=1 HTTP/1.1" 200 237web_1 
>  | [24/May/2021 18:04:58] "GET /admin/blast/blastdb/add/ HTTP/1.1" 200 
> 15281web_1  | [24/May/2021 18:04:58] "GET /admin/jsi18n/ HTTP/1.1" 200 
> 2372web_1  | django.request ERROR 2021-05-24 18:05:05,381 10 [Internal 
> Server Error: /admin/filebrowser/browse/]web_1  | Traceback (most recent 
> call last):web_1  |   File 
> "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 
> 132, in get_responseweb_1  | response = wrapped_callback(request, 
> *callback_args, **callback_kwargs)web_1  |   File 
> "/usr/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py", 
> line 22, in _wrapped_viewweb_1  | return view_func(request, *args, 
> **kwargs)web_1  |   File 
> "/usr/local/lib/python2.7/site-packages/django/views/decorators/cache.py", 
> line 57, in _wrapped_view_funcweb_1  | response = view_func(request, 
> *args, **kwargs)web_1  |   File "/code/filebrowser/views.py", line 89, in 
> browseweb_1  | raise ImproperlyConfigured, _("Error finding 
> Upload-Folder. Maybe it does not exist?")web_1  | ImproperlyConfigured: 
> Error finding Upload-Folder. Maybe it does not exist?web_1  | [24/May/2021 
> 18:05:05] "GET 
> /admin/filebrowser/browse/?pop=1&dir=blast/db/&type=FASTA&filter_type=FASTA 
> HTTP/1.1" 500 101471*
> *```*
> Where do I have to create *blast**/db* folder?
>
>
> Thank you 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b3eb5a1a-2295-4449-99b9-d867bafb688fn%40googlegroups.com.


Drop down lists based on previous selections ...

2008-09-02 Thread Mic Pringle

Hi,

I'm relatively new to Django and still finding my feet so forgive me
if this is a simple question, but I've had no luck finding help
elsewhere.

I have a table of manufacturers and a table of models, and what I'd
like to do is have the two drop down boxes in the admin section ...

a) link to these tables so that a user can only choose one of the
options (I have been able to do this using choices and manually typing
them in tuples in the model definition, but haven't found out how to
do it using another model)

b) link the second drop down so that only models related to the chosen
manufacturer in the first drop down are available.

Can anyone tell me if this is possible, and if so perhaps give
guidance on how I'd go about implementing it in both the admin section
and also through a view/template that needs to be displayed to the end
user.

Thanks in advance.

-Mic

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: django web hosting

2008-09-03 Thread Mic Pringle

I have it on good authority that Media Temple will be launching their
Django Container later this week, which is what I'm holding out for.

-Mic

2008/9/3 tupixo <[EMAIL PROTECTED]>:
>
>> i am looking for a good web host for my django website.  does anyone
>> suggest a good host?  thanks.
>
> I've heard good things about djangohosting.ch and great things about
> webfaction.com :)
> From what I've heard Django apps are setup in a similar way in both,
> but for the rest WebFaction is probably better: support, server speed
> and stability, svn/trac available for your project. They probably have
> a lot more experience with Django too since they host so many Django
> sites.
>
> Kevin.
> >
>

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Filmaster -- a free film buff community, based on django and Pinax

2009-03-21 Thread mic...@jakilinux.org

Hello everyone!

I've got a small announcement. We've just rolled out a private beta
version of Filmaster, an open-source project implemented in django
that uses
a lot of pinax modules to make it work

Filmaster is a social network for film buffs with personalized
recommendations. All the code is released under AGPLv3 (obviously
except for the pinax parts and other external modules that are mainly
under BSD).

If anyone of you is interested, here is the announcement:
http://blog.filmaster.com/filmaster-private-beta-starts-now/ and here
is the Filmaster developer's portal when you can read the
documentation (in progress :P) and download the source code to play
with: http://filmaster.org

If anyone would like to help either coding or beta-testing, just send
us and e-mail at filmas...@filmaster.com weI'll give you the
passphrase  (if you can't guess :P) and the details

If you have any questions, ask here!

Cheers,
Borys

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



Quick noob question regarding the admin interface ...

2009-04-03 Thread Mic Pringle

Hi,

I've been googling this for a while but can't seem to find any
relevant information.

Is it possible to utilise the admin interface without requiring
authorisation ? Is it as simple as not including the authorisation
module in my installed apps, or is there a bit more to it than that ?

What I'm looking to achieve is that the main admin page will just load
when the user hits the /admin url rather than being presented with the
login box which then redirects to this page on a successful login
attempt. I have no requirements for indivdual users or permissions.

Thanks

-Mic

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



Embedded Django ...

2009-04-07 Thread Mic Pringle

Hi,

I am currently developing a database creation and manipulation tool
for the Mac (similar to Filemaker, Bento, ModelBaker etc) and I'm
looking at embedding Django and using the admin interface for data
input and retrieval. The only concern I have is that I don't require
users, groups, permissions or sessions, and as I understand it, all
this is baked into the admin application, non-optional.

So my question is, how easy/difficult would it be to strip out all of
the above from the admin application ? Would you start by copying the
admin folder from contrib into your own application and just start
ripping this stuff out, line by line, or is there perhaps an easier
way ?

Any help would be greatly appreciated.

Thanks

-Mic

--~--~-~--~~~---~--~~
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: Embedded Django ...

2009-04-07 Thread Mic Pringle

Hi,

I've been having a look through the docs and source code and if I'm
right, I could achieve what I need by subclassing AdminSite and
implementing my own 'index' and 'urls' methods.

Can someone confirm whether or not I'm on the right track ?

Thanks,

-Mic


-- Forwarded message --
From: Mic Pringle 
Date: 2009/4/7
Subject: Embedded Django ...
To: django-users@googlegroups.com


Hi,

I am currently developing a database creation and manipulation tool
for the Mac (similar to Filemaker, Bento, ModelBaker etc) and I'm
looking at embedding Django and using the admin interface for data
input and retrieval. The only concern I have is that I don't require
users, groups, permissions or sessions, and as I understand it, all
this is baked into the admin application, non-optional.

So my question is, how easy/difficult would it be to strip out all of
the above from the admin application ? Would you start by copying the
admin folder from contrib into your own application and just start
ripping this stuff out, line by line, or is there perhaps an easier
way ?

Any help would be greatly appreciated.

Thanks

-Mic

--~--~-~--~~~---~--~~
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: Embedded Django ...

2009-04-07 Thread Mic Pringle

Hi,

Could someone please explain (just a quick overview) how the
authentication process works for the Django admin site ?

Looking through the source I see methods for index and app_index, and
login & display_login_form ... however I cannot see how, when I first
boot up the server and navigate to the '/admin' address (which maps to
the index method) the user is authenticated ?

All I can see in those methods (index and app_index) is that the user
is taken from request.user ?

Is it to do with the authentication middleware ?

Any help will be greatly appreciated.

Thanks,

-Mic


-- Forwarded message ------
From: Mic Pringle 
Date: 2009/4/7
Subject: RE: Embedded Django ...
To: django-users@googlegroups.com


Hi,

I've been having a look through the docs and source code and if I'm
right, I could achieve what I need by subclassing AdminSite and
implementing my own 'index' and 'urls' methods.

Can someone confirm whether or not I'm on the right track ?

Thanks,

-Mic


-- Forwarded message --
From: Mic Pringle 
Date: 2009/4/7
Subject: Embedded Django ...
To: django-users@googlegroups.com


Hi,

I am currently developing a database creation and manipulation tool
for the Mac (similar to Filemaker, Bento, ModelBaker etc) and I'm
looking at embedding Django and using the admin interface for data
input and retrieval. The only concern I have is that I don't require
users, groups, permissions or sessions, and as I understand it, all
this is baked into the admin application, non-optional.

So my question is, how easy/difficult would it be to strip out all of
the above from the admin application ? Would you start by copying the
admin folder from contrib into your own application and just start
ripping this stuff out, line by line, or is there perhaps an easier
way ?

Any help would be greatly appreciated.

Thanks

-Mic

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