What is next step?

Hello Friends,
I need help, please advise me on further development/stage.
I have a website built in Django and use: models, serializers, forms, decorators(api_view), login/logout, and sqlite3(CRUD).
I have passed these stages and I have partial knowledge.

What is next step? what I need learn to continue Django? I know that Django is huge framework, however I need advice what way I walk.

Below I write code part of views.py(delete, updaterecord, login_view),if you read and find anything recommendation please write:


@login_required(login_url='/MyHome/login')
@api_view(['POST'])
def delete(request, pk):
    if request.user.is_authenticated:
        models.FlatModelSqlite.objects.get(id=pk).delete()
        return HttpResponseRedirect(redirect_to='/MyHome/save')


@login_required(login_url='/MyHome/login')
def update(request, pk):
    mydata = models.FlatModelSqlite.objects.get(id=pk)
    serializer_class = serializers.FlatSerializerSqlite(mydata)
    html_save = "MyHome/update.html"
    template = loader.get_template(html_save)
    context = {
        'mymember': serializer_class.data,
    }
    return HttpResponse(template.render(context, request))


@login_required(login_url='/MyHome/login')
@api_view(['POST'])
def updaterecord(request, pk):
    if request.user.is_authenticated:
        if request.method == "POST":
            Fasi_edit = request.POST['Fasi']
            farti_edit = request.POST['farti']
            upID = models.FlatModelSqlite.objects.get(id=pk)
            upID.Fasi = Fasi_edit
            upID.farti = farti_edit
            upID.save()
            return HttpResponseRedirect(redirect_to='/MyHome/save')


@api_view(['GET', 'POST'])
def login_view(request):
    html_login = "MyHome/loginuser.html"
    if request.user.is_authenticated:
        return HttpResponseRedirect(redirect_to='/MyHome/save')

    if request.method == 'POST':
        form = AuthenticationForm(request, data=request.POST)
        if form.is_valid():
            username = form.cleaned_data.get('username')
            password = form.cleaned_data.get('password')
            user = authenticate(request, username=username, password=password)
            if user is not None:
                login(request, user)
                return HttpResponseRedirect(redirect_to='/MyHome/save')  # you want to redirect to after login

    else:
        form = AuthenticationForm()
    return render(request, html_login, {'form': form})

Congrats on building your website! As a fellow newcomer to Django, I can relate to how exciting that is.

As vague as this answer is, your next step is going to depend on what you want to do. Some questions that might help in deciding could be:

  • What doesn’t your current website do that you want it to do? Figure out what you need to learn to add it.
  • What Django terms do you keep seeing or hearing pop up again and again that you’re not really sure what they mean or do? Look some of them up.
  • If you’re ultimately learning in order to find a job, what do the job descriptions for the type of role you want have written in them? Is there anything there that you don’t know or could improve? Maybe making one or a few projects to showcase those skills would be helpful when you apply.

In other words, follow your curiosity & needs. As you’ve said, “Django is huge framework” and so you’ll need to pick and choose what is useful and/or interesting to your specific situation.

The best of luck & congrats again!

2 Likes

I can suggest you some pointers like

  • Currently you are using sqlite3 for your Database, try to use some other Database like MySql, Postgres.
  • For the login/logout, If you have not used Google login or any other Social Login you can integrate them within your project.
  • You can also you channels in your project for doing some Async work like Creating a socket connection to check out if user is online or not.

There are so many other things you can do because learning never stops, there always will be something to learn although it depends on the requirements that project have.

1 Like