Is there a way to see manage.py sql output of "managed=False" models?

2013-04-02 Thread Serdar Dalgic
Hi; In my project, we are using django 1.3.2, and we're on the verge of migrating to 1.4. I wrote a standalone app, in which I've created some models with class Meta: managed = False setting in every model class. (The reason why I did like this is, I prefer to use a different DB than

Re: Is there a way to see manage.py sql output of "managed=False" models?

2013-04-02 Thread Serdar Dalgic
On Tue, Apr 2, 2013 at 11:48 PM, Bill Freeman wrote: > Perhaps take the site down (or clone it), set managed = True, ask manage.py > for sql for that app, and put everything back? > Sure, that's a way to do it. But I'm looking for a practical way to do it. Otherwise, commenting out the managed=Tr

Re: Is there a way to see manage.py sql output of "managed=False" models?

2013-04-02 Thread Serdar Dalgic
On Wed, Apr 3, 2013 at 12:02 AM, Bill Freeman wrote: > > Yes. I must confess that I like your solution better. But some folks are > loth to edit the stuff that isn't their code. > Thanks. Yeah, there is such behavior among folks. > Maybe create a patch adding a command line flag that says you

Re: How to rename objects (Urgent)

2013-04-08 Thread Serdar Dalgic
On Mon, Apr 8, 2013 at 7:26 PM, Giorgos Kontogiorgakis wrote: > Hi there guys!I have an answer about renaming objects on my webinterface.For > example i have a table named "Map" and i have many obejcts in there(Map > object,Map object,Map object,Map object,Map object,Map object) How is it > possib

Re: How to rename objects (Urgent)

2013-04-09 Thread Serdar Dalgic
On Tue, Apr 9, 2013 at 1:23 AM, Giorgos Kontogiorgakis wrote: > Hi Serdar! > Hi! > > class Links(models.Model): > interfacein = models.CharField(max_length=20L, db_column='InterfaceIn') > interfaceout = models.CharField(max_length=20L, > db_column='InterfaceOut') > capacity = models.

Re: Suddenly manage.py syncdb fails with 'no such table django_session'

2013-04-09 Thread Serdar Dalgic
On Thu, Apr 4, 2013 at 10:24 PM, Thomas Weholt wrote: > I haven't changed settings.py since my last successful run. I've also > googled the problem (and it seem to pop up once in a while), but none of the > solutions provided solved the problem. I've also made the path to the > databasefile absolu

Re: PostgreSQL on windows 7 (psycopg2 install problem)

2013-04-14 Thread Serdar Dalgic
On Sun, Apr 14, 2013 at 5:45 PM, Mustafa Tulu wrote: > Hi All, Hi; > > When I try to install the package into my virtualenv in pycharm, it tries to > compile the source into binaries, it fails at linking stage, giving errors > like: > Creating library build\temp.win32-2.7\Release\psycopg\_psyco

Re: django-social-auth problem with facebook

2013-04-15 Thread Serdar Dalgic
Hi, On Mon, Apr 15, 2013 at 9:01 AM, Jeff Hsu wrote: > Hi, I just pip installed django-social-auth from omab today on > github(beginner here). I think I can almost get it to work with facebook > login, but I always have this "InternalError: Exception Value: current > transaction is aborted, com

Re: Guidance

2013-04-16 Thread Serdar Dalgic
On Tue, Apr 16, 2013 at 3:32 PM, Kishan Mehta wrote: > Hi, I am new to django. while learning from django book i came across > request.POST.get() > request.GET() > > etc methods. > > anyone can tell a where i can read more about this methods. > Take a look at this documentation https://docs.djang

Re: Feed uploaded file into process

2013-05-13 Thread Serdar Dalgic
Hallo Torsten, I'm just brainstorming about the situation, I think the best solution would be some kind of Javascript functions in the frontend part, before implementing a file upload. You can tar the file in a temporary directory, an upload that temp file with the real file's name.tar.gz I'm not

Re: Feed uploaded file into process

2013-05-13 Thread Serdar Dalgic
On Mon, May 13, 2013 at 1:56 PM, Torsten Bronger < bron...@physik.rwth-aachen.de> wrote: > > The data is supposed to be sent as one big compressed file und > uncompressed on the web server. The tar'ing is done by the > uploading person, before using the browser. Then, it is sent > through the In

Re: new field in models

2013-07-23 Thread Serdar Dalgic
On Mon, Jul 22, 2013 at 10:53 AM, Harjot Mann wrote: > In django when we add a new field in existing class, we need to drop > the table and then run the syncdb again. Is there any alternative for > it so that we can add the field without dropping the table?? > You can also run sqldiff django comm

Re: ImportError failure

2014-10-22 Thread Serdar Dalgic
Hi Juan, I believe you might have a problem while importing "example". Can you check the line you're importing example and where did you put this "exsite.example" module? Your directory structure should be like this: mysite/ manage.py mysite/ __init__.py settings.py

Re: Database operators for custom fields

2014-02-19 Thread Serdar Dalgic
Hi! In python, '==' operator is set to '__eq__' and '!=' operator is set to '__ne__' functions. See more details in http://jcalderone.livejournal.com/32837.html And In order to make queries from the ORM, Django uses Managers https://docs.djangoproject.com/en/dev/topics/db/managers/ So you can w

Re: Write django log to different.

2015-11-09 Thread Serdar Dalgic
Instead of solving this problem on django side, I'd recommend using a tool such as logrotate for this problem http://www.rackspace.com/knowledge_center/article/understanding-logrotate-utility You can customise it to your needs, daily, weekly or per size basis. One problem with solving it on djan