Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Django form.is_valid() is always False while uploading images
views.py I am trying to upload an image but form.is_valid always return false def upload(request): if request.method=="POST": form=uploadform(request.POST,request.FILES) if form.is_valid(): cd=cleaned_data form.save(commit=True) return render(request,"success.html") else: form=uploadform() return render(request,'pico.html',{'form':form}) -
Django AttributeError: 'User' object has no attribute 'set_password' but user is not override
I have the following error: AttributeError: 'User' object has no attribute 'set_password' The problem is I didn't override the class User: My model.py: class User(models.Model): username = models.CharField(max_length=30) password = models.CharField(max_length=30) email = models.EmailField() def __str__(self): return self.username My view.py: def post(self, request): form = self.form_class(request.POST) if form.is_valid(): user = form.save(commit=False) print type(user) # Cleaning and normalizing data username = form.cleaned_data['username'] password = form.cleaned_data['password'] user.set_password(password) user.save() # returns User objects if the credential are correct user = authenticate(username=username, password=password) if user is not None: if user.is_active: login(request, user) return redirect('website:home') return render(request, self.template_name, {'form': form}) And this is my form.py: class UserForm(forms.ModelForm): password = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control', 'type': 'password', 'placeholder': 'Enter your password'})) class Meta: model = models.User I don't really know also if I should override the User class. In which case I should and in which case I shouldn't? -
Error when trying to lookup data in a model which has a choices parameter in a CharField
Im trying to query a model which has multiple fields from one input field, but I get an error: 'Related Field got invalid lookup: icontain' The model looks like so: class Person(model.Models): first_name = models.CharField(max_length=60) last_name = models.CharField(max_length=60) location = models.CharField(max_length=60) nonsmoker = 'Non smoker' smoker = 'Smoker' smoking_choices = ( (nonsmoker, 'None smoker'), (smoker, 'Smoker') ) smoking_habits = models.CharField(max_length = 10, choices = smoking_choices, blank=False, default=1) Query variable in a view like so: query_list = query_list.filter( Q(first_name__icontains=query) | Q(last_name__icontains=query) | Q(location__icontains=query) | Q(smoking_habits__icontains=query) This part of my view is obviously wrong: Q(smoking_habits__icontains=query) How do I correct this? My apologies if Ive used any terms incorrectly, Im new to Django and coding. -
How to Hash Django user password in Django Rest Framework?
I'm trying to create an API for my user registration using Django Rest Framework. I created a serializer by following the step from the api-guide class CreateUserSerializer(serializers.ModelSerializer): class Meta: model = User fields = ('email', 'username', 'password') extra_kwargs = {'password': {'write_only': True}} def create(self, validated_data): user = User( email=validated_data['email'], username=validated_data['username'] ) user.set_password(validated_data['password']) user.save() return user However, I keep getting the Invalid password format or unknown hashing algorithm. for my newly created user. I've tried to use make_password from django.contrib.auth.hashers, but I still can't resolve this issue. Thanks -
How to filter in django by id of foriegn key
i want to filter by id of Foreign key in django. my model.py class CustomerLeads(models.Model): customer_name = models.CharField(max_length=50,null=True, blank=True) event = models.CharField(max_length=50,null=True, blank=True) item_required = models.ForeignKey(ProductClass,null=True, blank=True) title = models.CharField(max_length=100, null=True, blank=True) i want to search by item_required. i am getting ids for ProductClass values like 12,13., as id is default in django. Thanks -
Incorrect padding error while b64decoding
Hi I have following code which encodes and decodes certain data. But it gives me Incorrect Padding error while decoding data even when I have already added padding. The Code is; Encoding: plain = str(data) mismatch = len(plain) % 16 if mismatch != 0: padding = (16 - mismatch) * ' ' plain += padding secret_key = '3216549874561230' cipher = AES.new(secret_key, AES.MODE_ECB) encoded = base64.b64encode(cipher.encrypt(plain)) This encoded data is sent through a link. I am getting that data from ID parameter of my URL. Decoding: secret_key = '3216549874561230' data = request.GET.get('ID') cipher = AES.new(secret_key, AES.MODE_ECB) decoded = cipher.decrypt(base64.b64decode(email)) print "-------------decoded-------------",decoded data = {'id': decoded} please help me I am new in it. And thank you so much guys already. -
How to profile django channels?
My technology stack is Redis as a channels backend, Postgresql as a database, Daphne as an ASGI server, Nginx in front of a whole application. Everything is deployed using Docker Swarm, with only Redis and Database outside. I have about 20 virtual hosts, with 20 interface servers, 40 http workers and 20 websocket workers. Load balancing is done using Ingress overlay Docker network. The problem is, sometimes very weird things happen regarding performance. Most of requests are handled in under 400ms, but sometimes request can take up to 2-3s, even during very small load. Profiling workers with Django Debug Toolbar or middleware-based profilers shows nothing (timing 0.01s or so) My question: is there any good method of profiling a whole request path with django-channels? I would like how much time each phase takes, i.e when request was processed by Daphne, when worker started processing, when it finished, when interface server sent response to the client. Currently, I have no idea how to solve this. -
Django Upload Image Read Content
I have very simple upload form one file input and submit. I am trying to read the content of uploaded file. Here is the code of the view: def media(request): if request.method == 'POST': file_obj = request.FILES['file'] logger.debug(file_obj.read()) logger.debug('cnt-type: ' + file_obj.content_type) return render(request, 'media.html') return render(request, 'media.html', {}) file_obj.read() returns nothing if the file is Image. If I upload some text file then it is fine. How can I read the content of image file ? -
Mayan edms with s3
I am setting up the mayan edms with s3 according to 2nd message of Roberto Rosario on this link (https://groups.google.com/forum/#!topic/mayan-edms/tZjmn5u4y2A) but I am now having some errors. Even though I added the s3 bucket settings on production.py, the s3.py from the storages/backends/ cannot load the settings. The following is the error. File "/home/cag/mayan-edms/lib/python2.7/site-packages/mayan/settings/production.py", line 42, in <module> from storages.backends.s3 import S3Storage File "/home/cag/mayan-edms/lib/python2.7/site-packages/storages/backends/s3.py", line 42, in <module> class S3Storage(Storage): File "/home/cag/mayan-edms/lib/python2.7/site-packages/storages/backends/s3.py", line 45, in S3Storage def __init__(self, bucket=settings.AWS_STORAGE_BUCKET_NAME, File "/home/cag/mayan-edms/lib/python2.7/site-packages/django/conf/__init__.py", line 49, in __getattr__ return getattr(self._wrapped, name) AttributeError: 'Settings' object has no attribute 'AWS_STORAGE_BUCKET_NAME' And the settings on production.py looks like this. from django.conf import settings settings.INSTALLED_APPS += ('storages',) AWS_ACCESS_KEY_ID = 'KEY_ID' AWS_SECRET_ACCESS_KEY = 'ACCESS_KEY' AWS_STORAGE_BUCKET_NAME = 'BUCKET_NAME' AWS_QUERYSTRING_AUTH = False from storages.backends.s3 import S3Storage DOCUMENTS_STORAGE_BACKEND=S3Storage DEFAULT_FILE_STORAGE = 'storages.backends.s3.S3Storage' Thanks in advance. -
after editing the urlpatterns in the urls.py file on django, the local server (127.0.0.1:8000) stopped working - I get a 404 (not found) message
I'm new to Django and trying to figure out how the basics work here. I created a new project and received a local server IP, when I go to it, it works just fine (gives me the default message signifying that all is working well). BUT - when I go to urls.py in the my main directory and try adding another url, suddenly it stops working all together, i.e. it doesn't even recognize the original IP, let alone the new addition. Here's the original code that works fine (I added the "include" import, but this didn't bother the program from running properly): from django.conf.urls import include,url from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), ] and if I simply add another line to the list (for simplicity I just copied the first one.. I tried other things though and got the same result), like this: urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^admin/', admin.site.urls), ] And now when I look at my IP address, it gives me a 404 message: screen shot of the server NOTE: I've encountered this problem when trying to specify other urls, it seems as if I'm following the tutorials precisely and in those examples this working … -
django south "there is no south database module"
i'm learning django-socket-server. I succeeded in making "diango-socket-server" follow the tutorial and then running python manage.py start_socket. https://django-socket-server.readthedocs.io/en/latest/readme.html But after I had run Python manage.py runserver. I've got an error prompt as follows. import error:no mudule named south.utils. After that I ran pip install south and added south to the INSTALLED_APPS list. The following is my code: INSTALLED_APPS = [ 'south', 'socket_server', 'chat.apps.ChatConfig', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles',] And then I set SOUTH_DATABASE _ADAPTER.Here are my codes. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), }} SOUTH_DATABASE_ADAPTER = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'mysite', } } Finally,I had run either Python manage.py runserver or Python manage.py syncdb again,but I've got an error prompt that there is no south database module. Actually,I've tried a solution for these kinds of problems,like pip uninstall south. but how to fixed the import error:no mudule named south.utils if i use pip uninstall south? python == 2.7 django == 1.10 Can someone help me? Thanks a lot. -
How can I add cartridge to an already existing mezzanine application
I am building an Django Application using Mezzanine. I want to use Cartridge with my project. Is there a way to integrate Cartridge to my already existing mezzanine application? If yes, it would help if someone could point out the exact settings to be modified. Else, Is creating a new project with the following command '$ mezzanine-project -a cartridge project_name' the only way out? -
Django: query group by format year-month-day hour:minute with other columns
I have an Django query . I want to filter data from model- BulkOrder and group by them accordingly partner and pickup_time together. pickup_time is in Datetime format. Django BulkOrder Model seems like: class BulkOrder(models.Model): partner = models.CharField(max_length=45, blank=True, null=True) pickup_time = models.DateTimeField(max_length=45, blank=True, null=True) What have I tried so far from django.db.models import Func class MonthSqlite(Func): function = 'STRFTIME' template = '%(function)s("%%y-%%m-%%d %%h:%%m", %(expressions)s)' output_field = models.CharField() I first try to group by data for only pickup_time by using this Django query : BulkOrder.objects.annotate(m = MonthSqlite('pickup_time')).values('m') getting error : TypeError: not enough arguments for format string Want to know How to fix this error and how to group by data with additional column name partner. or Is there any other way to do this ? -
django-cors-middleware does not work
I've been trying django-cors-middleware for days, but I just cannot figure out how to set it up. Can anyone tell me what I am doing wrong please? Below is the test project setting I am using. django-version: 1.10.3 python-version: 3.5.2 Project Name: cors_test App Name: appone appone/urls.py urlpatterns = [ url(r'^$', views.test_cors, name='test_cors'), ] appone/views.py def test_cors(request): return render(request, 'appone/test.html', {}) appone/templates/appone/test.html <html> <script type="text/javascript"> var url = 'https://www.google.co.jp/?gfe_rd=cr&ei=BuxgWJ-_LIyL8QfIgYe4BQ'; var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.onload = function() { var responseText = xhr.responseText; console.log(responseText); }; xhr.onerror = function() { console.log('There was an error!'); }; xhr.send(); </script> </html> settings.py INSTALLED_APPS = [ 'corsheaders', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'appone' ] MIDDLEWARE = [ 'corsheaders.middleware.CorsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', ] CORS_ORIGIN_ALLOW_ALL = True And that's it! That is every setting, and I ran server by python manage.py runserver Below is what I get by running above error from console, (index):1 XMLHttpRequest cannot load https://www.google.co.jp/?gfe_rd=cr&ei=BuxgWJ-_LIyL8QfIgYe4BQ. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://127.0.0.1:8000' is therefore not allowed access. (index):14 There was an error! Request Headers :authority:www.google.co.jp :method:GET :path:/?gfe_rd=cr&ei=BuxgWJ-_LIyL8QfIgYe4BQ :scheme:https accept:*/* accept-encoding:gzip, deflate, sdch, br accept-language:ja,en-US;q=0.8,en;q=0.6 cache-control:no-cache origin:http://127.0.0.1:8000 pragma:no-cache referer:http://127.0.0.1:8000/ user-agent:Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, … -
Deleting multiple rows using checkbox in Django frontend
I am going to implment a multi delete (via select boxes) view in django. I know there's a view in django.contrib.admin.actions but I can't port this to frontend. I was looking for example (for Django view + html) but couldn't find any. 1)How to create multiple delete object using checkbox and single delete buttom in list page. 2)What are the changes in list ,delete view and list.html page views.py def Agent_List(request, id=None): #list items queryset = Agent.objects.order_by('id') #queryset = Agent.objects.all() query = request.GET.get('q') if query: queryset=queryset.filter( Q(Aadhaar_Number__icontains=query) | Q(PAN_Number__icontains=query) | Q(Account_Number__icontains=query) ).distinct() context = { "object_list": queryset, "Full_Name ": "Agent_List", } return render(request, "customer/Agent_List.html", context) def Agent_Delete(request, id=None): instance = get_object_or_404(Agent, id=id) instance.delete() messages.success(request, "Successfully deleted") return redirect("customer:Agent_List") list.html {% extends "layout.html" %} {% load staticfiles %} <head> </head> <body> <div id="wrapper"> <div id="page-wrapper" class="gray-bg"> {% block content %} <div class="row wrapper border-bottom white-bg page-heading"> <div class="col-lg-10"> <h2>Agent </h2> <ol class="breadcrumb"> <li><a href="index.html">Manage My Wallet</a></li> <li><a>Agent Management </a></li> </ol> </div> <div class="col-lg-2"></div> </div> <div class="wrapper wrapper-content animated fadeInRight"> <div class="row"> <div class="col-lg-12"> <div class="panel panel-primary"> <div class="panel-heading"> Agent Profile List </div> <div class="panel-body"> <div> <form method='GET' action=''> <input type='text ' name='q' placeholder='search' value="{{request.GET.q}}"/> <input type='submit' value=' Search '/> </form> <table … -
How automatic is the Django permission on models?
I am currently practicing the permission modules of Django These are my models: from django.db import models # Create your models here. class School(models.Model): name = models.CharField(max_length=100) address = models.TextField() def __unicode__(self): return self.name class Teacher(models.Model): school = models.ForeignKey(School) first_name = models.CharField(max_length=50) middle_name = models.CharField(max_length=50) last_name = models.CharField(max_length=50) def name(self): return '{0} {1} {2}'.format(self.first_name, self.middle_name, self.last_name) def __unicode__(self): return self.name() class Section(models.Model): """ This model must only be manipulated by its respective teacher """ teacher = models.ForeignKey(Teacher) name = models.CharField(max_length=100) def __unicode__(self): return self.name class Student(models.Model): """ This model must only be manipulated by its respective teacher """ section = models.ForeignKey(Section) first_name = models.CharField(max_length=50) middle_name = models.CharField(max_length=50) last_name = models.CharField(max_length=50) def name(self): return '{0} {1} {2}'.format(self.first_name, self.middle_name, self.last_name) def __unicode__(self): return self.name() class Subject(models.Model): """ This model must only be manipulated by its respective student """ student = models.ForeignKey(Student) name = models.CharField(max_length=50) code = models.CharField(max_length=50) def __unicode__(self): return self.name And in my django-admin I created groups like: principal # Can change, add and delete Teacher Model teacher # Can change, add and delete Student and Section Model school_admin # Can change, add and delete School Model student # Can change, add and delete Subject Model In my views.py, I tried … -
How to delete an ImageField image in a Django model
I have a Profile model like so: class Profile(models.Model): photo = models.ImageField(upload_to="img/users/", blank=True) I want my users to be able to remove their profile pictures so that there's no image in photo i.e blank. I tried Profile.objects.get(id=1).photo.delete(save=False) which deleted the image but the url was still there so I was getting a 404. How do I clear the image and url? -
How to recognise text file from my linux pc via django code without checking its extension?
Most of the time when we create a new text file with gedit in linux then the file is not saved with an extension of .txt for text file.So how will I recognise it with django code because here I can't check file extension.Here is my code... Let's say i have a resume filed for each user in following models.py class User(AbstractUser): resume= models.FileField( upload_to=get_attachment_file_path,default=None, null=True,validators=[validate_file_extension]) Now i want to Validate the file for allowed extension so I made a validators.py as below def validate_file_extension(fieldfile_obj): megabyte_limit = 5.0 filesize = sys.getsizeof(fieldfile_obj) ext = os.path.splitext(fieldfile_obj.name)[1] print("extensionnnnnnnnnnnnn",ext) valid_extensions = ['.pdf', '.doc', '.docx', '.jpg', '.png', '.xlsx', '.xls','.txt','.odt'] if not ext.lower() in valid_extensions: raise ValidationError(u'Unsupported file extension.') elif filesize > megabyte_limit*1024*1024: raise ValidationError("Max file size is %s Byte" % str(megabyte_limit)) Now whenever I upload a text file in my api then it says unsupported file type because the code is unable to get the extension of linux text file.So how can i recognise that text file which is not saved as demo.txt instead my text file is saved as only demo but it is text file as seen from property of that file. Also my next question is to get the size of each … -
Get object IN a model with particular field value OR NOT IN a related model
am new to django so complex querying is becoming difficult. I have a model Animal and Heat i would like to fetch an Animal instance with farm=1 AND sex='female' AND an Animal instance with Heat.is_active=True AND Heat.is_bred=False Here is my models. class Animal(models.Model): farm = models.ForeignKey(Farm, related_name='farm_animals', on_delete=models.CASCADE) name = models.CharField(max_length=25) sex = models.CharField(max_length=7) class Heat(models.Model): animal = models.ForeignKey(Animal, related_name='heats', on_delete=models.CASCADE) is_bred = models.BooleanField(default=False) is_active = models.BooleanField(default=True) So far i tried this query: Animal.objects.filter( farm=1, sex='female', heats__is_active=True, heats__is_bred=False ) I can fetch a data if an animal instance HAS HEAT RECORD however i can't fetch any when there is NO HEAT RECORD. -
Django's render_to_string produces <br> tags
Django 1.10, Python 2.7 I'm using render_to_string function to get rendered content of a template and use it in content of an admin's custom field. So I have code that looks like that in Admin's class: def checks(self, obj): # ... return render_to_string('template.html', context) checks.allow_tags = True In template.html I have only one table: <table> {% for something in somethings %} <tr><td>...</td></td> {% endfor %} </table> But this produces a lot of <br>s before actual table: <br> <br> <br> ... <br> # Actual table <br> <br> What's the problem in this case? -
How to get has many association records in django
I have one events table and another table event_performance_details, each event can have more than one performances so i have to find all the performances belong to specific event, while fetching records from event table. events = Event.objects.all().filter(event_start_to__gte=today, status=True, current_step=3).order_by('-id')[:3] for event in events: # Here i have to get the records of event performances In event_performance_details table i am using event_id as a foreign key for events table records. -
Django UpdateView not working
I am trying to use the UpdateView of django but for some reason it does not work. (URL.py) from django.conf.urls import url from . import views app_name='profiles' urlpatterns = [ url(r'^$', views.IndexView.as_view(),name='index'), url(r'^(?P<pk>[0-9]+)$',views.DetailView.as_view(),name='detail'), url(r'^task/add/$',views.TaskCreate.as_view(),name='task-add'), url(r'^task/(?P<pk>[0-9]+)$',views.TaskUpdate.as_view(), name='task-update'), url(r'^task/(?P<pk>[0-9]+)/delete/$',views.TaskDelete.as_view(), name='task-delete'),] Below is my Html file in which I am trying to add a "Edit" link which will redirect to the UpdateView. (Details.PY this already has the second url mapped) {% extends 'profiles/base.html' %} {% block body %} <H3>The total efforts are {{datamain.efforts}} {{datamain.status}} hours.</H3> <a href="{% url 'profiles:task-update' %}">Edit</a> {% endblock %} Below is the Views.py class IndexView(generic.ListView): template_name = 'profiles/index.html' def get_queryset(self): return Datamain.objects.all() class DetailView(generic.DetailView): model = Datamain template_name = 'profiles/details.html' class TaskCreate(CreateView): model=Datamain fields=['main_task','date_time','efforts','status'] class TaskUpdate(UpdateView): model=Datamain fields=['main_task','date_time','efforts','status'] class TaskDelete(DeleteView): model=Datamain success_url = reverse_lazy('profiles:index') fields=['main_task','date_time','efforts','status'] When I run it and go to the page , it shows error "no reverse match" -
Python can load openssl libssl.1.0.0.dylib but django can't?
I've got a python-django project that relies on psycopg2 and postgres. My setup for this is macOS Sierra; Python 3.5.2, psycopg2 and django in a virtual env; PostgreSQL and openssl installed via Homebrew. (Python was via brew too if that matters.) I had issues installing psycopg2 that many others have shared here on SO. I tried reinstalling/relinking openssl etc. but eventually found this SO answer that seemed to work. If I activate my virtualenv and go into Python I can import psycopg2 with no problems. But if I try to run django's manage.py to e.g. makemigrations I still get the usual message about libssl.1.0.0.dylib not being loaded: Traceback (most recent call last): File "/Users/lambchop/.virtualenvs/betterbot/lib/python3.5/site-packages/django/db/backends/postgresql/base.py", line 20, in <module> import psycopg2 as Database File "/Users/lambchop/.virtualenvs/betterbot/lib/python3.5/site-packages/psycopg2/__init__.py", line 50, in <module> from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: dlopen(/Users/lambchop/.virtualenvs/betterbot/lib/python3.5/site-packages/psycopg2/_psycopg.cpython-35m-darwin.so, 2): Library not loaded: libssl.1.0.0.dylib Referenced from: /Users/lambchop/.virtualenvs/betterbot/lib/python3.5/site-packages/psycopg2/_psycopg.cpython-35m-darwin.so Reason: image not found During handling of the above exception, another exception occurred: Traceback (most recent call last): File "./manage.py", line 22, in <module> execute_from_command_line(sys.argv) File "/Users/lambchop/.virtualenvs/betterbot/lib/python3.5/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line utility.execute() File "/Users/lambchop/.virtualenvs/betterbot/lib/python3.5/site-packages/django/core/management/__init__.py", line 341, in execute django.setup() File "/Users/lambchop/.virtualenvs/betterbot/lib/python3.5/site-packages/django/__init__.py", line 27, in setup apps.populate(settings.INSTALLED_APPS) File "/Users/lambchop/.virtualenvs/betterbot/lib/python3.5/site-packages/django/apps/registry.py", line 108, in populate app_config.import_models(all_models) File … -
What technologies would be ideal to build a 'anyone-can-edit' webpage with a structured table to avoid reloading the entire page?
I'm trying to build a website which has a page that should be open for any visitor to edit. Let me give you an example: Lets say this page has a tree or a contents table. Now, there would be an 'edit' button which on clicking makes the tree editable and the user can move the elements in the tree or contents table, change order, add/remove categories, etc. Once done, he would save it and it would be saved as such. Anyone who loads the website after its been saved this way, would see the new layout. But ofcourse, someone else may change it again but thats the feature that I want. What technologies would help me get this done in the simplest & most elegant manner? I know it could be made using javascript to change the positioning and sending the new positions to the database and then Django would reload the page to reflect the new structure. But this would be too cumbersome as I dont want the site to reload, I just want the changes to get saved without page reload and yet have the new structure saved in a centrally accessible manner. Thanks! -
Want to create models using an existing database, but having different fields(some or all), in Django 1.10?
I am new to Django, and I am creating an web app using Django 1.10. I had developed an SignUp app and an LogIn App. SignUp app creates a database with firstname, lastname, email, password and username. Now I want to have some more fields for each existing user, so that whenever they Log In they may be able to do some other things like upload image, music, video, text and whole kind of stuff. Is It possible?