bscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CAH-jdcw11Z1w2qRCkuwzdXL0qFNXD1Pk
m = Dog_Form(request.POST)
> if form.is_valid():
> form_save = form.save(commit=False)
> form_save.user = request.user # user is logged in
> form.save()
>
>
> On Tue, Oct 24, 2017 at 7:37 PM, Jack Zhang <valac...@gmail.com
> > wrote:
>
>> Let's
Let's say I have a model called 'Dogs'. Users can create instances of
Dogs. Let's say we have a user called User1. I have 2 questions:
1. When User1 creates an instance of Dogs, how do I automatically assign
that instance to User1? I tried using a model field like this but it
doesn't pick
, 2017 at 4:32:28 AM UTC-4, James Schneider wrote:
>
>
>
> On Oct 22, 2017 8:52 AM, "Jack Zhang" <valac...@gmail.com >
> wrote:
>
> Let's say I have a model called 'Dogs'. Users can create instances of
> Dogs. For every Dogs instance that is created,
This is a semi-long question. Please let me know wherever I make a mistake.
I'm building a search form with 4 required choices, 1 of the choices is a
CharField with a max_length of 3. The other 3 choices are ChoiceField's.
Here is a picture of what the search form looks like:
tabase usually handles this and you don't need to worry, there are
> many corner cases and DB systems are able to handle them
>
> But they won't look like whatever format you would like, usually it is
> just a number
>
> Why do you need the IDs to look like that?
>
> On Oct
D field. See
> https://docs.djangoproject.com/en/1.11/topics/signals/
>
> Best regards,
>
> Andréas
>
> 2017-10-22 17:52 GMT+02:00 Jack Zhang <valac...@gmail.com >:
>
>> Let's say I have a model called 'Dogs'. Users can create instances of
>>
Let's say I have a model called 'Dogs'. Users can create instances of
Dogs. For every Dogs instance that is created, I want to assign a globally
unique ID to it. The ID will be 3 capitalized letters followed by 7
numbers. E.g. ABC1234567, POZ2930193
What is the easiest way to go about
I'm looking for a datepicker widget to use for a DateTime form field. I
searched around and most of the answers were old Stack Overflow posts from
2011 about hacking the calendar datepicker widget from Django's Admin. The
information about that was inconclusive and I couldn't get mine to
9 matches
Mail list logo