how to let user allow fill up same form multiple times after signup

how to let user allow same for multiple times after signup, i have created employment model where i have used onetoone filed for user identification but it is not allowing me to create \n number of times to submit same form without specifying null=true in onetoone field., so how it possible to allow user fillup same form \n number of times with thier identity.

You’ll need to post the models, forms, views, and possibly the templates as well to figure out where the issue may be.

Here is Model from Where i Want to Create Multiple forms in this model first variable i have used forignkey field for identifying user

class jobseeker_employment_model_manager(models.Manager):
    def get_queryset(slef):
        return super().get_queryset()




class jobseeker_employment_model(models.Model):
    jobglobeluser = models.ForeignKey(jobglobeluser,on_delete=models.CASCADE)
    emp_id = models.AutoField(primary_key=True)
    user_email = models.CharField(max_length=100)
    emp_created = models.DateTimeField(auto_now_add=True)


    user_data = jobseeker_employment_model_manager()



Here is Views.py file  where i have defined one global variable to call request.user, cause of to get only queryset for requested user only
```@login_required(login_url='/userlogin')
def jobseeker_profile(request):
    if request.user.useris == 'Recruiter':
        return redirect('/recruiter_profile/')
    global user_user
    def user_user(self):
        return self.request.user 
    employment1= jobseeker_employment_model.user_data.all()
    
    
    
    return render(request, 'jobglobel/jobseeker/jobseeker_profile.html',
                  {'user': request.user, 'emp':employment1})


Here is template
```<div id="employment">
            <div class="resumedivdivemp">
                <p>Employment</p><a href="{% url 'jobseeker_employment_create_form' %}">ADD EMPLOYMENT</a>
            </div>
            <div>
                {% for emp_type in emp %}
                <p class="empskillss" >{{emp_type.emp_type}}</p>
                {% endfor %}
                
                
            </div>

Get rid of the global. It’s wrong to use them in Django.

Also, when formatting lines, ensure that the ``` are lines by themselves.

then how can i get queryset only for requested user for the model?, i have created app through custom user model.

By using request.user.

i have defined it in context in view but it is not rendering requested user data. i have used objects.all() method for getting queryset of the model and it is rendering all objects of all user not requested user, i tried to pass parameters in objects.all(Here) method but not able to render objects for only requested user and even i am unable to make migrations after using custommanager() it is throwing an error in terminal

django.core.exceptions.ImproperlyConfigured: AUTH_USER_MODEL refers to model 'jobglobel.Jobglobeluser' that has not been installed```

Please correct the formatting of your code to make it readable.

if i keep ``` in seperate line code doesnt come in code format
from my side it is showing me complete mentained code.

You’ve lost me on what you’re trying to ask here.

I don’t see anything in what you’ve posted dealing with forms or form submissions.

You’re also mentioning something else entirely in your response above this one.

What is the issue for which you’re looking for assistance here?

as you can see in the code in jobseeker_employment_model i have used foreignkey to get user for fillingup form \n number of times but i am unable to identify user nor even i am getting users in foreignkey in database. just i am unable to get objects for that model for requested user., i just removed custommanager() from model, still it is rendering all objects of model, but i want to get it only for requested user.

No.

What I see in your model is that you have allocated a field that allows you to associate an instance of jobseeker_employment_model with an instance of User.

Nor do I see any views where you’re actually populating this data.

as you can see in views named with jobseeker_profile i have passed variable named with employment1= jobseeker_employment_model.user_data.all() [ user is written by mistake in line] it is employment1= jobseeker_employment_model.objects.all(), which is rendering all objects of all user and want to get it only for requested user.

So how do you filter any queryset?

is ti necessary to define custommanager() in model if it is necessary then i will have to define it again in model and as you said about queryset i tried to do with filter method rather objects.all()
employment1= jobseeker_employment_model.objects.filter(Q(user_email=request.user)), but it is not rendering anything in template

What is user_email?

What is request.user?

Are those two ever going to be equal?

user_email is varibale where i am getting requested.user’s email addresses for identifying users as i said earlier i have created project with custom user model where i have set username field = email, so in foreign key it is required(unique=true) to get user right? and i want to let user fill up form \n numbers of time where they can add current employment and with same form they can add previous employment, but it is not working with foreign key (unique=true), bcz it is not showing user emails in database.

Ok, let me be more specific.

What data type is user_email?

What data type is request.user?

Are those two ever going to be equal?

for getting objects for only requested users i am doing this bcz with foreign key still it is not showing me any user email in the database after submitting the form

Please answer the questions I’m asking.

What data type is user_email?

What data type is request.user?

Are those two ever going to be equal?