Tagged Questions

a Python web framework

learn more… | top users | synonyms

0
votes
0answers
10 views

Django Project with Multiple Apps on Heroku

A newbie question: I've been able to deploy a few simple Django apps on Heroku very easily. However, now I am tackling a much larger project that consists of several apps (all Django and all with ...
1
vote
2answers
24 views

How to handle configuration of Python modules, especially when used standalone and in frameworks like Django

I am trying to package a Python module for pip, following the guide here. One area I would like feedback on is best practices or convention for making my module configurable. The module is a library ...
0
votes
1answer
24 views

How to implement a RESTful API that updates a list which might have exclusion and addition of related resources?

We have an application where there is an API to create a document with a POST and update it with a PUT. There is a separate API to share document with users. Now, How should we approach updating the ...
-2
votes
1answer
95 views

Using a REST API for both mobile and web [closed]

I've always only used REST to build web services for mobile apps, for example i use Django to build the website using templates, and build a REST API using django framework, but would it be a good ...
-4
votes
1answer
47 views

Languages for gaming website [closed]

So I'm a 15 year old trying to teach myself how to code because I'm deeply interested in it. I would like to one day be able to have my own games website, with little games I'd write. I have a little ...
1
vote
2answers
125 views

Architecture to handle service concurrency on resources exposed via REST API [closed]

REST API frameworks like Python Eve handle concurrency control via an entity tag. This ensures that several clients which loaded the same resource will not overwrite the changes of each other, because ...
0
votes
1answer
57 views

Sessions in cloud applications dangerous?

We have a django app hosted on heroku. I had a situation: A user entered an email in a form on page1. If the email existed in the database he was redirected to Login page otherwise to register ...
0
votes
1answer
49 views

Repurpose MySQL as a mutex

My application needs to perform an operation once every 10 minutes, but that operation is triggered many times more frequently. Occasionally it is triggered three or four times a second in different ...
4
votes
2answers
364 views

How to layer if statements when order of logic is irrelevant?

Basically I have a series of logic in my website that can lead to 5 total outcomes. Basically two different if tests and then a catch all else statement. For example: if cond1: if mod1: ...
1
vote
1answer
49 views

What is the Controller in Django MVC?

Learning Django MVC and the way I thought of it is: Models are the database tables represented in Django as Python classes. Views are the HTML returned from function in views.py. Controllers are the ...
2
votes
2answers
68 views

Django CBVs vs FBVs

For creating a large Django project with many apps, my first initial thought was to used Class Based Views (as the Django tutorials seem to emphasize). However, I noticed that due to a lot of the ...
0
votes
1answer
308 views

Javascript function should call python logic in django web development without additional triiger

I have been trying to solve this problem for sometime now. This is regarding django web development. I have an HTML page which has a Javascript function to upload an image file from the users local ...
0
votes
1answer
68 views

Outsourcing functionality from Django view to C/C++

I'm developing a Django project that basically boils down to: A user submits a form. The Django view parses the form and compiles a representation of that form which is readable by some other ...
3
votes
2answers
304 views

where exactly should python business logic be placed in django

I have just begun to learn Django/Python/Web Development. This problem has been troubling me for a while now. I am creating an application with multiple templates in Django. I have a views.py which ...
0
votes
0answers
26 views

Add arguments to mysql in Django's “dbshell”

I'd like to add a couple of command-line arguments to my Django's ./manage.py dbshell command, and I can't figure out how. In specific I'd like to add -A to prevent MySQL from scanning every table ...
1
vote
2answers
157 views

Is it ok to start with templates in MVC development?

I'm new to web development and I've started working on a project in my company that uses DJANGO. I feel it flexible to start my development straight first from the templates. I think it will be easier ...
0
votes
0answers
53 views

Rewriting/decoupling important service of the Django website in Erlang

We have application written entirely in Django, which consist of three separate components. Admin, Service for generating invoices + API and UI for users. Problem is, that they are very tightly ...
3
votes
3answers
86 views

Should custom data elements be stored as XML or database entries?

There are a ton of questions like this, but they are mostly very generalized, so I'd like to get some views on my specific usage. General: I'm building a new project on my own in Django. It's focus ...
0
votes
1answer
215 views

Storing primary keys of objects in Redis and then querying them in Postgres through Django

This is probably my second time posting in programmers. I'm usually on stackoverflow but this question is more fit for the community here. All suggestions, advice and insight on this matter is ...
1
vote
1answer
175 views

How do you handle domain logic that spans multiple model objects in an ORM?

So I know that business logic should be placed in the model. But using an ORM it is not as clear where I should place code that handles multiple objects. E.g. let's say we have a Customer model which ...
30
votes
4answers
5k views

Is backing up a MySQL database in Git a good idea?

I am trying to improve the backup situation for my application. I have a Django application and MySQL database. I read an article suggesting backing up the database in Git. On the one hand I like ...
9
votes
3answers
260 views

Storing editable site content?

We have a Django-based website for which we wanted to make some of the content (text, and business logic such as pricing plans) easily editable in-house, and so we decided to store it outside the ...
3
votes
3answers
170 views

Unit Testing: How much more code? [duplicate]

I'm fairly new to unit testing. In school it's always been, "hey it works, onward!" But I've started to write professionally, and even at work that's been basically the mantra. However, I've started ...
1
vote
0answers
32 views

Using Django to Create Child Sites

I am creating a series of small sites, I'm using the django framework. The theory goes a user comes to a master site, signs up, then he gets his own child site. Example: navigate to example.com ...
1
vote
1answer
121 views

How to secure a Django application's source code? [duplicate]

I have developed a Django application for a company. Now I am about to ship it to my customer. After reading through online articles and books, I understood that securing the source code of any web ...
3
votes
2answers
1k views

Decoupling Server and Client using REST API

I was thinking about how I can decouple a web-application completely into a server-side and a client-side component. I want to decouple the app to the extent that I can host both components on ...
2
votes
2answers
544 views

Front-end structure of large scale Django project

Few days ago, I started to work in new company. Before me, all front-end and backend code was written by one man (oh my...). As you know, Django app contains two main directories for front-end: ...
0
votes
0answers
287 views

Django web app with websockets

I want to make a web service using Django, but that also has websocket functionality. Having done a bit of reading, this is the tech stack that I'm looking at: --------------------------------- ...
0
votes
2answers
275 views

How can I convince my client that the task was complex and the time I took is fair?

I am the single programmer working on a website handling both frontend and backend. Recently in my task list I have to provide a social news feed (activities among friends) which should summarize ...
0
votes
0answers
159 views

Extending user registration in Django site that uses both site admin tables and my own module?

I'm writing a Django site that registers a particular type of user and this is done by the resources that come with the framework, the site administration. The issue: I'd like to create a new model ...
1
vote
2answers
279 views

Using a web framework as python GUI

If I built some useful piece of python code to e.g. scrape a website or to calculate something big, at some point I might want to add a GUI to my project. For this I could use Tk, Qt, Pygame or any ...
3
votes
1answer
1k views

Database design/relationship for threading messages

What's the database design or business logic for creating an app for messaging between users? I am having difficulties with choosing how to approach the relationship between each Conversation of User ...
0
votes
2answers
278 views

What could be the Model Layer when consuming Web-Services and no Database in Django?

I'm using Django as an application framework and it only needs to consume web services (no need to have traditional Django Models and the related ORM). In this case, since Django is a variant on the ...
2
votes
3answers
2k views

REST API at backend and MVC Javascript framework at client side

I am building an online social network. I have finished writing RESTful API service using Django. This will return only JSON response (No HTML will be generated from server side) so that this JSON ...
1
vote
1answer
204 views

Merge two different API calls into One

I have two different apps in my django project. One is "comment" and an other one is "files". A comment might save some file attached to it. The current way of creating a comment with attachments is ...
1
vote
2answers
1k views

Django REST + Backbone/Ember/Angular Implementation Method

http://stackoverflow.com/questions/10941249/separate-rest-json-api-server-and-client In light of this post, I wanted to ask questions regarding Django and specifically the implementation methods of ...
1
vote
1answer
250 views

Architecture design for a web application that runs SSH connections to remote servers

This is a followup to my question here. I have to make a web GUI for a library that manages remote clusters via SSH. The main point is that this library spawns threads and subprocesses (Popen) ...
4
votes
3answers
458 views

Multiple sites with the same codebase in Python

I am trying to run a large amount of sites which share about 90% of their code. They are simply designed to query an API and return the results. They will have a common userbase / database but will be ...
1
vote
1answer
149 views

Best practices when dealing with lots of empty table columns?

I have a schema that allows for multiple post types in my Django project (kinda like Tumblr). Users can make Posts of different types. One of those types is a photo, which I'll want the EXIF data for. ...
4
votes
1answer
462 views

Web app outgrowing current framework

I have quite a bit of experience with using Django for websites and so when I started a new project I naturally chose to use Django for it. Everything went well for a time but now the application is ...
1
vote
2answers
168 views

Should model / table names be as generic as possible?

When naming a model, should the name be as generic as possible-- even if that won't be the name displayed to users? For example let's imagine a Django model for liking another user's posts. Does it ...
0
votes
4answers
268 views

Do I need a database to implement AJAX functionality for my app?

I am new to the construction and design of a web app so I'd like some advice please (Django is my framework). I'm trying to code up a "how-to" website instructing users the step-by-step process for ...
0
votes
2answers
577 views

How my website should use its own API?

Im building small web-service which will provide my users with data through API. Also, some data will be available right on my website. The question is about how to use my own API? Should my website ...
6
votes
4answers
467 views

How to create different paths for users to take through the pages in my site?

I have a website where users are directed to go through a sequence of pages to perform a sequence of work tasks (transcribe a paragraph, answer a survey, interact with another user, etc). For short, ...
0
votes
1answer
2k views

One to Many Relationship Django

let say I want my User model to have only one location and my Post model to have many location. How Do I design the model? This is what I have in mind so far. Is this going to work? Do I need to ...
4
votes
1answer
617 views

Python, magic and objects that add attributes to its owner

Let me start with a disclaimer: I'm not the best programmer out there. I do however study I.T. and learnt a bit of Java and C. I'm getting stuck into Python and Django + Mongoengine, I'm not going to ...
3
votes
4answers
629 views

Notify players every x seconds in a multiplayer game

I'm working on a realtime multiplayer game using Django and gevent-socketio, I'm facing some issues: I need to send an update of the game state to connected players every X seconds (~4 seconds), so ...
3
votes
3answers
596 views

How to get a Web Application to communicate between users

I am developing a multipalyer web Application for Anti-Chess. It would be hosted on Google App Engine. I have a few questions: How do I get two different users who have opened the webapp on their ...
8
votes
1answer
500 views

Unit testing in Django

I'm really struggling to write effective unit tests for a large Django project. I have reasonably good test coverage, but I've come to realize that the tests I've been writing are definitely ...
2
votes
1answer
400 views

Does it violate the DRY principle to use an MVC server-side framework and a client-side MVC framework

When using a MVC pattern for server side code (in my case django), the model definition is defined once in the model component. When using a client side MVC based library(in my case backbone) the ...