Can any experience Djangao developper help me with a project?

Can any experience Djangao developper help me with a project?

Someone that would be interested in diving into the project with me and helping me out with some issues.
Most of the views are done already. .

Someone that could potentially chat with me…

Thanks in advance

Is this a commercial effort or a hobbyist project?

What are some of the issues you’re facing?

What are you looking for in the way of help?

It’s a master thesis project based out on a real platform. So the end goal for the founders is to use the new interface I’m designing for commercial purposes but my project isn’t as I’m a master student.

I’m looking for answers to some of my questions because I’m kind of in hurry. I have to hand in the paper in 1 month.

So help from someone that would just go way faster than me.

Wow I just checked your profile and you definitely have some experience. Do you think you could help ?

That really depends upon the nature of the help desired. If you could be more specific about the types of questions you have, or even posting one or two of them here, I could see.

It’s hard to explain it all by email…a skype or a google meet would be way quicker.

But basically, I have to revamp a development cloud platform for creating highly dynamic, proximity-based applications (a platform that exists already).

The new interface is based on a dashboard bootstrap theme and main goal is to create a functional interface helping developers perform tasks and get detailed information on objects. Which is not possible with the current existing platform.

I used the theme to bring mockups to life and then implemented them into Django. Now most of the interface is ready. All the views are created.

An example of today’s issue: I want to render different fields in my form to create a new device based on a device model file and also insert conditions into my model.
The model:

class Device(models.Model):
DEVICE_CHOICES = [
(‘M’, ‘Mobile’),
(‘P’, ‘Pin’),
(‘B’, ‘Beacon’),
]
app = models.ForeignKey(App, on_delete=models.CASCADE, related_name=“devices”)
createdAt = models.DateTimeField(auto_now_add=True)
updatedAt = models.DateTimeField(auto_now_add=True)
group = models.CharField (max_length=128, blank=True)
name = models.CharField(max_length=128, blank=True)
deviceType = models.CharField(max_length=1, choices=DEVICE_CHOICES)
platform = models.CharField(max_length=128, blank=True)
deviceToken = models.CharField(max_length=128, blank=True)
latitude = models.DecimalField(max_digits=9, decimal_places=6, blank=True)
longitude = models.DecimalField(max_digits=9, decimal_places=6, blank=True)
altitude = models.SmallIntegerField(blank=True)
proximityuuid = models.CharField(max_length=128, blank=True)
major = models.CharField(max_length=128, blank=True)
minor = models.CharField(max_length=128, blank=True)

The view rendering the form

class DeviceCreateView(CreateView):

specify the model for create view

model = Device

specify the fields to be displayed

fields = “all
template_name = “nassim/device-create.html”
success_url = reverse_lazy(‘devices-all’)
def get_form(self):
form = super().get_form()
return form

But based out on the device_choice fiied which actually reprensents 3 different types of devices, I want to choose specific fields to render in the form. If I choose a beacon device for example, I want the proximityuuid, major and minor in my form but not if I choose a pin or mobile device. So I’m wondering if I shouldn’t just update models and create 3 different objects types for devices or I could just implement conditions defining what to render in the form

That’s an example of a question I have.

does it make sense?

It does, but the best answer for that is going to depend upon what you’re doing “downstream” with this data.

You really have three different basic options:

  1. One model with nullable fields and different forms for each type of device. (I wouldn’t try to dynamically alter the form, I’d just create three different model forms with specific fields enabled.)
  2. Three completely separate models, each with only their device specific fields and model forms to match
  3. A multi-table inheritance model, with a base device class with the common fields and three child classes associated with one-to-one fields with the base class.

To me, the selection of one of these options more depends upon how this data is going to be used vs how it’s collected. (The way I look at it is that you’re collecting the data for a specific device 1 time, but are going to be referring to it many times. Therefore, I’d want to optimize the latter case, not the former.)

That’s correct I want to use the data for a specific device when creating a new one but going to use it many times after that.

The thing is I have no idea how to go for a multi-table with child-classes… Could you help?

Start with reviewing the available docs on Multi table inheritance.

Thanks. Checked the doc already. Try to ru some code but it just doesn’t work.

If you’d like us to take a look at it, go ahead and post what you’ve tried, here. It’s a whole lot easier to try and diagnose problems by looking at the specific code than just discussing the abstract principles.

So here is the model I defined, trying to use function to also display the device type into my table


But it doesn’t work

And I can only embed one image at the time as I am a new user. Not very appropriate for me.

What I was asking at first was someone ready who can dive into the project with me whatever the price. I can pay. But I have no time to post every day and wait for answers.

Considering most of it is already done.

Unfortunately, I can’t do that. But, in getting you to providing more details, the hope is that this additional information might attract the attention of someone who can.

I’ll point out that in the future, when you want to post code, please don’t post images. What you can do is enclose the code between lines of three backticks - `. This means that you would have a line of ```, followed by your code, followed by another line of ```. This retains the formatting:

# The line above this is ```
def function(self):
    return self
# The line after this is ```

Ken