Re: Looking for IDE + FTP

2011-02-08 Thread broz
I've been curious about workflow with Django sites (or other
frameworks for that matter). I LOVE being able to remote edit. I can
see where this request is coming from. If I want to edit a file on the
server, I just open it up on my local machine, edit, and save. The
SFTP transfer all happens behind the scenes. This is very efficient.
There are no risks. I am editing a test instance. I do use version
control, but that's not what this is about.

In order to work on my code locally, I need to have a system set up
locally that mimics the remote system. So, I need to have a running
database, and a web server, and some other pieces and parts. My local
instance will not match the remote instance, ever. The remote uses
virtual hosts, the local one does not. The remote is an older version
of apache. The remote uses Oracle. Perhaps I could set my local system
up with old apache, and old Oracle. The remote server is remote, so
there's performance issues to consider.

I can set something up locally, fiddle, fuss, make it work, and then
ship the changes to the server. Whoa, it doesn't work on the server,
because my local system is just not the same.

This is why I want to remote edit my files. I want to test on a test
instance on the same server that will run the production version when
I'm done. And that's what I do with BBEdit.

BBEdit does remote editing very very well. It's not an IDE.

With BBEdit, I open the file, edit, test, edit, test.

PyCharm is a great IDE, but it doesn't remote edit. I download, I open
the file, I edit, save, upload, test, edit, save, upload, test, edit,
save, upload, test. Pydev works this way too. Wingware, I donno.
Komodo? I donno.

I would welcome enthusiastically, some recommendations on workflow,
given the constraints of the IDEs we have. There are lots of people
out there smarter than me.

Thanks for bringing up this topic!

Broz

On Feb 8, 8:32 pm, Łukasz Rekucki  wrote:
> On 9 February 2011 02:03, Karen McNeil  wrote:
>
> > So... that's a no, then?
>
> > I mean, about the question I asked.  You know, the "is there an IDE +
> > FTP program" question?
>
> Quotinghttp://www.aptana.org/products/studio2:
>
> File Transfer & Synchronization
> Support for one-shot as well as keep-synchronized setups. Multiple
> protocols including FTP, SFTP and FTPS. Ability to automatically
> publish your application to selected ISPs and hosting services.
>
> >    - I *do* do a very simple kind of version control, where I save a
> > numbered copy of the major site files
> >      whenever I've made changes and I've got a stable, working site.
> > I've looked into Subversion and Git and,
> >      believe me, they would be way overkill for my little projects.
>
> Version control is never an overkill, if the setup is so simple (like
> in Git or Mercurial - that git init doesn't really cost you anything).
> Plus it solves 3 major problems:
>
> 1) Keeping history for your own sanity. Too many times I seen people
> go crazy over code that "suddenly stoped working even if I revert the
> change".
>
> 2) Backups - pushing your code to remote sites like Bitbucket or
> Github is a great way, to make sure you don't lose or your work.
>
> 3) Deployment - Instead of uploading stuff via FTP, you can just push
> your changes to the site. This wil proably require some more knowledge
> about VCS, but it will save lots of time.
>
> --
> Łukasz Rekucki

-- 
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: fcgi, runfastcgi, parameters, docs [noob question]

2010-12-23 Thread broz
Both answers are VERY helpful, and point out how unhelpful my original
question was stated.

Karen, I admit to being a knucklehead. Thanks for reminding me :-)

Shamail Tayyab, I'm not running via command line, using manage.py.
I've created my own script, following instructions found in the docs
provided with the source:
file:///work/django-trunk/docs/_build/html/howto/deployment/fastcgi.html

So, running from the command line, I get essentially the same error I
get when running via http.

Here's a snippet of my code. I was walking thru with the debugger, but
it was not helpful, yet. I'll put some breakpoints inside fastcgi.py,
perhaps.
try:
socketPath = basePath + "/djgosite2/mysite2.sock"
errLogFilePath = basePath + "/djgosite2/mysite2.err"
# pdb.set_trace()
runfastcgi(method ="threaded", protocol ="fcgi", daemonize =
"false", socket = socketPath, errlog = errLogFilePath, debug = True)
djLogger.debug("right after calling runfastcgi (in try block)")
except Exception as excpt:
djLogger.debug("Exception raised because of something...")
djLogger.debug(excpt)
except:
djLogger.debug("unexpected error")
djLogger.debug( sys.exc_info()[0])
print "Unexpected error:", sys.exc_info()[0]

Here's the error:
Unexpected error: 

I think I need to call the hosting service to see if they can send me
their error logs. I can only look at access logs. My own logger might
be helpful if I add some logging to fastcgi.py.

In any case, THANKS VERY MUCH for the help!


On Dec 23, 12:55 am, Shamail Tayyab  wrote:
> You may want to try running your fastcgi daemon via command line,
>
> This is the exact command that I am using at production:
> python manage.py runfcgi daemonize=false method=threaded
> host=127.0.0.1 port=9001
>
> Tx
>
> --
> Shamail Tayyab
> Blog:http://shamail.in/blog
>
> On Dec 22, 6:52 pm, Richard Brosnahan  wrote:
>
>
>
> > Hi all,
>
> > I'm new to django but not new to Python. My goal is to build a web site 
> > using django, replacing an old, tired php framework.
>
> > The django 1.2.3 tutorials were fine. I got the basics of my site working 
> > locally, after going thru the entire tutorial. Before going any further, I 
> > wanted to see if I could get that same basic tutorial site going on my 
> > 1and1 host. If I can't, I may have to go with drupal.
>
> > The django 1and1 site is a no go.
>
> > I've installed my own Python 2.7.1, since the default version on 1and1 is 
> > extremely old.
>
> > 1and1 does provide fcgi, by default. Indeed, my .htaccess file and 
> > mysite.fcgi work to a point. The script is using my version of python. The 
> > .fcgi script runs until I get to the line where I try to execute runfastcgi.
>
> > from django.core.servers.fastcgi import runfastcgi
> > runfastcgi(method="threaded", daemonize="false")
>
> > I'm using the docs provided with the svn version of django. In particular, 
> > this page:
> > file:///work/django-trunk/docs/_build/html/howto/deployment/fastcgi.html
>
> > These docs are those issued with the version of django I'm using, and 
> > that's up to date as of yesterday (via svn checkout).
>
> > What's the problem?
>
> > I get an error saying "method" is not defined, and "daemonize" is not 
> > defined. Further, those parameters don't match the method in the source:
>
> > fastcgi.py:89:
> > def runfastcgi(argset=[], **kwargs):
>
> > So, I'm trying to pass (method="threaded", daemonize="false") to a method 
> > which expects (argset=[], **kwargs). No wonder it 'splodes.
>
> > Can anyone direct me to a way to get this to work? What am I missing?
>
> > Thanks in advance
>
> > --
> > Richard Brosnahan

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.