Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.63 KB | None | 0 0
  1. p        python manage.py shell                                   [674.9s] [21:59:36]
  2. Python 2.7.6 (default, Jun 22 2015, 17:58:13)
  3. [GCC 4.8.2] on linux2
  4. Type "help", "copyright", "credits" or "license" for more information.
  5. (InteractiveConsole)
  6. > from videovote.models import *
  7. > from django.contrib.auth.models import User
  8. > up1 = UserProfile.objects.get(pk=1)
  9. > v1 = Video.objects.get(title="v1", belong_to=up1)
  10. > dir(v1)
  11. ['DoesNotExist', 'MultipleObjectsReturned', '__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', u'__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setstate__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_check_column_name_clashes', '_check_field_name_clashes', '_check_fields', '_check_id_field', '_check_index_together', '_check_local_fields', '_check_long_column_names', '_check_m2m_through_same_relationship', '_check_managers', '_check_model', '_check_ordering', '_check_swappable', '_check_unique_together', '_do_insert', '_do_update', '_get_FIELD_display', '_get_next_or_previous_by_FIELD', '_get_next_or_previous_in_order', '_get_pk_val', '_get_unique_checks', '_meta', '_perform_date_checks', '_perform_unique_checks', '_save_parents', '_save_table', '_set_pk_val', '_state', 'belong_to', 'belong_to_id', 'check', 'clean', 'clean_fields', 'date_error_message', 'delete', 'from_db', 'full_clean', 'get_deferred_fields', 'id', 'objects', 'pk', 'prepare_database_save', 'refresh_from_db', 'save', 'save_base', 'serializable_value', 'ticket_set', 'title', 'unique_error_message', 'validate_unique']
  12. >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement