Please answer all the questions in SECTION A and one question of your choice in SECTION B. SECTION A 1. Sort the below dictionary/array key using Javascript and output the information in key:value format on a Polymer interface. The entire numeric key should be sorted in an ascending order and all the alpha keys should be sorted in ascii, ascending order. (10 pts)
Dictionary = {„34‟: ‟thirty-four‟, „90‟: „ninety‟, „91‟: „ninety-one‟„21‟: „twenty-one‟, „61‟: „sixty-one‟, „9‟: „nine‟, „2‟: „two‟, „6‟: „six‟, „3‟: „three‟, „8‟: „eight‟, „80‟: „eighty‟, „81‟: „eighty-one‟, „Ninety-Nine‟: ‟99‟, „nine-hundred‟: „900‟,}
NB: The code snippet should be deployed using one of the two options below:
a. A HTML5 cross-platform mobile application using Cordova. Use of standalone deployments like Node.js or Chrome execution deployments is accepted.
b. A Django application on apache/nginx webserver and NOT the development server. This should also be deployed on a red-hat based Linux environment, preferably (CentOS)
c. An Android java application with an executable APK build
On Thu, May 2, 2019 at 12:17 PM Daviddd <davide.muraro@gmail.com> wrote:
Dear All,--Empty DB, no migration is applied, I have a core app like:
#core.models
class Institute(models.Model):
phone_regex = RegexValidator(regex=r'^\+?1?\d{9,15}$', message=institute_phone_help_text)
name = models.CharField(_('name'), max_length=255)
description = models.TextField(_('description'), blank=True)
abbreviation = models.CharField(_('abbreviation'), blank=True, max_length=100)
address = models.TextField(_('address'), blank=True)
phone = models.CharField(validators=[phone_regex], max_length=17, blank=True) # validators should be a list
websites = ArrayField(models.URLField(max_length=255), verbose_name=_('websites'), blank=True, null=True)
class Meta:
verbose_name = _('institute')
verbose_name_plural = _('institutes')
def __str__(self):
return '{0} ({1})'.format(self.name, self.abbreviation)
class User(AbstractUser):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
institute = models.ForeignKey(Institute, on_delete=models.CASCADE)
params = JSONField(_('params'), null=True, blank=True,)
about_me = models.TextField(_('about me'), blank=True,)The app core is in the INSTALLED_APPS.If I run
./manage.py migrate
it correctly says that is not finding the core app, hence I run
./manage.py makemigrations coreIt creates the migration file 001_initial*.Now I run ./manage.py migrate and it works great,But if I continue to run ./manage.py makemigrations it continues to add N core app migration file like:
# Generated by Django 2.2.1 on 2019-05-02 08:55
import django.contrib.auth.models
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AlterModelManagers(
name='user',
managers=[
('objects', django.contrib.auth.models.UserManager()),
],
),
]
I tried various combinations but none worked:
./manage.py makemigrations core
./manage.py migrate core
./manage.py migrate
./manage.py makemigrations core
./manage.py makemigrations core
./manage.py makemigrations
./manage.py migrateLinked to this question:Is it a bug?How can I solve this?Thanks.D
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@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/dea82e4c-b1f3-4740-be69-4a881cd473e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@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/CAMWCUZWw10M2kZmk0H7rq-MnRBw_kVE8WVVktUPvZ6pLXT%3DnPA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment