Hi list,
I'm a Django newbie and have been reading of usefulness of using it with
virtualenv+git. I'm not clear however how to set it up in terms of
structure/hierarchy.
Say I've got my ~/projects/django-projects where I want to create my
projects so I'd initialise git inside ~/projects/django-pr
Hey,
I would recommend using virtualenvwrapper to manage virtual
environments for different projects.
[http://virtualenvwrapper.readthedocs.org/en/latest/]
Once you have virtualenvwrapper installed, you can create virtualenv
for new projects using
$ mkvirtualenv
.. and you can activate this vi
1. You included pyc twice.
2. I don't see a need to add all subfolders. I've used to name virtual
env's the same for each project, so you just add the it's name to gitignore.
Since my virtual env folder lives inside project folder they are not mixed
up.
This way you don't make your .gitignore f
Hello Everyone,
I new to Django. I'm using portable PyScripter 2.4.1.0 (Python 3.2.1) for
learning Python. Recently I downloaded Django 1.5. With help of tutorials,
I could install Django on this portable PyScripter.
Currently I'm able to create projects and apps in the Django. However I'm
not
Hi,
I have just started using Django. I want to create a to-do task
manager application. Users would register, login and can work with
their tasks. So, instead of creating a table in the database for each
user, I want to create a JSON file for each user which will store all
his tasks.
Is there an
Django is just Python, so yes. Just use the json module in the standard
library.
On Mar 30, 2013 9:23 AM, "Parin Porecha" wrote:
> Hi,
>
> I have just started using Django. I want to create a to-do task
> manager application. Users would register, login and can work with
> their tasks. So, instea
Also, would it be beneficial performance wise ?
One more doubt -
is it better to convert query results ( obtained from sql tables ) to
JSON, and send it as an http response to the client and use it to show
data, or to simply send the query result to the client and show it via
task.name, task.start
Al 30/03/13 14:14, En/na Parin Porecha ha escrit:
Hi,
I have just started using Django. I want to create a to-do task
manager application. Users would register, login and can work with
their tasks. So, instead of creating a table in the database for each
user, I want to create a JSON file for ea
On Sat, Mar 30, 2013 at 9:42 AM, Alexis Roda
wrote:
> Yes, just import json and work with it, but be aware that you'll loose most
> of the functionality that makes django so productive: no ModelForms, no
> ORM/Querysets, no admin for tasks, ...
>
That's true. Without the ORM and Forms/ModelForms,
Al 30/03/13 14:37, En/na Parin Porecha ha escrit:
Also, would it be beneficial performance wise ?
It depends on how you implement it:
* on a "traditional" client/server application I think that
loading/parsing/processing/encoding/saving the json file on each request
will be very expensive co
You almost certainly don't want to use JSON as your storage method. This is
a database problem, and the Django ORM really shines at letting you solve
it without having to think super hard about database modeling. You wouldn't
create a table for each user's task list. You would create a model cal
HI Pankaj
Sincerest thanks for the link.
It could be exactly what I'm looking for!
Will have a proper look this weekend
Bests
Jon
On Thursday, March 28, 2013 1:33:11 PM UTC, Jonathan Harris wrote:
>
> Hi All
>
> New to Django and coding in general, so sorry if this has been covered - I
> did s
Thank you all for your prompt replies :)
> IIUC you can't return the query (as a python object) to the client. You must
> convert the data on it to some format (json, xml, ...) that the client
> understands. That will depend on the libraries that you use in the client
> side.
So, if I don't us
Remember: Premature optimization is the root of all evil.
Use a database for its intended purpose: storing data.
If you use individual files then you need to implement your own locking,
writing to disk, caching, and so forth.
Not only is the database more functional, but it will likely be more
Thanks !
Okay, so i am dropping the idea of using JSON for storage.
So, if I use JSON only as a format to send data
to client ( All the parsing will be done client side ), is it better
than using {{ task.name }}, {{ task.start_date }} ? ( Sorry to ask
this again, but i haven't got it )
On Sat, M
Hello,
My form is not based on a model, form.value is not showing the editor.
Thanks for the help.
class RebateForm(forms.Form):
item = forms.CharField(max_length=50, required=True)
category = forms.ModelChoiceField(queryset=Category.objects.all())
value = forms.CharField(widget=CKEd
Hi All,
I have a scenario setup very much like the Polls example in the tutorial.
class Terminology(models.Model):
name = models.CharField(max_length=110)
abbreviation = models.CharField(max_length=20)
version = models.CharField(max_length=30)
def __unicode__(self):
retur
I figured it out.
In my index.html file, I had to add {{ form.media }}
On Saturday, March 30, 2013 12:21:52 PM UTC-4, frocco wrote:
>
> Hello,
>
> My form is not based on a model, form.value is not showing the editor.
>
> Thanks for the help.
>
> class RebateForm(forms.Form):
> item = forms.Ch
Hi,
As it seems Django doesn't handle the update and delete of files from a
FileField by itself leaving you them pretty hard to use by default.
I tried search around but couldn't find a proper answer as to the correct
way of handling this.
I'm looking for the case where when the file is update
Does Django provide a way to only get part of a text string at the ORM
level?
That means using SQL functions as to only download a substring.
As in the substr,left sql functions?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe
Al 30/03/13 16:41, En/na Parin Porecha ha escrit:
Thanks !
Okay, so i am dropping the idea of using JSON for storage.
So, if I use JSON only as a format to send data
to client ( All the parsing will be done client side ), is it better
than using {{ task.name }}, {{ task.start_date }} ? ( Sorry
You could remember the old path by saving it as a variable in your
model's __init__ function.
Something like this:
self._old_file_path = self.file_path
Then in your save():
#only if there was a non-blank path to begin with, and it changed
if self._old_file_path and ( self._old_file_
Yes, I meant the former ( managing presentation on the client ).
Also, considering that a user might have as many as 100 - 200 tasks in
one JSON file ( their description, dates, tags and all ),
is it better performance wise ?
On Sat, Mar 30, 2013 at 11:46 PM, Alexis Roda
wrote:
> Al 30/03/13 16:
If you don't use the ORM, Forms, and even the templating system you're
losing quite a bit with Django. In my opinion, it's not worth using Django
for those sorts of projects.
While not a Python project, I found NodeJS & node-restify a good candidate
for these types of applications. That's not a co
Please have a look at following code.
pre_save and post_delete signal handlers are used here to
automatically delete unused files.
Signal handlers are generic in nature as the use isinstance(field,
models.FileField) to identify file fields.
Source -
https://github.com/un1t/django-cleanup/blob/m
Al 30/03/13 19:25, En/na Parin Porecha ha escrit:
Yes, I meant the former ( managing presentation on the client ).
Also, considering that a user might have as many as 100 - 200 tasks in
one JSON file ( their description, dates, tags and all ),
is it better performance wise ?
The responsiveness
Hi again
Have tried out this app and it is exactly what I was looking for!
I strongly recommend it for anyone who wants an easy way to manage
attaching and removing tags in the admin site
Thanks again for your help : )
Jon
On Thursday, March 28, 2013 1:33:11 PM UTC, Jonathan Harris wrote:
>
> H
In this instance, what I'm asking is about the documentation.
In other words does anyone recognize the dialect.
It would just help in understanding docs.
Though, thanks for indicating that it is backend dependent.
On Friday, March 29, 2013 8:40:09 PM UTC-5, Russell Keith-Magee wrote:
>
>
>
> On Sa
28 matches
Mail list logo