Search Results

Search found 130 results on 6 pages for 'xrobot'.

Page 4/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • How trasmit a Dictionary in a jsons form

    - by xRobot
    I have a dictionary in jsons form like this: $user = "{ name: Mary , born: 1963, money: 213 }"; I need to pass it throught this field: <input type="hidden" name="custom" value="" > and then insert it in the db: INSERT INTO user ( name, born, money ) VALUE ( $name, $born, $money ) How can I do that ?

    Read the article

  • 2 Select or 1 Join query ?

    - by xRobot
    I have 2 tables: book ( id, title, age ) ---- 100 milions of rows author ( id, book_id, name, born ) ---- 10 millions of rows Now, supposing I have a generic id of a book. I need to print this page: Title: mybook authors: Tom, Graham, Luis, Clarke, George So... what is the best way to do this ? 1) Simple join like this: Select book.title, author.name From book, author WHERE ( author.book_id = book.id ) AND ( book.id = 342 ) 2) For avoid the join, I could make 2 simple query: Select title FROM book WHERE id = 342 Select name FROM author WHERE book_id = 342 What is the most efficient way ?

    Read the article

  • How to save a custom cookie

    - by xRobot
    Is there a way to save a cookie that is available on other site ? For instance I have my django project on http://www.example.com and I want that django saves a cookies for a site written in PHP on http://site.Idontknow.com . Is this possible ?

    Read the article

  • Template does not exist: 500.html

    - by xRobot
    I have created a template for 500 http error. I have insert my template 500.html in: 1) /project/ 2) /project/templates/ 3) /python2.5/ 4) /python2.5/templates/ . but I always get this error: TemplateDoesNotExist: 500.html Same problem for Http 404 error. WHY ???

    Read the article

  • Question about Benchmark funcion in Mysql ( Incredible results ).

    - by xRobot
    I have 2 tables: author with 3 millions of rows. book with 20 miles rows. . So I have benchmarked this query with a join: SELECT BENCHMARK(100000000, 'SELECT book.title, author.name FROM `book` , `author` WHERE book.id = author.book_id ') And this is the result: Query took 0.7438 sec ONLY 0.7438 seconds for 100 millions of query with a join ??? Do I make some mistakes or this is the right result ?

    Read the article

  • regular expression with special chars

    - by xRobot
    I need a regular expression to validate string with one or more of these characters: a-z A-Z ' àòèéùì simple white space FOR EXAMPLE these string are valide: D' argon calabrò maryòn l' Ancol these string are NOT valide: hello38239 my_house work [tab] with me I tryed this: re.match(r"^[a-zA-Z 'òàèéìù]+$", self.cleaned_data['title'].strip()) It seems to work in my python shell but in Django I get this error: SyntaxError at /home/ ("Non-ASCII character '\\xc3' ... Why ?

    Read the article

  • How to disable Middleware and Request Context in some views.

    - by xRobot
    I am creating a chat like facebook chat... so in views.py of my Chat Application, I need to retrieve only the last messages every 3-4 seconds with ajax poll ( the latency is not a problem for me ). If I can disable some Middlewares and some Request Context in this view, the response will be faster... no ? My question is: Is there a way to disable some Middlewares and some Request Context in some views ?

    Read the article

  • FORM TIPS with jquery or other library

    - by xRobot
    This is a form validation for jquery: http://www.position-absolute.com/articles/jquery-form-validator-because-form-validation-is-a-mess/ I need something like that but the tips has to appear when I select the input text form by clicking on it and has to dissapear when I select another input text form. Is there a way to do this with jquery, mootools, scriptaculus or any other library ? Thanks ^_^

    Read the article

  • Saving images in database mysql

    - by xRobot
    My client have created a script in php+mysql that saves images directly in the database and every images has url like this: www.example.com/image.php?id=421 In your opinion this is a very wrong solution ? Should I rebuild all the site ? There are about 1000 visits per day and about 600 images in the database. This is the site: http://tinyurl.com/3xkxdsw

    Read the article

  • Could I use urlize filter in this way ?

    - by xRobot
    Could I use urlize filter in this way? : from django.utils.html import urlize def save(self, force_insert=False, force_update=False): self.body = urlize(self.body) super(Post, self).save(force_insert, force_update) body is a TextField.

    Read the article

  • Post and Comment with the same Model.

    - by xRobot
    I have created a simple project where everyone can create one or more Blog. I want to use this models for Post and for Comment: class Post_comment(models.Model): content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField(_('object ID')) content_object = generic.GenericForeignKey() # Hierarchy Field parent = models.ForeignKey('self', null=True, blank=True, default=None, related_name='children') # User Field user = models.ForeignKey(User) # Date Fields date_submitted = models.DateTimeField(_('date/time submitted'), default = datetime.now) date_modified = models.DateTimeField(_('date/time modified'), default = datetime.now) title = models.CharField(_('title'), max_length=60, blank=True, null=True) post_comment = models.TextField(_('post_comment')) markup = models.IntegerField(choices=MARKUP_CHOICES, default=DEFAULT_MARKUP, null=True, blank=True) if it is a comment the parent is not null. So in most case the text field will contain a little bit of text. Can I use this model for both Post and Comment ?

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >