Django equivalent to ORM Designer for Symfony?
i create model schemas with ORM Designer when using symfony. i have never used django before. i am wondering, if there is an equivalent for django so that you dont have to manually write schemas? ...
i create model schemas with ORM Designer when using symfony. i have never used django before. i am wondering, if there is an equivalent for django so that you dont have to manually write schemas? ...
Hi,I am building a travel website with django. When a user is typing in the destination city name (or points of interest, like yellow stone), I want to do ajax auto suggestion. The question is how I could get the suggestion database? Is there any web service? Best if it could also support foreign cities. Thanks a lot. ...
Ipython has a plugin called autoreload that will presumably reload all your modules after every command, so you can change the source and not have to quit the shell and reenter all your commands. See http://dsnra.jpl.nasa.gov/software/Python/tips-ipython.html for example. However, this seems flaky at best when using it with Django, e....
In one of my Django projects that use MySQL as the database, I need to have a date fields that accept also "partial" dates like only year (YYYY) and year and month (YYYY-MM) plus normal date (YYYY-MM-DD). The date field in MySQL can deal with that by accepting 00 for the month and the day. So 2010-00-00 is valid in MySQL and it represen...
I use netbeans for all of my Linux development (C/C++, Php, Python, Symfony). I am now learning django, and wondered if I could use netbeans as the IDE. I cant seem to find a Django plugin for netbeans. Is there one?. If no when is one planned? Worst case scenario, I'll have to use another IDE (I really dont want to learn another IDE) ...
I'm having trouble storing and outputting an ndash character as UTF-8 in Django. I'm getting data from an API. In raw form, as retrieved and viewed in a text editor, given unit of data may be similar to: "I love this detergent \u2013 it is so inspiring." (\u2013 is & ndash; as an html entity). If I get this straight from an API and...
I'm test building a scraping site with django. For some reason the following code is only providing one picture image where i'd like it to print every image, every link, and every price, any help? (also, if you guys know how to place this data into a database model so I don't have to always scrape the site, i'm all ears but that may be a...
Hi, I have following model described: class UserProfile(models.Model): avatar = models.ImageField(blank = True, upload_to='files') about = models.TextField(blank=True) rank = models.IntegerField(default = 1) solvedProblems = models.ManyToManyField(Composition, blank=True) user = models.ForeignKey(User, unique=True) ...
Hi, Is it possible to use Django select_related() function to return records even if they do not appear in both tables? e.g. table 1 =========== id | title 1 title 1 2 title 2 3 title 3 table 2 ============ id | table_1_id | cat 1 1 cat 1 2 1 cat 2 3 3 cat 3 assume table 1 maps to Dj...
hello, i want to make a notification function, and i need fields from 2 different models. how can i access those fields? in my notification view i wrote this data = Notices.objects.filter(last_login<date_follow) where last_login belongs to the model class User , and date_follow to Follow but it is not a proper and correct way of acc...
hello i have a microblog app, and i'm trying to paginate the entries, to show only 10 per page, for example. though i've followed the tutorial, my pagination doesn't seem t be working. the listing function looks like that: def listing(request): blog_list = Blog.objects.all() paginator = Paginator(blog_list, 10) try: ...
I remodel my objects using ManyToMany relationship using "through" as it's guided here: link text class Receipt(models.Model): name = models.CharField(max_length=128) (...) components = models.ManyToManyField(Product, through='ReceiptComponent') class Admin: pass def __unicode__(self): return self.name def url(self...
I have a form that needs to have either a valid url or a valid file for uploading: class ResourceUpload(ModelForm): ... uploadedfile = forms.FileField('file') url_address = forms.URLField('url') ... How can I override the FileField and URLField validators so that Django only raises an error if both of the fields a...
I need to create a chat similar to facebook chat. I am thinking to create a simple application Chat and then using ajax polling ( to send request every 2-3 seconds ). Is this a good approach ? ...
Consider two QuerySet objects of the same class. Is there a simple way to unify them into a single QuerySet, similar to addition but without duplicates. Also, is there a simple way to subtract them? Removing all elements that appear in both sets from one of the sets? ...
Hi, Here's my problem : my site has users, which can create projects, and access other user's projects. Each project can assign different rights to users. So, i could have Project A : user "John" is in group "manager" , and Project "B" user "John" is in group "worker". How could I use the Django User authentication model to do that ? ...
Hi, I have three models as class Category(models.Model): name = models.CharField(max_length=128) class SubCategory(models.Model): category = models.ForeignKey(Category) name = models.CharField(max_length = 400) class Document(models.Model): category = models.ForeignKey(Category, null=True,blank=True,help_t...
Imagine the following model: class Parent(Model): ... class Child(Model) father = ForeignKey(Parent) ... Some parents have children, others do not (they're not parents in the real meaning, it's just a fictional name). I would like to make the following query: I want to list all the Parents, and if they have children, bri...
I'm finishing a certain django project. It's a data entry application with more than 170 tables in a postgresql database. The application would primarily serve to support a large data entry operation that would last about 2 months. After that it would only serve to export the entered data as xml and json. Plus people may use just the dat...
I want to do this: {% for egg in eggs %} <p>{{ egg.spam }}</p> {% if egg.is_cool %} {% myvariable = egg %} // Possible in any way? {% endif %} {% endfor %} Pardon the JavaScript-style comment (it shows up as a comment on SO) ...