Tag Info

Hot answers tagged

39

First learn Python well Here are some online resources for learning Python The Python Tutorial Wiki-Book Byte of Python Building Skills in Python Version 2.5 Python Free Online Ebooks Python Bibliotheca Think Python Data Structures and Algorithms in Python How to Think Like a Computer Scientist: Learning with Python Python for Fun Invent Your Own ...


29

How about making a cronjob, assuming you have shell access? The cron daemon exists on virtually any UNIX-like system and schedules commands to run based on a description in a file called the crontab. Each line of the file contains a set of fields to indicate the timepoints when a command shall be executed. Your task could be either a standalone program ...


18

With Django on AWS, I'd look into Celery. Celery adds asynchronous tasks and includes a scheduler, and on AWS you can configure Celery to use the Amazon Simple Queue Service as the broker (see Celery with Amazon SQS on Stack Overflow and this blog post on the subject). You set up a Celery periodic task schedule and it'll run a configured task according to ...


15

Disclaimer This answer does not say which language is better, its sole purpose is to show Python code for things you said you needed from Django and tries to prove that in Python, as contrary to some other languages, you do not need frameworks to perform needed actions. Python's "batteries included" vs. PHP In PHP you often need a framework or separate ...


15

I'm the author of the blog post in question. To clarify, what was meant was not that you shouldn't use the same directory to "serve files to GitHub", but rather you shouldn't do development in the same directory that your web server serves your content from. Hope that clears things up.


14

Avoid any string that looks like spam. Most Spam checking these days is Bayesian, which means that that your message is checked using a fuzzy algorithm that tries to guess if resembles known Spam or Ham (good) messages (mainly by checking the frequency of common spam words and phrases). Send individual messages to each recipient instead of ...


13

How can I convince him that Python is a better choice? You can't. All of your boss's complaints are trivial matters of personal preference. He loves his curly braces. Python uses significant whitespace, which not everyone agrees with. However this is personal preference. You can show that everyone does indentation correctly. You can find people ...


11

Python is about as easy to learn as a language could be, which is one of the main selling points of the language. As someone that is very experienced in OO languages, you are in a great position to start. The only fundamental differences between Python and Java/C# are Duck-typing / lack of type safety. First class functions. I understand why you feel ...


10

Yes, the Django forms is a mess from the MVC perspective, suppose you are working in a big MMO super-hero game and you are creating the Hero model: class Hero(models.Model): can_fly = models.BooleanField(default=False) has_laser = models.BooleanField(default=False) has_shark_repellent = models.BooleanField(default=False) Now you are asked to ...


9

I don't know Django, but do know IntraWeb. You indicate you want to create a kind of data-entry application. For that IntraWeb is suited as it is meant for writing web applications, not for web-sites, and it uses the same concept as a regular Delphi VCL application: a form designer, with a Delphi unit underneath that has the code. So if you know how to ...


9

ORM Pro Usable on different DBMS without code customization. Pro Makes code/DB integration easier. Pro Additional type checking from ORM/table definitions. Pro Facilitate db migrations. Pro Essentially a DSL for DB integration. Con Additional component to understand (you should understand how the ORM will create the SQL) Con Any SQL customizations ...


8

Windows is a second class citizen in most open source communities because it treats them as second class citizens. Development and sysadmin on Windows is unnecessarily painful, especially for people who are used to Unix-based systems. That said, Python on Windows works very well and Django doesn't do anything particularly abnormal so I don't see why you ...


7

As an embedded C programmer who ended up working on a Python/Django web app as a skunk-works project I can testify that the basics are easy to pick up. Python generally is very straightforward to get to grips with. I've personally not found the python documentation itself very useful - it always seems more like an aide memoir for someone who already knows ...


7

If Web development in python is what you are looking for, then after a thorough understanding of python , I suggest that you have a look at Flask. Django and other full stack frameworks would definitely make your life much much easier but overall would leave you with an incomplete feeling as if you have not learnt much. Flask IMHO , is the most awesome ...


7

Python has a built-in mechanism for that: docstrings. Example: >>> import django.forms >>> help(django.forms.ModelForm) Help on class ModelForm in module django.forms.models: class ModelForm(BaseModelForm) | Method resolution order: | ModelForm | BaseModelForm | django.forms.forms.BaseForm | ...


7

It is a good idea to work through the official Django tutorials at djangoproject.com. These are written by some of the core developers and raise important issues regarding Python/Django/DB versions and syntax evolution. But, yes, the Polls app created in the process is rudimentary, so here are my recommendations to useful Django tutorials which involve app ...


7

I've only skimmed the requirements, but I'd be thinking something simple like this: Give each task a letter. Generate a task sequence string (eg, EBDFA) for a user. Look at the first letter to decide what task to do next. Carry out that task. Strip the first letter off, pass the rest in the URL. Go to step 3. Keep it simple. Don't create models you ...


6

When asked Can you provide a link or a quote that specifically confuses you? – S.Lott you answered databases, views, and all those stuff... I only started playing with frameworks after I had done a fair amount of development without a framework. I can grok what the framework is doing for me because I know that "view" refers to something in the ...


6

Don't take this too seriously, but ... create file name app.py with the following content: from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == "__main__": app.run() assuming you have pip (python package installer) installed do the following: $ pip install Flask $ python app.py * ...


6

I think you're looking for the SQL ANSI standard. This standard is implemented in most RDBMS for the biggest part. However, every RDBMS decided to do some things their way. (Simply because the standard didn't have the feature or another reason. LIMIT has an equivalent since SQL:2008 only for example.) Listing these differences from the SQL standard would ...


6

Since your AWS instance runs Linux, you can probably accomplish this as a cron job. You could take what I would term Drupal's cron approach which, in the case of Django, involves creating a controller to respond to a URL and then perform the action you want. You then configure a cron task to curl the controller's URL, triggering your script. This has the ...


5

Definitely finish your masters, it will give you a one up on any application. Look for small side projects to learn until you are done with school. Lots of small business owners like to hire students for cheap web development. Keep at it, you'll be surprised how.much you can learn in one year. Edit: Depending on how competitive the job is your applying ...


5

I may be incorrect but I've been using django for over a year now and never found such a guide. Slightly unfortunate - I would like to have a function reference like you mentioned. However, as an additional resource the http://www.djangobook.com/ is very good. I've always considered building one, but I'm very lazy. There is also another reference you may ...


5

Depends what you call 'good'. However, while you can use django with no database, the object-relational mapper is pretty much its first and foremost advertised feature. Django was designed to produce database-backed web sites, so if you're not going to use a database you might end up dealing with a bunch of unnecessary hassle.


5

Although there is nothing stopping you from not using a DB in Django, my advice would be: "If you don't need a full stack framework, don't use a full stack framework". Python has many excellent microframeworks that might suit your needs better. This blog post discusses some of them: http://www.konstruktor.ee/blog/python-web-framework-roundup My personal ...


5

The Django docs never mentioned that a person who doesn't know what HTML/JS/CSS is about can use it. Separation of concerns is done also in the backend, where the actual action(the views) are separated from the database layer or the URL-routing logic - That allows for loose-coupling. It never means you can write views without ever understanding your models. ...


4

The Python/Django paradigm is certainly different to .NET or Java stacks. If you're comfortable with several programming paradigms (and by this I mean functional vs OO and static vs dynamic) then you'll probably be able to pull this off. As per @EricWilson, Python isn't too difficult to learn (just be prepared to go ballistic about the indentation == scope ...


4

professional advice for me on how I can better manage what I'm doing so that I get this project off on the right foot. just a combination of standard organization tools (keeping a routine, good folder structure, extensive documentation) and making sure you think about each step before you move on. More important than organization tools is this secret. ...


4

You're mixing the whole stack, there are several layers involved: a Django Model defines the data structure. a Django Form is a shortcut to define HTML forms, field validations and Python/HTML value translations. It's not strictly needed, but often handy. a Django ModelForm is another shortcut, in short a Form subclass that gets its fields from a Model ...


4

There is a quote which says: “Tell me and I'll forget; show me and I may remember; involve me and I'll understand.” So, the only way to learn is by doing. Maybe you can knock out a basic app in a week, but why stop there? Go on to improve it feature by feature. Think up of something and implement it. That's the only way you will learn. For a ...



Only top voted, non community-wiki answers of a minimum length are eligible