Re: Contacts

2014-07-09 Thread Esau Rodriguez
You need to import classes from models. Try from contacts.models import
Person (or any other class).

Regards,
Esau Rodriguez.
El 10/07/2014 06:44, "Lachlan Musicman"  escribió:

> Hola,
>
> So I need a contact app. I could write one myself, but there are a
> gazillion forks of something that seems quite comprehensive,
> django-contacts.
>
> This is the first time I've used a third party app that adds models to
> my project.
>
> I did (in a dev virtualenv) pip install django-contacts, added to the
> settings and have sync'd against the db.
>
> But there is no directory in my project folder - I can only presume
> that's because it's in /virtualenv/path/lib/python/somewhere
>
> How do I add contacts, without using the Admin interface?
>
> Should I instead just git clone from the django-contacts src/contacts
> folder into my project instead?
>
> cheers
> L.
>
>
>
> --
> The idea is that a beautiful image is frameable. Everything you need
> to see is there: It’s everything you want, and it’s very pleasing
> because there’s no extra information that you don’t get to see.
> Everything’s in a nice package for you. But sublime art is
> unframeable: It’s an image or idea that implies that there’s a bigger
> image or idea that you can’t see: You’re only getting to look at a
> fraction of it, and in that way it’s both beautiful and scary, because
> it’s reminding you that there’s more that you don’t have access to.
> It’s now sort of left the piece itself and it’s become your own
> invention, so it’s personal as well as being scary as well as being
> beautiful, which is what I really like about art like that.
>
> ---
> Adventure Time http://theholenearthecenteroftheworld.com/
>
> --
> 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/CAGBeqiPV6THzJasTdpdz4NkLsaVS5tvOEydSHh35TuPW_aUHxA%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB4Jw75apWqkzcns4SP8NVM2tij4-htLw7-EhbgJh9daw_Xsqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Contacts

2014-07-09 Thread Lachlan Musicman
Hola,

So I need a contact app. I could write one myself, but there are a
gazillion forks of something that seems quite comprehensive,
django-contacts.

This is the first time I've used a third party app that adds models to
my project.

I did (in a dev virtualenv) pip install django-contacts, added to the
settings and have sync'd against the db.

But there is no directory in my project folder - I can only presume
that's because it's in /virtualenv/path/lib/python/somewhere

How do I add contacts, without using the Admin interface?

Should I instead just git clone from the django-contacts src/contacts
folder into my project instead?

cheers
L.



-- 
The idea is that a beautiful image is frameable. Everything you need
to see is there: It’s everything you want, and it’s very pleasing
because there’s no extra information that you don’t get to see.
Everything’s in a nice package for you. But sublime art is
unframeable: It’s an image or idea that implies that there’s a bigger
image or idea that you can’t see: You’re only getting to look at a
fraction of it, and in that way it’s both beautiful and scary, because
it’s reminding you that there’s more that you don’t have access to.
It’s now sort of left the piece itself and it’s become your own
invention, so it’s personal as well as being scary as well as being
beautiful, which is what I really like about art like that.
---
Adventure Time http://theholenearthecenteroftheworld.com/

-- 
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/CAGBeqiPV6THzJasTdpdz4NkLsaVS5tvOEydSHh35TuPW_aUHxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: MultiValueDictKeyError in Django admin edit inline generic model

2014-07-09 Thread carlos
Hi, me again :) i forgot mention a use the latest release django 1.6.5 and
python 2.7.5

any help or tips?

thank.


On Wed, Jul 9, 2014 at 9:38 PM, carlos  wrote:

> Hi, i have this error when i edit the data, is similar error the next link
>
>
> http://stackoverflow.com/questions/19741314/multivaluedictkeyerror-in-django-admin
>
> but the only different is i use generic relation, this is my models.py
>
> class Photos(models.Model):
> name = models.CharField(max_length=150)
>  imagen = ImageField(upload_to='photos', blank=True, null=True)
>
> content_type = models.ForeignKey(ContentType)
>  object_id = models.PositiveIntegerField()
> content_object = generic.GenericForeignKey('content_type', 'object_id')
>
>
> def __unicode__(self):
> return self.name
>  class Meta:
> verbose_name_plural = "Photos"
>
> and here my other models.py use the model generic Photos
>
> class Portfolio(models.Model):
> service = models.CharField('Nombre del servicio', max_length=250)
> date = models.DateField()
> link = models.URLField(blank=True)
>
> photos = generic.GenericRelation(Photos)
>
> def __unicode__(self):
> return self.service
>
> and this my admin.py
>
> class PhotosAdminInline(generic.GenericTabularInline):
> model = Photos
> extra = 1
>
> class PortfolioAdmin(admin.ModelAdmin):
> inlines = [PhotosAdminInline]
>
> .
>
> when i save the portfolio the fist time only 1 pic or 2 or 3 etc NOT have
> error
> but when i need edit and add new photo i have this error
>
> MultiValueDictKeyError at /admin/portfolio/portfolio/6/
>
>
> "u'photos-photos-content_type-object_id-0-id'"
>
>
> maybe this is a bug in Django?
>
>
> Cheers
>
>

-- 
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/CAM-7rO2i4c40_DSOQAkm9zjP5C9GfGhSAjH2dEJxRYq58XPKqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


MultiValueDictKeyError in Django admin edit inline generic model

2014-07-09 Thread carlos
Hi, i have this error when i edit the data, is similar error the next link

http://stackoverflow.com/questions/19741314/multivaluedictkeyerror-in-django-admin

but the only different is i use generic relation, this is my models.py

class Photos(models.Model):
name = models.CharField(max_length=150)
 imagen = ImageField(upload_to='photos', blank=True, null=True)

content_type = models.ForeignKey(ContentType)
 object_id = models.PositiveIntegerField()
content_object = generic.GenericForeignKey('content_type', 'object_id')


def __unicode__(self):
return self.name
 class Meta:
verbose_name_plural = "Photos"

and here my other models.py use the model generic Photos

class Portfolio(models.Model):
service = models.CharField('Nombre del servicio', max_length=250)
date = models.DateField()
link = models.URLField(blank=True)

photos = generic.GenericRelation(Photos)

def __unicode__(self):
return self.service

and this my admin.py

class PhotosAdminInline(generic.GenericTabularInline):
model = Photos
extra = 1

class PortfolioAdmin(admin.ModelAdmin):
inlines = [PhotosAdminInline]

.

when i save the portfolio the fist time only 1 pic or 2 or 3 etc NOT have
error
but when i need edit and add new photo i have this error

MultiValueDictKeyError at /admin/portfolio/portfolio/6/


"u'photos-photos-content_type-object_id-0-id'"


maybe this is a bug in Django?


Cheers

-- 
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/CAM-7rO3TsZof_Q8Ri6rMg9S%3DcPYq%2BRnk1wujbCrfx3BJ8ubGyA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Help me: Django 1.6.4 + mod_wsgi Error

2014-07-09 Thread Russell Keith-Magee
Hi LongYuan,

It's difficult to say for certain, but it looks to me like your Django
install is corrupted. The error you're seeing indicates that an import is
failing; if you've got a clean install of Django 1.6.4 like you say, that
import should work without any problems.

Two things to try:

 * Start up a Python shell manually, using the same version of Python as
Apache is using. See if the import fails there as well.

 * Re-install Django. Make sure that you *completely* uninstall it first,
so there's no chance that stale files are lingering, and then reinstall.

Yours,
Russ Magee %-)


On Wed, Jul 9, 2014 at 3:01 PM, LongYuan  wrote:

> [Wed Jul 09 14:51:19 2014] [error]   File
> "C:\\Python27\\lib\\site-packages\\django\\utils\\encoding.py", line 14, in
> 
> [Wed Jul 09 14:51:19 2014] [error] from
> django.utils.six.moves.urllib.parse import quote
> [Wed Jul 09 14:51:19 2014] [error] ImportError: cannot import name quote
>
>
> The Apache2.2 service is restarting.
> The Apache2.2 service has restarted.
> arent: Received restart signal -- Restarting the server.
> [Wed Jul 09 09:51:47 2014] [notice] Child 12544: Exit event signaled.
> Child process is ending.
> [Wed Jul 09 09:51:47 2014] [warn] mod_wsgi: Compiled for Python/2.7.6.
> [Wed Jul 09 09:51:47 2014] [warn] mod_wsgi: Runtime using Python/2.7.3.
> [Wed Jul 09 09:51:47 2014] [notice] Apache/2.2.25 (Win32) mod_wsgi/3.5
> Python/2.7.3 configured -- resuming normal operations
> [Wed Jul 09 09:51:47 2014] [notice] Server built: Jul 10 2013 01:52:12
> [Wed Jul 09 09:51:47 2014] [notice] Parent: Created child process 7956
> [Wed Jul 09 09:51:47 2014] [warn] mod_wsgi: Compiled for Python/2.7.6.
> [Wed Jul 09 09:51:47 2014] [warn] mod_wsgi: Runtime using Python/2.7.3.
> [Wed Jul 09 09:51:47 2014] [notice] Child 7956: Child process is running
> [Wed Jul 09 09:51:48 2014] [notice] Child 12544: Released the start mutex
> [Wed Jul 09 09:51:48 2014] [notice] Child 7956: Acquired the start mutex.
> [Wed Jul 09 09:51:48 2014] [notice] Child 7956: Starting 64 worker threads.
> [Wed Jul 09 09:51:48 2014] [notice] Child 7956: Starting thread to listen
> on port 80.
> [Wed Jul 09 09:51:49 2014] [notice] Child 12544: All worker threads have
> exited.
> [Wed Jul 09 09:51:49 2014] [notice] Child 12544: Child process is exiting
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] mod_wsgi (pid=7956):
> Target WSGI script 'F:/dj_spiders/dj_spiders/wsgi.py' cannot be loaded as
> Python module.
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] mod_wsgi (pid=7956):
> Exception occurred processing WSGI script
> 'F:/dj_spiders/dj_spiders/wsgi.py'.
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] Traceback (most
> recent call last):
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1]   File
> "F:/dj_spiders/dj_spiders/wsgi.py", line 13, in 
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] from
> django.core.wsgi import get_wsgi_application
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1]   File
> "C:\\Python27\\lib\\site-packages\\django\\core\\wsgi.py", line 1, in
> 
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] from
> django.core.handlers.wsgi import WSGIHandler
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1]   File
> "C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\wsgi.py", line
> 9, in 
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] from django
> import http
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1]   File
> "C:\\Python27\\lib\\site-packages\\django\\http\\__init__.py", line 1, in
> 
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] from
> django.http.cookie import SimpleCookie, parse_cookie
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1]   File
> "C:\\Python27\\lib\\site-packages\\django\\http\\cookie.py", line 3, in
> 
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] from
> django.utils.encoding import force_str
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1]   File
> "C:\\Python27\\lib\\site-packages\\django\\utils\\encoding.py", line 11, in
> 
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] from
> django.utils.six.moves.urllib.parse import quote
> [Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] ImportError: cannot
> import name quote
>
> --
> 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/ef8729fc-2709-4606-8a09-9d9f7a06ded9%40googlegroups.com
> 
> .
> For more options, visit 

Re: nginx server not reflecting changes

2014-07-09 Thread Amar Kamthe
Yes tried that out but still not working. I am using python 2.7.2 and
django 1.4.1.
On Jul 9, 2014 5:59 PM, "Lachlan Musicman"  wrote:

> Have you tried pycclean?
>
>
> http://stackoverflow.com/questions/785519/how-do-i-remove-all-pyc-files-from-a-project
>
> ie: find . -name "*.pyc" -exec rm -rf {} \;
>
> then restart gnuicorn/nginx.
>
> cheers
> L.
>
> On 9 July 2014 22:20, Amar Kamthe  wrote:
> > Me too having the same issue.
> > I tried all the above things like reloading the nginx server and
> restarting
> > the gunicorn but the changes are not reflected.
> > Using command ps -aux | grep gunicorn. I found 1 gunicorn master and 3
> > worker threads running. I my case few of the files are reflecting but
> few of
> > them don't. Is it that there is an issue with the code files which is not
> > allowing to get loaded in nginx?. Also if I try using shell, it do shows
> the
> > changed code and all these thing works perfectly with apache and mod
> wsgi.
> > Can you help me in getting this issue resolved.
> >
> >
> > On Wednesday, January 15, 2014 11:55:16 PM UTC+5:30, Manu wrote:
> >>
> >> Please find some of my remarks below
> >>
> >> On Tuesday, 14 January 2014 19:04:19 UTC+5:30, sandy wrote:
> >>>
> >>>
> >>> On Sun, Jan 12, 2014 at 9:48 PM, Manu  wrote:
> >>> >
> >>> > Try to reload nginx.
> >>> >
> >>> >> sudo nginx -s reload
> >>> >
> >>> >
> >>> > or stop it and restart
> >>> >
> >>> >> sudo nginx -s stop
> >>> >> sudo nginx
> >>> >
> >>> These doesn't make any change.
> >>>
> >>> >
> >>> > if it's still not reflecting those changes, check which settings.py
> is
> >>> > being used by runserver and the gunicorn. Or, the problem could be
> that you
> >>> > have to restart gunicorn
> >>> >
> >>> >> sudo supervisorctl restart [gunicorn-program-name]
> >>> >
> >>>
> >>
> >> How are you so sure that the server is running? Can you try
> >>>
> >>> $ ps -aux | grep gunicorn
> >>
> >> What is it returning to you?
> >>
> >>>
> >>> When I use $ps -aux command to see which gunicorn program is running.
> It
> >>> shows no job running, but server is nicely configured and is running.
> I am
> >>> new to nginx and gunicorn deployment. Though deployment has been done
> but am
> >>> not able to understand why the changes are not visible and which
> program is
> >>> running which is behind the deployment.
> >>> Your help will be highly appreciated.
> >>> Thank you.
> >>>
> >>>
> >>> --
> >>> Sandeep Kaur
> >>> E-Mail: mkaur...@gmail.com
> >>> Blog: sandymadaan.wordpress.com
> >>>
> >>>
> >>>
> > --
> > 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/949ff45f-20be-47b2-8632-afa88ae3b98b%40googlegroups.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> The idea is that a beautiful image is frameable. Everything you need
> to see is there: It’s everything you want, and it’s very pleasing
> because there’s no extra information that you don’t get to see.
> Everything’s in a nice package for you. But sublime art is
> unframeable: It’s an image or idea that implies that there’s a bigger
> image or idea that you can’t see: You’re only getting to look at a
> fraction of it, and in that way it’s both beautiful and scary, because
> it’s reminding you that there’s more that you don’t have access to.
> It’s now sort of left the piece itself and it’s become your own
> invention, so it’s personal as well as being scary as well as being
> beautiful, which is what I really like about art like that.
>
> ---
> Adventure Time http://theholenearthecenteroftheworld.com/
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/XK6PA39t81U/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAGBeqiMMwxt%3D1jOD2kj540wKyghvbjDEXaJrbn413C0%2B9%2Bx%3DpA%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...@googl

Re: nginx server not reflecting changes

2014-07-09 Thread Sandeep kaur
On Wed, Jul 9, 2014 at 5:50 PM, Amar Kamthe  wrote:
>
> Me too having the same issue.
> I tried all the above things like reloading the nginx server and
restarting the gunicorn but the changes are not reflected.
> Using command ps -aux | grep gunicorn. I found 1 gunicorn master and 3
worker threads running. I my case few of the files are reflecting but few
of them don't. Is it that there is an issue with the code files which is
not allowing to get loaded in nginx?. Also if I try using shell, it do
shows the changed code and all these thing works perfectly with apache and
mod wsgi. Can you help me in getting this issue resolved.

Well my issue is resolved. All I do after making the changes is :

$ service supervisord reload
$ service nginx reload

-- 
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com

-- 
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/CAF66xG0fUUtjcEaJ%3DgUo%2BWydhBZDCtvmmYoTQRVBu9%2B0Fv9Rmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Fighting with sqlcustom

2014-07-09 Thread Malik Rumi


Background: I am new to Django and Python, having started on Windows this 
past December. Currently I am working in a Vagrant precise64 box, and 
wanted to import one of my old Windows apps which was done on sqlite3 to my 
current postgres. Once I got that done, Django told me I would need to run 
sqlcustom. So I did, and all I’ve been getting since is one error after 
another. 

The current error is:

django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, 
> but se
> ttings are not configured. You must either define the environment variable 
> DJANG
> O_SETTINGS_MODULE or call settings.configure() before accessing settings.

 I am working off Randall Degges’ django-skel with Django 1.5, so I have 
apps, settings, and requirements folders for prod, common, and dev. Prod is 
working fine on Heroku, where DJANGO SETTINGS MODULE is in the config vars.

Up until now, when I want to do something locally, I use 
–settings=mylocalsettings, which I got from the Two Scoops book and had 
been working fine, but not here. The sqlcustom command does not seem to 
accept or recognize this attempt to direct it to my local settings.

The error message tells me to either set DJANGO SETTINGS MODULE or 
configure(). I’ve never come across configure() before. Apparently it is 
different from –settings=mylocalsettings, but I can’t tell you how or why.

I don’t want to put DJANGO SETTINGS MODULE in my local environment because 
I don’t know what that would do to either my other projects or my Heroku 
settings. I am in a virtual environment, but does that isolate the 
environmental variables? Even if it does, what impact would this have on my 
Heroku settings for this project?

On the official docs, I found this either or message 
.
 
But the same document allows for the TwoScoops way, which it calls ‘manual’.

I tried django-admin.py but then I got this:

ImportError: Could not import settings 'fed1.settings.dev' (Is it on 
> sys.path?):
>  No module named fed1.settings.dev

 Note that now there is no database or settings module issue. The path is 
correct – *IF *django-admin.py is looking at the directory I am in. I have 
manage.py but not django-admin.py, which I assume is buried somewhere else 
in Django itself.

 

Why isn’t manual working?

Where do I put configure()? At the top of settings.dev? 

Why was manage.py runserver not giving me any errors?

What do I do to get this working?

Bonus: Why don't the instructions also tell me to syncdb or run a migration?

thx.

-- 
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/3884e06b-0b32-4591-8ec1-b88ef17bc039%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: web based application to monitor sybase ase database server

2014-07-09 Thread C. Kirby
A fine plan.
Do you have a question regarding django?

On Wednesday, July 9, 2014 1:20:48 AM UTC-5, anantha sharma wrote:
>
> Hi,
>
> I am planing to build web based application to monitor sybase ase database 
> server the details are given below.
>
>
> In this moment we are monitoring sybase ASE database server by shell 
> script(cron job) these data we are pushing to other database server what we 
> call is
> monitoring server.After business hrs we are gathering metrics for each 
> job/server cpu,disk i/o,memory, dbspace usages through some store 
> procedures 
> manually  now we are planing to build a platform like a web based dash 
> board so that the business owners can monitor their jobs/process load on 
> server,
> this will help them to enhance their procedures (like modification sp's) 
> in a single short.  pls find the link for better understand.
>
> https://docs.google.com/file/d/0B2p7nyd9Q8R2NGVoWDNrOTkzeUU/edit
>

-- 
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/6b48e100-ace9-4584-a1fb-f6d755778bca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is 1.7 RC1 supposed to support migrations changing user model? Not sure whether to report error as bug!

2014-07-09 Thread Michael Manfre
Report it. Migrations is a new feature and it is better to report any 
encountered issues now before it is released.

Regards,
Michael Manfre

On Wednesday, July 9, 2014 3:10:26 AM UTC-4, graeme wrote:
>
> Having read through the comments on this bug:
>
> https://code.djangoproject.com/ticket/22563
>
> I can see that migrations were not originally intended to support changing 
> AUTH_USER_MODEL 
> after the initial migration.
>
> However I am confused about whether it now should. The later comments and 
> the documentation imply that swappable models
> should work provided they have migrations.
>
> I got the same error as reported in the bug report, but the workaround was 
> simpler (manually add a dependency on the initial
> migration for the app containing my custom user model to the migration 
> that added a foreign key to it).
>
> Is this a bug that should be reported, or do we live with workarounds?
>

-- 
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/282129d7-1ff3-4522-a157-8d1f6730ee99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: MySQL-python on ubuntu?

2014-07-09 Thread Jorge Andrés Vergara Ebratt
The easiest way is through pip, install python-dev and then just do in your
terminal a:

pip install MySQL-Python


2014-07-09 7:57 GMT-05:00 François Schiettecatte :

> Hi
>
> I am installing django on Ubuntu and have a question about installing
> MySQL-python?
>
> I know I can get install it on CentOS/Fedora/Red Hat with this:
>
> yum -y install MySQL-python
>
> but I cant find the MySQL-python package on apt-get? Is it in there under
> a different name? I can find 'python-mysqldb' but not sure if it is the
> same?
>
> Any suggestions greatly appreciated.
>
> Thanks
>
> François
>
> --
> 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/08F54026-8F7B-4BA2-A805-2F5AA9F7D4CC%40gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Jorge Andres Vergara Ebratt*
*#SoftwareDeveloper (Or at least trying to be)*
*@javebratt*
*facebook.com/javebratt *

-- 
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/CAAeX05GCSBqof0E_PXh_%3DU-%3DNZWctP32qApVbuRawm0Y%2BBGxNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: MySQL-python on ubuntu?

2014-07-09 Thread Jonathan Querubina
Do

apt-get install python-dev
apt-get install libmysqlclient-dev

And then

apt-get install python-mysqldb



On Jul 9, 2014, at 9:57 AM, François Schiettecatte  
wrote:

> Hi
> 
> I am installing django on Ubuntu and have a question about installing 
> MySQL-python?
> 
> I know I can get install it on CentOS/Fedora/Red Hat with this:
> 
>   yum -y install MySQL-python
> 
> but I cant find the MySQL-python package on apt-get? Is it in there under a 
> different name? I can find 'python-mysqldb' but not sure if it is the same?
> 
> Any suggestions greatly appreciated.
> 
> Thanks
> 
> François
> 
> -- 
> 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/08F54026-8F7B-4BA2-A805-2F5AA9F7D4CC%40gmail.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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/AE561199-5610-43BF-9695-A4CD9AFCE404%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


MySQL-python on ubuntu?

2014-07-09 Thread François Schiettecatte
Hi

I am installing django on Ubuntu and have a question about installing 
MySQL-python?

I know I can get install it on CentOS/Fedora/Red Hat with this:

yum -y install MySQL-python

but I cant find the MySQL-python package on apt-get? Is it in there under a 
different name? I can find 'python-mysqldb' but not sure if it is the same?

Any suggestions greatly appreciated.

Thanks

François

-- 
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/08F54026-8F7B-4BA2-A805-2F5AA9F7D4CC%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: nginx server not reflecting changes

2014-07-09 Thread Lachlan Musicman
Have you tried pycclean?

http://stackoverflow.com/questions/785519/how-do-i-remove-all-pyc-files-from-a-project

ie: find . -name "*.pyc" -exec rm -rf {} \;

then restart gnuicorn/nginx.

cheers
L.

On 9 July 2014 22:20, Amar Kamthe  wrote:
> Me too having the same issue.
> I tried all the above things like reloading the nginx server and restarting
> the gunicorn but the changes are not reflected.
> Using command ps -aux | grep gunicorn. I found 1 gunicorn master and 3
> worker threads running. I my case few of the files are reflecting but few of
> them don't. Is it that there is an issue with the code files which is not
> allowing to get loaded in nginx?. Also if I try using shell, it do shows the
> changed code and all these thing works perfectly with apache and mod wsgi.
> Can you help me in getting this issue resolved.
>
>
> On Wednesday, January 15, 2014 11:55:16 PM UTC+5:30, Manu wrote:
>>
>> Please find some of my remarks below
>>
>> On Tuesday, 14 January 2014 19:04:19 UTC+5:30, sandy wrote:
>>>
>>>
>>> On Sun, Jan 12, 2014 at 9:48 PM, Manu  wrote:
>>> >
>>> > Try to reload nginx.
>>> >
>>> >> sudo nginx -s reload
>>> >
>>> >
>>> > or stop it and restart
>>> >
>>> >> sudo nginx -s stop
>>> >> sudo nginx
>>> >
>>> These doesn't make any change.
>>>
>>> >
>>> > if it's still not reflecting those changes, check which settings.py is
>>> > being used by runserver and the gunicorn. Or, the problem could be that 
>>> > you
>>> > have to restart gunicorn
>>> >
>>> >> sudo supervisorctl restart [gunicorn-program-name]
>>> >
>>>
>>
>> How are you so sure that the server is running? Can you try
>>>
>>> $ ps -aux | grep gunicorn
>>
>> What is it returning to you?
>>
>>>
>>> When I use $ps -aux command to see which gunicorn program is running. It
>>> shows no job running, but server is nicely configured and is running. I am
>>> new to nginx and gunicorn deployment. Though deployment has been done but am
>>> not able to understand why the changes are not visible and which program is
>>> running which is behind the deployment.
>>> Your help will be highly appreciated.
>>> Thank you.
>>>
>>>
>>> --
>>> Sandeep Kaur
>>> E-Mail: mkaur...@gmail.com
>>> Blog: sandymadaan.wordpress.com
>>>
>>>
>>>
> --
> 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/949ff45f-20be-47b2-8632-afa88ae3b98b%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
The idea is that a beautiful image is frameable. Everything you need
to see is there: It’s everything you want, and it’s very pleasing
because there’s no extra information that you don’t get to see.
Everything’s in a nice package for you. But sublime art is
unframeable: It’s an image or idea that implies that there’s a bigger
image or idea that you can’t see: You’re only getting to look at a
fraction of it, and in that way it’s both beautiful and scary, because
it’s reminding you that there’s more that you don’t have access to.
It’s now sort of left the piece itself and it’s become your own
invention, so it’s personal as well as being scary as well as being
beautiful, which is what I really like about art like that.
---
Adventure Time http://theholenearthecenteroftheworld.com/

-- 
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/CAGBeqiMMwxt%3D1jOD2kj540wKyghvbjDEXaJrbn413C0%2B9%2Bx%3DpA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: nginx server not reflecting changes

2014-07-09 Thread Amar Kamthe
Me too having the same issue.
I tried all the above things like reloading the nginx server and restarting 
the gunicorn but the changes are not reflected.
Using command ps -aux | grep gunicorn. I found 1 gunicorn master and 3 
worker threads running. I my case few of the files are reflecting but few 
of them don't. Is it that there is an issue with the code files which is 
not allowing to get loaded in nginx?. Also if I try using shell, it do 
shows the changed code and all these thing works perfectly with apache and 
mod wsgi. Can you help me in getting this issue resolved.


On Wednesday, January 15, 2014 11:55:16 PM UTC+5:30, Manu wrote:
>
> Please find some of my remarks below
>
> On Tuesday, 14 January 2014 19:04:19 UTC+5:30, sandy wrote:
>>
>>
>> On Sun, Jan 12, 2014 at 9:48 PM, Manu  wrote:
>> >
>> > Try to reload nginx. 
>> >
>> >> sudo nginx -s reload
>> >
>> >
>> > or stop it and restart
>> >
>> >> sudo nginx -s stop
>> >> sudo nginx
>> >
>> These doesn't make any change.
>>
>> >
>> > if it's still not reflecting those changes, check which settings.py is 
>> being used by runserver and the gunicorn. Or, the problem could be that you 
>> have to restart gunicorn
>> >
>> >> sudo supervisorctl restart [gunicorn-program-name]
>> >
>>
>>
> How are you so sure that the server is running? Can you try
>
>> $ ps -aux | grep gunicorn
>
> What is it returning to you? 
>  
>
>> When I use $ps -aux command to see which gunicorn program is running. It 
>> shows no job running, but server is nicely configured and is running. I am 
>> new to nginx and gunicorn deployment. Though deployment has been done but 
>> am not able to understand why the changes are not visible and which program 
>> is running which is behind the deployment.
>> Your help will be highly appreciated.
>> Thank you.
>>
>>
>> -- 
>> Sandeep Kaur
>> E-Mail: mkaur...@gmail.com
>> Blog: sandymadaan.wordpress.com
>>
>>
>>
>>  

-- 
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/949ff45f-20be-47b2-8632-afa88ae3b98b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Beginning with a feature flag system

2014-07-09 Thread Lee
Godjango has a short video on waffle. Might be enough to give you an idea on 
how to use it

https://godjango.com/31-django-waffle/

I've not watched it myself yet though

-- 
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/158c6b8b-1f75-4789-9b1d-09b365fbb31a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Help me: Django 1.6.4 + mod_wsgi Error

2014-07-09 Thread LongYuan
[Wed Jul 09 14:51:19 2014] [error]   File 
"C:\\Python27\\lib\\site-packages\\django\\utils\\encoding.py", line 14, in 

[Wed Jul 09 14:51:19 2014] [error] from 
django.utils.six.moves.urllib.parse import quote
[Wed Jul 09 14:51:19 2014] [error] ImportError: cannot import name quote


The Apache2.2 service is restarting.
The Apache2.2 service has restarted.
arent: Received restart signal -- Restarting the server.
[Wed Jul 09 09:51:47 2014] [notice] Child 12544: Exit event signaled. Child 
process is ending.
[Wed Jul 09 09:51:47 2014] [warn] mod_wsgi: Compiled for Python/2.7.6.
[Wed Jul 09 09:51:47 2014] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Wed Jul 09 09:51:47 2014] [notice] Apache/2.2.25 (Win32) mod_wsgi/3.5 
Python/2.7.3 configured -- resuming normal operations
[Wed Jul 09 09:51:47 2014] [notice] Server built: Jul 10 2013 01:52:12
[Wed Jul 09 09:51:47 2014] [notice] Parent: Created child process 7956
[Wed Jul 09 09:51:47 2014] [warn] mod_wsgi: Compiled for Python/2.7.6.
[Wed Jul 09 09:51:47 2014] [warn] mod_wsgi: Runtime using Python/2.7.3.
[Wed Jul 09 09:51:47 2014] [notice] Child 7956: Child process is running
[Wed Jul 09 09:51:48 2014] [notice] Child 12544: Released the start mutex
[Wed Jul 09 09:51:48 2014] [notice] Child 7956: Acquired the start mutex.
[Wed Jul 09 09:51:48 2014] [notice] Child 7956: Starting 64 worker threads.
[Wed Jul 09 09:51:48 2014] [notice] Child 7956: Starting thread to listen 
on port 80.
[Wed Jul 09 09:51:49 2014] [notice] Child 12544: All worker threads have 
exited.
[Wed Jul 09 09:51:49 2014] [notice] Child 12544: Child process is exiting
[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] mod_wsgi (pid=7956): 
Target WSGI script 'F:/dj_spiders/dj_spiders/wsgi.py' cannot be loaded as 
Python module.
[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] mod_wsgi (pid=7956): 
Exception occurred processing WSGI script 
'F:/dj_spiders/dj_spiders/wsgi.py'.
[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] Traceback (most 
recent call last):
[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1]   File 
"F:/dj_spiders/dj_spiders/wsgi.py", line 13, in 
[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] from 
django.core.wsgi import get_wsgi_application
[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1]   File 
"C:\\Python27\\lib\\site-packages\\django\\core\\wsgi.py", line 1, in 

[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] from 
django.core.handlers.wsgi import WSGIHandler
[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1]   File 
"C:\\Python27\\lib\\site-packages\\django\\core\\handlers\\wsgi.py", line 
9, in 
[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] from django 
import http
[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1]   File 
"C:\\Python27\\lib\\site-packages\\django\\http\\__init__.py", line 1, in 

[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] from 
django.http.cookie import SimpleCookie, parse_cookie
[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1]   File 
"C:\\Python27\\lib\\site-packages\\django\\http\\cookie.py", line 3, in 

[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] from 
django.utils.encoding import force_str
[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1]   File 
"C:\\Python27\\lib\\site-packages\\django\\utils\\encoding.py", line 11, in 

[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] from 
django.utils.six.moves.urllib.parse import quote
[Wed Jul 09 09:51:49 2014] [error] [client 127.0.0.1] ImportError: cannot 
import name quote

-- 
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/ef8729fc-2709-4606-8a09-9d9f7a06ded9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


web based application to monitor sybase ase database server

2014-07-09 Thread anantha sharma
Hi,

I am planing to build web based application to monitor sybase ase database 
server the details are given below.


In this moment we are monitoring sybase ASE database server by shell 
script(cron job) these data we are pushing to other database server what we 
call is
monitoring server.After business hrs we are gathering metrics for each 
job/server cpu,disk i/o,memory, dbspace usages through some store 
procedures 
manually  now we are planing to build a platform like a web based dash 
board so that the business owners can monitor their jobs/process load on 
server,
this will help them to enhance their procedures (like modification sp's) in 
a single short.  pls find the link for better understand.

https://docs.google.com/file/d/0B2p7nyd9Q8R2NGVoWDNrOTkzeUU/edit

-- 
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/d1fc15f9-5de4-4dbf-b485-bd1dece9f0ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to filter objects by values of foreign objects in Django admin

2014-07-09 Thread Derek
There is not really enough information about your use case (which is maybe 
why people seem to be misunderstanding your question).  

Its not really clear to me what you mean by "pass a parameter", as you have 
not given any indication where or how this parameter needs to be set.  

One way I have used to "subset" model lists in the admin is to use proxy 
models with model managers.  You could define a filter in a new model 
manager that automatically filters transactions, for example, from the last 
7 days.  The proxy model (for example, LastWeekTransaction) can use this 
model manager to always show a list of the most recent Transactions.

If you actually want to run interactive queries, with users entering in 
their own date ranges, then you'll need to move beyond the admin app (e.g. 
by creating a new custome 'query' app), as its purpose is essentially for 
CRUD, and not for reporting.

On Monday, 7 July 2014 15:10:04 UTC+2, 9dev...@gmail.com wrote:
>
> No, it does not. I cannot pass any parameters to this function, because it 
> is being invoked automatically by the admin.
>
> class MyAdmin(admin.ModelAdmin):
> list_display = ['num_of_trans']
>
> How can I pass any arguments to it?
>
> Please, read my question carefully.
>

-- 
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/5860bc89-01f1-40e2-ac20-4c74d5f83be1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Is 1.7 RC1 supposed to support migrations changing user model? Not sure whether to report error as bug!

2014-07-09 Thread graeme
Having read through the comments on this bug:

https://code.djangoproject.com/ticket/22563

I can see that migrations were not originally intended to support changing 
AUTH_USER_MODEL 
after the initial migration.

However I am confused about whether it now should. The later comments and 
the documentation imply that swappable models
should work provided they have migrations.

I got the same error as reported in the bug report, but the workaround was 
simpler (manually add a dependency on the initial
migration for the app containing my custom user model to the migration that 
added a foreign key to it).

Is this a bug that should be reported, or do we live with workarounds?

-- 
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/87095083-4d2f-4f87-a55c-d98ad083030d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.