Re: Django frustrations :)

2014-08-16 Thread alghafli
Hello I am not sure how much time you have been programming and what you have learned so far. I do know however that i have not taken a real computer science course and i did not study computer science. if i can do it without computer science, you certainly can do it. One thing that helped me l

Re: running script in django database

2014-07-30 Thread alghafli
07:53, jirka.vejra...@gmail.com wrote: Hi Mohammad, this can be easily achieved using a custom management command - check the Django documentation. HTH Jirka -Original Message- From: alghafli Sender: django-users@googlegroups.com Date: Wed, 30 Jul 2014 07:02:59 To: Rep

running script in django database

2014-07-29 Thread alghafli
Hello, I made a library application using django 1.6. currently I only need to populate the database. at the beginning, it is easier to write the information in a csv file and import it using a script. the script is running fine if I use manage.py shell and import the necessary file and call

Re: managing temporarily created files

2014-07-21 Thread alghafli
:09, alghafli wrote: I want to dynamically create a temporary odt file and upload it to the client. The file is dynamically created based on GET request parameters. It basically searches the database and fills the odt file with information. This file is temporary and should be deleted after the

managing temporarily created files

2014-07-21 Thread alghafli
Hello django community, I am currently developing my first web application. Since I am new to web development, I thought I should seek advice on what I am trying to implement at the moment. Before I start, here are my questions: *can django do this?**if not, is there a python library that can d

Re: sort by multiple fields using admin_order_field

2014-07-16 Thread alghafli
e function you are going to add: function_name.admin_order_field = 'The field to order' 2014-07-16 13:25 GMT-05:00 alghafli <mailto:theb...@gmail.com>>: Hello, I made a library application. I have books each with its own id number (different from the autofield added by django). the b

Re: how can i make django url system acept the following url http://www.yoursite.com/notifications?topic=payment&id=identificador-de-notificación-de-pago

2014-07-16 Thread alghafli
You should stop at /pago/index the fields after ? are accessible by the GET dictionary. I did something like this and I used (r'^search/$') expression. when I get a url like: http://testsystemser.cloudapp.net/*search*/?topic=payment&id=identificador-de-notificación-de-pago I do something like th

sort by multiple fields using admin_order_field

2014-07-16 Thread alghafli
Hello, I made a library application. I have books each with its own id number (different from the autofield added by django). the book has several foreign keys each with its own id. I wrote a function that returns a long id number in string format consisting of the book id number and id numbe

Re: validators not working in shell

2014-07-13 Thread alghafli
Thank you. That helped me solving the problem :) على السبت 12 تـمـوز 2014 20:12, كتب tim: Model validation is not invoked when calling model.save(). You can read more here: https://docs.djangoproject.com/en/1.6/ref/models/instances/#validating-objects On Saturday, July 12, 2014 6:46:17 AM UTC-

validators not working in shell

2014-07-12 Thread alghafli
Hello I am creating a django library application. I have made a book model and it has some fields with validators. Most of them are standard MinValueValidator and MaxValueValidator. Using the webserver, the validators work completely fine. I see errors when I put invalid values. However, when I

Re: django beginner

2014-07-01 Thread alghafli
Hi, I am also new to django and I started by reading the django tutorial. https://docs.djangoproject.com/en/1.6/intro/overview/ It covers installation then shows how to construct a django application. It takes you step by step in constructing an example application. I believe it is a very good pl

Re: How to read part of many-to-many field in the template

2014-06-15 Thread alghafli
d like this: {% for author in book.authors.all|slice:"3" %} {# HTML up in here #} {% endfor %} Good luck, Elliot On Sun, Jun 15, 2014 at 9:31 AM, alghafli <mailto:theb...@gmail.com>> wrote: Hello django users. I am working on my first django project and I faced

How to read part of many-to-many field in the template

2014-06-15 Thread alghafli
Hello django users. I am working on my first django project and I faced a little problem. I have a library database with books. A book element may have several authors. In the view function I query the database for books. I want to show the *first three* authors. I was thinking to do something s

How to localize database fields

2014-05-13 Thread alghafli
Hello django users. I am new to django and a bit new to databases. This is actually my first time making a web and database project. What I want to do is to localize database field names so that the field name appears differently in the admin and user sites depending on the language chosen. fo