Hey Ogunsanya,

before you responded, I started following through the tutorial again, 
modifying the code as needed.* I created one app and in that app I have two 
models* - one for employees, one for companies. I created different URL 
structure and views for employees and companies.

However, as I stated, I only have one app which manages both the employees 
and the companies. You stated that:

*2. Yes you need two apps companies and employees*

*Can you tell me what's the difference between having those two separated 
in different apps vs me just having one app for them both (as I already 
have)?* Will my code be easier to manage if I have them separated in 
different apps? I will, for practice, continue going through the tutorial 
and modifying what I already have, but I'm willing to start from scratch 
with the new design.

It would be immensely helpful for me if you could, in a paragraph or two, 
describe how you would do it (how many apps, how to interconnect them, how 
to do the register/login functionality and should I use tutorials available 
on Google for that etc.).

Best,
Mislav


Dana četvrtak, 10. rujna 2020. u 15:39:45 UTC+2 korisnik Ogunsanya Opeyemi 
napisao je:

> 1. You have to start from there
> 2. Yes you need two apps companies and employees
> 3. Yes your idea is correct
> 4. You can do that.
>
> Email me if you still need help
>
> On Thursday, September 10, 2020, Mislav Jurić <[email protected]> 
> wrote:
>
>> Hey guys,
>>
>> I went through the Django tutorial 
>> <https://docs.djangoproject.com/en/3.1/intro/tutorial01/> about 2 weeks 
>> ago and I decided to create a website using Django. I have a couple of 
>> questions on the structure of the Django project, but before I voice them, 
>> I wanted to describe the features that I want my website to have:
>>
>>    - there will be two types of users - companies and employees
>>    - both companies and employees will have a profile with basic 
>>    information about them listed there
>>    - there should exist two different registration pages (depending on 
>>    if you're a company or if you're an employee)
>>    - companies and employees should be able to add certain tags during 
>>    their registration (and afterwards add/remove tags via their profile 
>> page) 
>>    - companies and employees should be able to search for each other 
>>    based on the tags
>>    - companies should be able to look at employees profiles and vice 
>>    versa
>>    - there should exist an administrator website - he/she can remove or 
>>    modify the profiles of both companies and employees
>>
>> This may not be all the features I want in the website, but I think you 
>> get the picture.
>>
>> Here are some questions I have for you:
>>
>>    1. *Do I start from where the tutorial left off and modify that?*
>>    2. *How many apps should my website have?* This is non-trivial for me 
>>    to determine as I have things like 2 different types of users, viewing 
>>    profiles etc. I'm guessing it's 1 app, but I'm not entirely sure.
>>    3. *How do I go about making it possible for the two types of users 
>>    to register?* I was thinking about creating separate models for 
>>    companies and employees and then making their registration pages 
>> different.
>>    4. *Can I somehow hardcode the tags that companies and employees can 
>>    use?*
>>
>> These are my questions as of now and I'm sure more will pop up during the 
>> development. I have found some login / registration Django website building 
>> tutorials on Google, but I wanted to check with you to see what the 
>> official Django users say.
>>
>> To recap: *I recently finished the tutorial and I want to make the 
>> website with the features I listed. How do I do that in the least possible 
>> amount of time, keeping my project structure and code clean and 
>> Django-like?*
>>
>> Best,
>> Mislav
>>
>> -- 
>> 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 [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CABTqP_ENmcouCkdnvQgGw5eR2JEwBh6Dur2YE0z3keGMCUtn-g%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/django-users/CABTqP_ENmcouCkdnvQgGw5eR2JEwBh6Dur2YE0z3keGMCUtn-g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> -- 
> OGUNSANYA OPEYEMI
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/190c4ca9-7fc3-4979-9176-aa1c3d127d42n%40googlegroups.com.

Reply via email to